Commit 7b6c102b authored by hanfeng's avatar hanfeng

Merge branch 'base-modify' of http://10.5.52.3/youjj/cloud-platform into base-modify

parents e11e5ccc 6374c4d9
...@@ -17,6 +17,7 @@ import org.springframework.transaction.annotation.Transactional; ...@@ -17,6 +17,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import tk.mybatis.mapper.entity.Example; import tk.mybatis.mapper.entity.Example;
import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Comparator; import java.util.Comparator;
......
...@@ -34,9 +34,8 @@ import java.util.List; ...@@ -34,9 +34,8 @@ import java.util.List;
*/ */
@Service @Service
@Slf4j @Slf4j
public class MyWaterBiz extends BaseBiz<MyWalletMapper, MyWallet>implements Serializable { public class MyWaterBiz extends BaseBiz<MyWalletMapper, MyWallet>{
private static final long serialVersionUID = 1L;
@Autowired @Autowired
MyWalletDetailBiz walletDetailBiz; MyWalletDetailBiz walletDetailBiz;
...@@ -185,13 +184,15 @@ public class MyWaterBiz extends BaseBiz<MyWalletMapper, MyWallet>implements Seri ...@@ -185,13 +184,15 @@ public class MyWaterBiz extends BaseBiz<MyWalletMapper, MyWallet>implements Seri
public void updTodayAmount(){ public void updTodayAmount(){
Example example=new Example(MyWallet.class); Example example=new Example(MyWallet.class);
example.createCriteria().andGreaterThan("todayAmount",0).andEqualTo("isFrozen",0); example.createCriteria().andGreaterThan("todayAmount",0).andEqualTo("isFrozen",0);
List<MyWallet> list=mapper.selectByExample(example); List<MyWallet> list=selectByExample(example);
log.info("---钱包定时处理今日收益updTodayAmount----size==="+list.size()); log.info("---钱包定时处理今日收益updTodayAmount----size==="+list.size());
if (list.size()>0){ if (list.size()>0){
for (MyWallet myWallet:list){ for (MyWallet myWallet:list){
log.info("---钱包定时处理今日收益updTodayAmount----userId==="+myWallet.getUserId()); log.info("---钱包定时处理今日收益updTodayAmount----userId==="+myWallet.getUserId());
myWallet.setTodayAmount(new BigDecimal("0.00")); MyWallet myWallet1=new MyWallet();
mapper.updMyWater(myWallet); myWallet1.setId(myWallet.getId());
myWallet1.setTodayAmount(new BigDecimal("0.00"));
updateSelectiveById(myWallet1);
} }
} }
......
...@@ -19,18 +19,18 @@ import java.io.Serializable; ...@@ -19,18 +19,18 @@ import java.io.Serializable;
*/ */
@JobHandler(value = "walletHandler") @JobHandler(value = "walletHandler")
@Component @Component
@Slf4j //@Slf4j
public class RentDepositJobHandler extends IJobHandler implements Serializable { public class RentDepositJobHandler extends IJobHandler {
private static final long serialVersionUID = 1L; // @Autowired
@Autowired // MyWaterBiz myWaterBiz;
MyWaterBiz myWaterBiz;
@Override @Override
public ReturnT<String> execute(String var1) throws Exception { public ReturnT<String> execute(String var1) throws Exception {
try { try {
log.info("-----定时器进入---walletHandler---"); XxlJobLogger.log("-----定时器进入---walletHandler---");
myWaterBiz.updTodayAmount(); // log.info("-----定时器进入---walletHandler---");
// myWaterBiz.updTodayAmount();
ReturnT returnT = new ReturnT(){{ ReturnT returnT = new ReturnT(){{
setCode(100); setCode(100);
setMsg("成功"); setMsg("成功");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment