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;
import org.springframework.util.StringUtils;
import tk.mybatis.mapper.entity.Example;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Comparator;
......
......@@ -34,9 +34,8 @@ import java.util.List;
*/
@Service
@Slf4j
public class MyWaterBiz extends BaseBiz<MyWalletMapper, MyWallet>implements Serializable {
public class MyWaterBiz extends BaseBiz<MyWalletMapper, MyWallet>{
private static final long serialVersionUID = 1L;
@Autowired
MyWalletDetailBiz walletDetailBiz;
......@@ -185,13 +184,15 @@ public class MyWaterBiz extends BaseBiz<MyWalletMapper, MyWallet>implements Seri
public void updTodayAmount(){
Example example=new Example(MyWallet.class);
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());
if (list.size()>0){
for (MyWallet myWallet:list){
log.info("---钱包定时处理今日收益updTodayAmount----userId==="+myWallet.getUserId());
myWallet.setTodayAmount(new BigDecimal("0.00"));
mapper.updMyWater(myWallet);
MyWallet myWallet1=new MyWallet();
myWallet1.setId(myWallet.getId());
myWallet1.setTodayAmount(new BigDecimal("0.00"));
updateSelectiveById(myWallet1);
}
}
......
......@@ -19,18 +19,18 @@ import java.io.Serializable;
*/
@JobHandler(value = "walletHandler")
@Component
@Slf4j
public class RentDepositJobHandler extends IJobHandler implements Serializable {
//@Slf4j
public class RentDepositJobHandler extends IJobHandler {
private static final long serialVersionUID = 1L;
@Autowired
MyWaterBiz myWaterBiz;
// @Autowired
// MyWaterBiz myWaterBiz;
@Override
public ReturnT<String> execute(String var1) throws Exception {
try {
log.info("-----定时器进入---walletHandler---");
myWaterBiz.updTodayAmount();
XxlJobLogger.log("-----定时器进入---walletHandler---");
// log.info("-----定时器进入---walletHandler---");
// myWaterBiz.updTodayAmount();
ReturnT returnT = new ReturnT(){{
setCode(100);
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