refactor(game): 优化游戏详情获取逻辑
- 添加对游戏 betting 明细的查询,若存在则返回明细中的 betContent 作为游戏详情 URL - 优化缓main-p
parent
4200ebbd28
commit
18a8f544bb
|
@ -485,7 +485,7 @@ public class GamesPGServiceImpl implements IGamesService {
|
||||||
}
|
}
|
||||||
//如果长度一致则清空缓存循环币种
|
//如果长度一致则清空缓存循环币种
|
||||||
if (cacheSet.size() >= currencys.size()) {
|
if (cacheSet.size() >= currencys.size()) {
|
||||||
cacheSet=new HashSet<>();
|
cacheSet = new HashSet<>();
|
||||||
redisCache.deleteObject(CacheConstants.PG_GAMES_BET_CURRENCY);
|
redisCache.deleteObject(CacheConstants.PG_GAMES_BET_CURRENCY);
|
||||||
}
|
}
|
||||||
//去掉重复的
|
//去掉重复的
|
||||||
|
@ -499,7 +499,6 @@ public class GamesPGServiceImpl implements IGamesService {
|
||||||
.build());
|
.build());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
currencyDTO.setCurrency("CNY");
|
currencyDTO.setCurrency("CNY");
|
||||||
|
|
||||||
betRecordByTimeDTO.setAgentId(currencyDTO.getCode());
|
betRecordByTimeDTO.setAgentId(currencyDTO.getCode());
|
||||||
|
@ -574,6 +573,12 @@ public class GamesPGServiceImpl implements IGamesService {
|
||||||
@Override
|
@Override
|
||||||
public GetGameDetailResponseDTO getGameDetail(GetGameDetailRequestDTO getGameDetailRequestDTO) {
|
public GetGameDetailResponseDTO getGameDetail(GetGameDetailRequestDTO getGameDetailRequestDTO) {
|
||||||
|
|
||||||
|
List<GameBettingDetails> gameBettingDetails = gameBettingDetailsService.selectGameBettingDetailsList(GameBettingDetails.builder().wagersId(getGameDetailRequestDTO.getWagersId()).build());
|
||||||
|
if (!CollectionUtils.isEmpty(gameBettingDetails)) {
|
||||||
|
GetGameDetailResponseDTO getGameDetailResponseDTO = new GetGameDetailResponseDTO();
|
||||||
|
getGameDetailResponseDTO.setUrl(gameBettingDetails.get(0).getBetContent());
|
||||||
|
return getGameDetailResponseDTO;
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue