dos hai 1 mes
pai
achega
2c40bac4d6

+ 6 - 6
game-business/src/main/java/com/game/business/controller/AppUsersCashrecordController.java

@@ -131,7 +131,7 @@ public class AppUsersCashrecordController extends BaseController
     @Log(title = "提现记录", businessType = BusinessType.UPDATE)
     @ApiOperation(value = "修改提现记录", notes = "修改提现记录")
     @PutMapping
-    @DSTransactional
+    @DSTransactional()
     public R<String> edit(@RequestBody AppUsersCashrecord appUsersCashrecord) throws Exception {
         AppUsersCashrecord cashrecord = appUsersCashrecordService.selectAppUsersCashrecordById(appUsersCashrecord.getId());
         if(null == cashrecord){
@@ -148,14 +148,10 @@ public class AppUsersCashrecordController extends BaseController
         update.setId(cashrecord.getId());
         update.setStatus(appUsersCashrecord.getStatus());
         update.setReason(appUsersCashrecord.getReason());
-        int rest = appUsersCashrecordService.updateAppUsersCashrecord(update);
-        if(rest < 1){
-            return R.fail("审核失败");
-        }
         if(1 == appUsersCashrecord.getStatus().intValue() && null != appUsersCashrecord.getCashChannelId() && appUsersCashrecord.getCashChannelId() > 0){
             //审核通过
             AppChargeChannel appChargeChannel = appChargeChannelService.selectAppChargeChannelById(appUsersCashrecord.getCashChannelId());
-            if(null == appChargeChannel && StringUtils.isNotBlank(appChargeChannel.getChannelKey())){
+            if(null != appChargeChannel && StringUtils.isNotBlank(appChargeChannel.getChannelKey())){
                 String extra = "";
                 if(Arrays.asList("8092","8095").contains(appChargeChannel.getChannelKey())){
                     //钱包提现
@@ -201,6 +197,10 @@ public class AppUsersCashrecordController extends BaseController
             appUserService.updateUserAmount(tran);
             appUserCountTask.updateWithdrawAble(appUser.getUserid());
         }
+        int rest = appUsersCashrecordService.updateAppUsersCashrecord(update);
+        if(rest < 1){
+            return R.fail("审核失败");
+        }
         return R.ok("审核成功");
     }
 

+ 2 - 1
game-business/src/main/java/com/game/business/task/AppUserCountTask.java

@@ -618,6 +618,7 @@ public class AppUserCountTask {
             double bettingAmount = curTranList.stream().filter(e->
                             e.getCurrencyType().intValue() == 4
             ).mapToDouble(FinTranRecord::getDiamondCoinChange).sum() * -1;
+            log.info("用户{},充值:{} 以满足流水:{}",userId,money,bettingAmount);
             if(bettingAmount >= money * 2){
                 //更新为已满足提现
                 userChargeList.forEach(e->{
@@ -635,7 +636,7 @@ public class AppUserCountTask {
     /**
      * 更新用户可提现余额
      * */
-    @DSTransactional
+    @DSTransactional()
     public void updateWithdrawAble(Long userId){
         if(null != userId && userId.longValue() == -1){
             userId = null;