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);