dos 2 달 전
부모
커밋
f89c359674
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      game-business/src/main/java/com/game/business/service/impl/FinTranRecordServiceImpl.java

+ 3 - 3
game-business/src/main/java/com/game/business/service/impl/FinTranRecordServiceImpl.java

@@ -158,8 +158,8 @@ public class FinTranRecordServiceImpl extends ServiceImpl<FinTranRecordMapper, F
         if(null == toAppUser){
             return HttpRet.fail("受益用户不存在");
         }
-        if(appUser.getDiamondCoin().longValue() < transfer.getMoney().longValue()){
-            return HttpRet.fail("转账金额不足");
+        if(appUser.getDiamondCoinCash().longValue() < transfer.getMoney().longValue()){
+            return HttpRet.fail("转账金额不足");
         }
         //查询当笔限额
         CfgCommon cfgSignleCommon = cfgCommonService.getCfg(1);
@@ -188,7 +188,7 @@ public class FinTranRecordServiceImpl extends ServiceImpl<FinTranRecordMapper, F
         updateAppUser.setUserid(appUser.getUserid());
         updateAppUser.setDiamondCoin(appUser.getDiamondCoin() - transfer.getMoney());
         updateAppUser.setDiamondCoinCash(appUser.getDiamondCoinCash() - transfer.getMoney());
-        updateAppUser.setDiamondCoinTotal(appUser.getDiamondCoinTotal() + transfer.getMoney());
+        updateAppUser.setDiamondCoinTotal(appUser.getDiamondCoinTotal() - transfer.getMoney());
         //扣减余额
         appUserService.updateAppUser(appUser);