From 4200ebbd285375e5c177015a194f8f95845d3ec0 Mon Sep 17 00:00:00 2001 From: shi Date: Fri, 14 Mar 2025 14:00:51 +0800 Subject: [PATCH] =?UTF-8?q?feat(game):=20=E5=A2=9E=E5=8A=A0=E6=B8=B8?= =?UTF-8?q?=E6=88=8F=E6=8A=95=E6=B3=A8=E8=AE=B0=E5=BD=95=E8=AF=A6=E7=BB=86?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 GameBettingDetails 模型中添加新字段:round, table, seat, betContent - 更新相关 mapper 和 SQL 文件以支持新字段- 添加 GameDTO 类用于游戏数据传输 - 更新 ApiGameController 和 ApiMemberController 中的相关方法 - 优化部分代码结构,使用 SuperBuilder 等特性 --- .../ff/game/api/ng/service/impl/GamesPGServiceImpl.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ff-game/src/main/java/com/ff/game/api/ng/service/impl/GamesPGServiceImpl.java b/ff-game/src/main/java/com/ff/game/api/ng/service/impl/GamesPGServiceImpl.java index fad4d66..9e7e3b1 100644 --- a/ff-game/src/main/java/com/ff/game/api/ng/service/impl/GamesPGServiceImpl.java +++ b/ff-game/src/main/java/com/ff/game/api/ng/service/impl/GamesPGServiceImpl.java @@ -485,6 +485,7 @@ public class GamesPGServiceImpl implements IGamesService { } //如果长度一致则清空缓存循环币种 if (cacheSet.size() >= currencys.size()) { + cacheSet=new HashSet<>(); redisCache.deleteObject(CacheConstants.PG_GAMES_BET_CURRENCY); } //去掉重复的 @@ -504,7 +505,7 @@ public class GamesPGServiceImpl implements IGamesService { betRecordByTimeDTO.setAgentId(currencyDTO.getCode()); betRecordByTimeDTO.setAgentKey(currencyDTO.getKey()); int pageNo = 1; - int pageSize = 1; + int pageSize = 2; Map paramsMap = new HashMap<>(); paramsMap.put("currency", currencyDTO.getCurrency()); paramsMap.put("pageNo", pageNo); @@ -537,11 +538,9 @@ public class GamesPGServiceImpl implements IGamesService { //请求参数 Map paramMap = new HashMap<>(); paramMap.put("currency", currencyDTO.getCurrency()); - paramMap.put("pageNo", pageNo); + paramMap.put("pageNo", pageNoAtomic.get()); paramMap.put("pageSize", pageSize); - //每次翻页请求必须间隔 10 秒钟 - SleepUtil.sleep(10000); - ApiNGResponseDTO betRecordByTimePage = ngClient.getBetRecordByTime(paramsMap, key); + ApiNGResponseDTO betRecordByTimePage = ngClient.getBetRecordByTime(paramMap, key); data = betRecordByTimePage.getData(); //数据组装 this.batchInsert(data);