Commit e9e0e483 authored by hezhen's avatar hezhen

123

parent ec7ca7be
...@@ -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,8 +35,9 @@ import java.util.stream.Collectors; ...@@ -34,8 +35,9 @@ import java.util.stream.Collectors;
@Transactional @Transactional
@Service @Service
@Data @Data
public class MyWalletDetailBiz extends BaseBiz<MyWalletDetailMapper, MyWalletDetail> { public class MyWalletDetailBiz extends BaseBiz<MyWalletDetailMapper, MyWalletDetail> implements Serializable {
private static final long serialVersionUID = 1L;
public PageDataVO<WalletDetailPageVo> findWalletDetailPage(Integer userId,Integer pageNo,Integer pageSize){ public PageDataVO<WalletDetailPageVo> findWalletDetailPage(Integer userId,Integer pageNo,Integer pageSize){
......
...@@ -185,13 +185,15 @@ public class MyWaterBiz extends BaseBiz<MyWalletMapper, MyWallet>implements Seri ...@@ -185,13 +185,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);
} }
} }
......
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