dos пре 1 месец
родитељ
комит
45aacf2f4c

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

@@ -345,7 +345,10 @@ public class AppUsersCashrecordController extends BaseController
             }
             appUsersCashrecordService.updateAppUsersCashrecord(update);
             //更新用户可提现余额
-            appUserCountTask.updateWithdrawAble(appUsersCashrecord.getUid());
+            ThreadUtil.execAsync(()->{
+                appUserCountTask.updateWithdrawAble(appUsersCashrecord.getUid());
+            });
+
 
             return "success";
         }else{

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

@@ -1,6 +1,7 @@
 package com.game.business.service.impl;
 
 import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.thread.ThreadUtil;
 import com.alibaba.fastjson2.JSONObject;
 import com.baomidou.dynamic.datasource.annotation.DSTransactional;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -242,7 +243,9 @@ public class FinTranRecordServiceImpl extends ServiceImpl<FinTranRecordMapper, F
         redisCache.deleteObject("U:UserInfo:".concat(String.valueOf(appUser.getUserid())));
         redisCache.deleteObject("U:UserInfo:".concat(String.valueOf(toAppUser.getUserid())));
         //更新用户可提现余额
-        appUserCountTask.updateWithdrawAble(appUser.getUserid());
+        ThreadUtil.execAsync(()->{
+            appUserCountTask.updateWithdrawAble(appUser.getUserid());
+        });
         return HttpRet.success("转账成功",true);
     }
 
@@ -292,7 +295,9 @@ public class FinTranRecordServiceImpl extends ServiceImpl<FinTranRecordMapper, F
         redisCache.deleteObject("U:UserInfo:".concat(String.valueOf(appUser.getUserid())));
         redisCache.deleteObject("U:UserInfo:".concat(String.valueOf(toAppUser.getUserid())));
         //更新用户可提现余额
-        appUserCountTask.updateWithdrawAble(appUser.getUserid());
+        ThreadUtil.execAsync(()->{
+            appUserCountTask.updateWithdrawAble(appUser.getUserid());
+        });
         return HttpRet.success("转账成功",true);
     }
 

+ 5 - 1
game-business/src/main/java/com/game/business/task/AppGameBettingTask.java

@@ -1,5 +1,6 @@
 package com.game.business.task;
 
+import cn.hutool.core.thread.ThreadUtil;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson2.JSONArray;
 import com.alibaba.fastjson2.JSONObject;
@@ -415,7 +416,10 @@ public class AppGameBettingTask {
 
         //更新可提现余额
         for(String userId : userIds) {
-            appUserCountTask.updateWithdrawAble(Long.parseLong(userId));
+            ThreadUtil.execAsync(()->{
+                appUserCountTask.updateWithdrawAble(Long.parseLong(userId));
+            });
+
         }
     }
 

+ 4 - 1
game-business/src/main/java/com/game/business/task/AppGameLotteryTask.java

@@ -1,5 +1,6 @@
 package com.game.business.task;
 
+import cn.hutool.core.thread.ThreadUtil;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson2.JSONObject;
 import com.baomidou.dynamic.datasource.annotation.DSTransactional;
@@ -59,7 +60,9 @@ public class AppGameLotteryTask {
 
         //更新可提现余额
         for(String userId : userIds) {
-            appUserCountTask.updateWithdrawAble(Long.parseLong(userId));
+            ThreadUtil.execAsync(()->{
+                appUserCountTask.updateWithdrawAble(Long.parseLong(userId));
+            });
         }
     }