Sfoglia il codice sorgente

发放前判断总余额

dos 1 settimana fa
parent
commit
e85ddf9b52

+ 4 - 4
game-business/src/main/java/com/game/business/service/impl/AppUserCountDividendServiceImpl.java

@@ -185,13 +185,13 @@ public class AppUserCountDividendServiceImpl extends ServiceImpl<AppUserCountDiv
         if(dividendList.size() < 1){
             return HttpRet.fail("发放失败,不存在或已发放");
         }*/
-        /*AppUser curUser = appUserService.selectAppUserByUserid(curUserId);
-        if(curUser.getDiamondCoin() < dividendList.stream().mapToDouble(e->e.getDiamondCoin()).sum()){
+        AppUser user = appUserService.selectAppUserByUserid(sendUserId);
+        if(user.getDiamondCoin() < dividendList.stream().mapToDouble(e->e.getDiamondCoin()).sum()){
             return HttpRet.fail("发放失败,余额不足");
         }
-        if(curUser.getCoin() < dividendList.stream().mapToDouble(e->e.getCoin()).sum()){
+        if(user.getCoin() < dividendList.stream().mapToDouble(e->e.getCoin()).sum()){
             return HttpRet.fail("发放失败,金币不足");
-        }*/
+        }
         List<Long> userIds = new ArrayList<>();
         userIds.add(sendUserId);
         //开始发放