refactor(game): 优化游戏详情获取逻辑

- 添加对游戏 betting 明细的查询,若存在则返回明细中的 betContent 作为游戏详情 URL
- 优化缓
main-p
shi 2025-03-14 14:06:20 +08:00
parent 4200ebbd28
commit 18a8f544bb
1 changed files with 7 additions and 2 deletions

View File

@ -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;
} }