refactor(ff-game): 重构游戏模块代码
- 移除了 GameName、GamePlatform 和 GameSecretKey 相关的实体类、Mapper 和 Service - 优化了 ApiGameController 中的代码结构 - 更新了 GameBalanceExchange 类的继承关系 - 调整了 GamesAEServiceImpl 和 GamesDGServiceImpl 中的方法实现main-meitian
parent
b35fad13d1
commit
947d54590a
|
|
@ -1,7 +1,6 @@
|
|||
package com.ff.api.controller;
|
||||
|
||||
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import com.ff.annotation.CheckHeader;
|
||||
import com.ff.api.request.*;
|
||||
import com.ff.api.response.*;
|
||||
|
|
@ -10,10 +9,7 @@ import com.ff.base.core.controller.BaseController;
|
|||
import com.ff.base.core.domain.AjaxResult;
|
||||
import com.ff.base.core.page.TableDataInfo;
|
||||
import com.ff.base.enums.ErrorCode;
|
||||
import com.ff.base.enums.GamePlatforms;
|
||||
import com.ff.base.enums.TransferType;
|
||||
import com.ff.base.exception.base.ApiException;
|
||||
import com.ff.base.exception.base.BaseException;
|
||||
import com.ff.base.system.domain.TenantSecretKey;
|
||||
import com.ff.base.utils.StringUtils;
|
||||
import com.ff.base.utils.bean.BeanUtils;
|
||||
|
|
@ -46,11 +42,8 @@ import org.springframework.web.bind.annotation.RestController;
|
|||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
/**
|
||||
* api控制器
|
||||
|
|
@ -243,10 +236,15 @@ public class ApiGameController extends BaseController {
|
|||
.platformCode(gameExchangeBalanceRequest.getPlatformCode())
|
||||
.sourceId(gameExchangeBalanceRequest.getOrderId())
|
||||
.currencyCode(gameExchangeBalanceRequest.getCurrencyCode())
|
||||
.currency(targetCurrency)
|
||||
.transferType(gameExchangeBalanceRequest.getTransferType())
|
||||
.amount(gameExchangeBalanceRequest.getAmount())
|
||||
.account(gameExchangeBalanceRequest.getAccount())
|
||||
.tenantKey(tenantSecretKey.getTenantKey())
|
||||
.systemCurrency(gameExchangeBalanceRequest.getCurrencyCode())
|
||||
.agentId(keyInfo.getCode())
|
||||
.agentKey(keyInfo.getKey())
|
||||
|
||||
.build());
|
||||
|
||||
// 获取用户信息
|
||||
|
|
@ -635,13 +633,12 @@ public class ApiGameController extends BaseController {
|
|||
*
|
||||
* @param request 成员信息所有api请求
|
||||
* @return {@link AjaxResult }
|
||||
*/
|
||||
*//*
|
||||
@PostMapping("/exchange/balance/all")
|
||||
public AjaxResult exchangeBalanceAll(@Validated @RequestBody GameExchangeBalanceAllRequest request) {
|
||||
|
||||
TenantSecretKey tenantSecretKey = keyConfig.get();
|
||||
|
||||
|
||||
// List<GameSecretKeyCurrencyDTO> gameSecretKeys = gameSecretKeyCurrencyService.findByGameSecretKeyCurrencyDTOList(GameSecretKeyCurrencyDTO.builder()
|
||||
// .systemCurrency(gameExchangeBalanceAllRequest.getCurrencyCode()).build());
|
||||
|
||||
|
|
@ -702,7 +699,7 @@ public class ApiGameController extends BaseController {
|
|||
.agentKey(key.getKey())
|
||||
.orderId(request.getOrderId())
|
||||
.amount(BigDecimal.ONE)
|
||||
.currency(/*gameSecretKeyCurrencyDTO.getCurrency()*/key.currency)
|
||||
.currency(*//*gameSecretKeyCurrencyDTO.getCurrency()*//*key.currency)
|
||||
.tenantKey(tenantSecretKey.getTenantKey())
|
||||
.account(member.getGameAccount())
|
||||
.vendor(key.getPlatform())
|
||||
|
|
@ -747,6 +744,10 @@ public class ApiGameController extends BaseController {
|
|||
.amount(gameExchangeMoney.getBalance())
|
||||
.account(member.getMemberAccount())
|
||||
.tenantKey(tenantSecretKey.getTenantKey())
|
||||
.currency()
|
||||
.systemCurrency(gameExchangeMoney.getCurrencyCode())
|
||||
.agentId()
|
||||
.agentKey()
|
||||
.build());
|
||||
|
||||
}
|
||||
|
|
@ -758,7 +759,7 @@ public class ApiGameController extends BaseController {
|
|||
|
||||
|
||||
return AjaxResult.success(balanceMap);
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.ff.common.dto;
|
||||
|
||||
import com.ff.game.api.request.GamesBaseRequestDTO;
|
||||
import io.swagger.models.auth.In;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
|
|
@ -21,7 +22,7 @@ import java.math.BigDecimal;
|
|||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
public class GameBalanceExchange implements Serializable {
|
||||
public class GameBalanceExchange extends GamesBaseRequestDTO implements Serializable {
|
||||
private final static long serialVersionUID = 3452954102791311247L;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -26,13 +26,8 @@ import com.ff.common.service.ITenantQuotaExchangeService;
|
|||
import com.ff.base.system.service.ITenantSecretKeyService;
|
||||
import com.ff.game.api.IGamesService;
|
||||
import com.ff.game.api.request.MemberInfoRequestDTO;
|
||||
import com.ff.game.domain.GameSecretKey;
|
||||
import com.ff.game.dto.GameSecretKeyCurrencyDTO;
|
||||
import com.ff.game.service.IGameSecretKeyCurrencyService;
|
||||
import com.ff.game.service.IGameSecretKeyService;
|
||||
import com.ff.member.domain.Member;
|
||||
import com.ff.member.service.IMemberService;
|
||||
import nonapi.io.github.classgraph.json.Id;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ff.common.mapper.TenantGameQuotaMapper;
|
||||
|
|
@ -61,30 +56,18 @@ public class TenantGameQuotaServiceImpl implements ITenantGameQuotaService {
|
|||
@Resource
|
||||
private ITenantSecretKeyService tenantSecretKeyService;
|
||||
|
||||
|
||||
@Resource
|
||||
private IMemberService memberService;
|
||||
|
||||
|
||||
@Resource
|
||||
private IGameSecretKeyService gameSecretKeyService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private Map<String, IGamesService> gamesService;
|
||||
|
||||
|
||||
@Resource
|
||||
private ITenantQuotaExchangeService tenantQuotaExchangeService;
|
||||
|
||||
@Resource
|
||||
private ITenantPlatformService tenantPlatformService;
|
||||
|
||||
|
||||
@Resource
|
||||
private IGameSecretKeyCurrencyService gameSecretKeyCurrencyService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询租户游戏配额
|
||||
*
|
||||
|
|
@ -289,12 +272,12 @@ public class TenantGameQuotaServiceImpl implements ITenantGameQuotaService {
|
|||
@Override
|
||||
public BigDecimal gameBalanceExchange(GameBalanceExchange gameBalanceExchange) {
|
||||
// 获取平台接口密钥
|
||||
GameSecretKeyCurrencyDTO gameSecretKey = gameSecretKeyCurrencyService.findByGameSecretKeyCurrencyDTO(GameSecretKeyCurrencyDTO.builder()
|
||||
.platformCode(gameBalanceExchange.getPlatformCode())
|
||||
.systemCurrency(gameBalanceExchange.getCurrencyCode()).build());
|
||||
// GameSecretKeyCurrencyDTO gameSecretKey = gameSecretKeyCurrencyService.findByGameSecretKeyCurrencyDTO(GameSecretKeyCurrencyDTO.builder()
|
||||
// .platformCode(gameBalanceExchange.getPlatformCode())
|
||||
// .systemCurrency(gameBalanceExchange.getCurrencyCode()).build());
|
||||
|
||||
// 检查平台密钥是否存在,否则抛出异常
|
||||
ApiException.notNull(gameSecretKey, ErrorCode.CURRENCY_NOT_EXIST.getCode());
|
||||
// ApiException.notNull(gameSecretKey, ErrorCode.CURRENCY_NOT_EXIST.getCode());
|
||||
|
||||
TenantQuotaExchange tenantQuotaExchange = tenantQuotaExchangeService.getTenantQuotaExchange(Constants.USDT, gameBalanceExchange.getCurrencyCode());
|
||||
ApiException.notNull(tenantQuotaExchange, ErrorCode.CURRENCY_EXCHANGE.getCode());
|
||||
|
|
@ -344,9 +327,9 @@ public class TenantGameQuotaServiceImpl implements ITenantGameQuotaService {
|
|||
// 获取第三方钱包余额
|
||||
MemberInfoRequestDTO gamesBaseRequestDTO = MemberInfoRequestDTO.builder()
|
||||
.accounts(member.getGameAccount())
|
||||
.agentId(gameSecretKey.getCode())
|
||||
.currency(gameSecretKey.getCurrency())
|
||||
.agentKey(gameSecretKey.getKey())
|
||||
.agentId(gameBalanceExchange.getAgentId())
|
||||
.currency(gameBalanceExchange.getCurrency())
|
||||
.agentKey(gameBalanceExchange.getAgentKey())
|
||||
.build();
|
||||
balanceRequestAmount = iGamesService.getMemberInfo(gamesBaseRequestDTO).getBalance();
|
||||
balanceRequestAmount = NumberUtil.add(balanceRequestAmount, NumberUtil.mul(balanceRequestAmount, NumberUtil.div(tenantPlatform.getUseCost(), Constants.HUNDRED)));
|
||||
|
|
|
|||
|
|
@ -365,6 +365,10 @@ public class GamesAEServiceImpl implements IGamesService {
|
|||
.amount(exchangeMoney.getBalance())
|
||||
.account(member.getMemberAccount())
|
||||
.tenantKey(exchangeMoney.getTenantKey())
|
||||
.currency(exchangeTransferMoneyRequestDTO.getCurrency())
|
||||
.systemCurrency(exchangeTransferMoneyRequestDTO.getSystemCurrency())
|
||||
.agentKey(exchangeTransferMoneyRequestDTO.getAgentKey())
|
||||
.agentId(exchangeTransferMoneyRequestDTO.getAgentId())
|
||||
.build());
|
||||
}
|
||||
exchangeMoney.setStatus(status);
|
||||
|
|
|
|||
|
|
@ -17,7 +17,9 @@ import com.ff.game.api.dg.client.DGClient;
|
|||
import com.ff.game.api.dg.dto.*;
|
||||
import com.ff.game.api.request.*;
|
||||
import com.ff.game.domain.*;
|
||||
import com.ff.game.service.*;
|
||||
import com.ff.game.service.IGameBettingDetailsService;
|
||||
import com.ff.game.service.IGameExchangeMoneyService;
|
||||
import com.ff.game.service.IGameService;
|
||||
import com.ff.member.domain.Member;
|
||||
import com.ff.member.service.IMemberService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
|
@ -46,11 +48,6 @@ public class GamesDGServiceImpl implements IGamesService {
|
|||
@Resource
|
||||
private IGameExchangeMoneyService gameExchangeMoneyService;
|
||||
|
||||
|
||||
@Resource
|
||||
private IGamePlatformService gamePlatformService;
|
||||
|
||||
|
||||
@Resource
|
||||
private IGameService gameService;
|
||||
|
||||
|
|
@ -67,9 +64,6 @@ public class GamesDGServiceImpl implements IGamesService {
|
|||
@Resource
|
||||
private IGameBettingDetailsService gameBettingDetailsService;
|
||||
|
||||
@Resource
|
||||
private IGameNameService gameNameService;
|
||||
|
||||
/**
|
||||
* 游戏id
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -255,6 +255,8 @@ public class GamesJILIServiceImpl implements IGamesService {
|
|||
game.setSortNo(gameService.selectMaxSortNo(platformType, GamePlatforms.JILI.getCode()) + 1);
|
||||
game.setGameName(gamesDataDTO.getName().getZhCN());
|
||||
game.setCreateBy(Constants.SYSTEM);
|
||||
game.setPlatformType(platformType);
|
||||
game.setPlatformCode(GamePlatforms.JILI.getCode());
|
||||
|
||||
List<NameInfo> nameInfos = new ArrayList<>();
|
||||
nameInfos.add(new NameInfo(gamesDataDTO.getName().getZhCN(), "zh-CN"));
|
||||
|
|
|
|||
|
|
@ -20,7 +20,10 @@ import com.ff.game.api.km.dto.*;
|
|||
import com.ff.game.api.request.*;
|
||||
import com.ff.game.api.xk.dto.XKGamesDTO;
|
||||
import com.ff.game.domain.*;
|
||||
import com.ff.game.service.*;
|
||||
import com.ff.game.service.IGameBettingDetailsService;
|
||||
import com.ff.game.service.IGameExchangeMoneyService;
|
||||
import com.ff.game.service.IGameService;
|
||||
import com.ff.game.service.IPlatformService;
|
||||
import com.ff.member.domain.Member;
|
||||
import com.ff.member.service.IMemberService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
|
@ -74,9 +77,6 @@ public class GamesKMServiceImpl implements IGamesService {
|
|||
@Resource
|
||||
private IGameBettingDetailsService gameBettingDetailsService;
|
||||
|
||||
@Resource
|
||||
private IGameNameService gameNameService;
|
||||
|
||||
|
||||
/**
|
||||
* 游戏id
|
||||
|
|
@ -343,6 +343,8 @@ public class GamesKMServiceImpl implements IGamesService {
|
|||
game.setGameName(gamesDataDTO.getName());
|
||||
game.setCreateBy(Constants.SYSTEM);
|
||||
game.setIngress(ingress);
|
||||
game.setPlatformCode(GamePlatforms.KM.getCode());
|
||||
game.setPlatformType(platformType);
|
||||
List<NameInfo> nameInfos = new ArrayList<>();
|
||||
nameInfos.add(new NameInfo(gamesDataDTO.getName(), "zh-CN"));
|
||||
game.setNameInfo(nameInfos);
|
||||
|
|
|
|||
|
|
@ -246,6 +246,8 @@ public class MeiTianGameServiceImpl implements IGamesService {
|
|||
game.setSortNo(gameService.selectMaxSortNo(platformType, GamePlatforms.MT.getCode()) + 1);
|
||||
game.setGameName(gamesDataDTO.getCnName());
|
||||
game.setCreateBy(Constants.SYSTEM);
|
||||
game.setPlatformType(platformType);
|
||||
game.setPlatformCode(GamePlatforms.MT.getCode());
|
||||
|
||||
List<NameInfo> nameInfos = new ArrayList<>();
|
||||
nameInfos.add(new NameInfo(gamesDataDTO.getCnName(), "zh-CN"));
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ import com.ff.game.api.request.*;
|
|||
import com.ff.game.domain.*;
|
||||
import com.ff.game.dto.GameBettingDetailsDTO;
|
||||
import com.ff.game.dto.GameDTO;
|
||||
import com.ff.game.dto.GameSecretKeyCurrencyDTO;
|
||||
import com.ff.game.service.IGameBettingDetailsService;
|
||||
import com.ff.game.service.IGameExchangeMoneyService;
|
||||
import com.ff.game.service.IGameService;
|
||||
|
|
@ -263,6 +262,8 @@ public class GamesPGServiceImpl implements IGamesService {
|
|||
game.setSortNo(gameService.selectMaxSortNo(platformType, GamePlatforms.PG.getCode()) + 1);
|
||||
game.setGameName(apiGameInfoResponseDTO.getGameName().get("zh-hans"));
|
||||
game.setCreateBy(Constants.SYSTEM);
|
||||
game.setPlatformCode(GamePlatforms.PG.getCode());
|
||||
game.setPlatformType(platformType);
|
||||
List<NameInfo> nameInfos = new ArrayList<>();
|
||||
nameInfos.add(new NameInfo(apiGameInfoResponseDTO.getGameName().get("zh-hans"), "zh-CN"));
|
||||
nameInfos.add(new NameInfo(apiGameInfoResponseDTO.getGameName().get("zh-hant"), "zh-TW"));
|
||||
|
|
@ -454,8 +455,8 @@ public class GamesPGServiceImpl implements IGamesService {
|
|||
@Override
|
||||
public Boolean getBetRecordByTime(BetRecordByTimeDTO betRecordByTimeDTO) {
|
||||
|
||||
GameSecretKeyCurrencyDTO gameSecretKeyDTO = new GameSecretKeyCurrencyDTO();
|
||||
gameSecretKeyDTO.setPlatformCodes(NGPlatforms.getAllPlatforms());
|
||||
// GameSecretKeyCurrencyDTO gameSecretKeyDTO = new GameSecretKeyCurrencyDTO();
|
||||
// gameSecretKeyDTO.setPlatformCodes(NGPlatforms.getAllPlatforms());
|
||||
// List<GameSecretKeyCurrencyDTO> currencyDTOList = gameSecretKeyCurrencyService.findByGameSecretKeyCurrencyDTOList(gameSecretKeyDTO);
|
||||
// List<String> currencys = currencyDTOList.stream()
|
||||
// .map(GameSecretKeyCurrencyDTO::getCurrency)
|
||||
|
|
|
|||
|
|
@ -15,17 +15,13 @@ import com.ff.base.utils.JsonUtil;
|
|||
import com.ff.base.utils.sign.Md5Utils;
|
||||
import com.ff.config.KeyConfig;
|
||||
import com.ff.game.api.IGamesService;
|
||||
import com.ff.game.api.dg.dto.DGBetRecordResponseDTO;
|
||||
import com.ff.game.api.ng.dto.ApiExchangeTransferStatusResponseDTO;
|
||||
import com.ff.game.api.pgx.client.PGXClient;
|
||||
import com.ff.game.api.pgx.dto.*;
|
||||
import com.ff.game.api.request.*;
|
||||
import com.ff.game.api.xk.dto.XKBetRecordResponseDTO;
|
||||
import com.ff.game.api.xk.dto.XKGamesDTO;
|
||||
import com.ff.game.api.xk.dto.XKKickMemberDTO;
|
||||
import com.ff.game.domain.*;
|
||||
import com.ff.game.dto.GameSecretKeyCurrencyDTO;
|
||||
import com.ff.game.service.*;
|
||||
import com.ff.game.service.IGameBettingDetailsService;
|
||||
import com.ff.game.service.IGameExchangeMoneyService;
|
||||
import com.ff.game.service.IGameService;
|
||||
import com.ff.member.domain.Member;
|
||||
import com.ff.member.service.IMemberService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
|
@ -37,7 +33,10 @@ import org.springframework.util.ObjectUtils;
|
|||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
|
@ -63,10 +62,6 @@ public class GamesPGXServiceImpl implements IGamesService {
|
|||
private IGameExchangeMoneyService gameExchangeMoneyService;
|
||||
|
||||
|
||||
@Resource
|
||||
private IGamePlatformService gamePlatformService;
|
||||
|
||||
|
||||
@Resource
|
||||
private IGameService gameService;
|
||||
|
||||
|
|
@ -74,14 +69,6 @@ public class GamesPGXServiceImpl implements IGamesService {
|
|||
@Resource
|
||||
private IMemberService memberService;
|
||||
|
||||
@Resource
|
||||
private IGameFreeRecordService gameFreeRecordService;
|
||||
@Resource
|
||||
private IGameSecretKeyService gameSecretKeyService;
|
||||
|
||||
@Resource
|
||||
private IGameSecretKeyCurrencyService gameSecretKeyCurrencyService;
|
||||
|
||||
@Resource
|
||||
private PGXClient PGXClient;
|
||||
|
||||
|
|
@ -92,9 +79,6 @@ public class GamesPGXServiceImpl implements IGamesService {
|
|||
@Resource
|
||||
private IGameBettingDetailsService gameBettingDetailsService;
|
||||
|
||||
@Resource
|
||||
private IGameNameService gameNameService;
|
||||
|
||||
|
||||
/**
|
||||
* 获得就是成功
|
||||
|
|
@ -158,11 +142,12 @@ public class GamesPGXServiceImpl implements IGamesService {
|
|||
@Override
|
||||
public MemberInfoResponseDTO getMemberInfo(MemberInfoRequestDTO memberInfoRequestDTO) {
|
||||
log.info("GamesPGXServiceImpl [getMemberInfo] 请求参数 {}", memberInfoRequestDTO);
|
||||
GameSecretKey gameSecretKey = gameSecretKeyService.selectGameSecretKeyByCode(memberInfoRequestDTO.getAgentId());
|
||||
// GameSecretKey gameSecretKey = gameSecretKeyService.selectGameSecretKeyByCode(memberInfoRequestDTO.getAgentId());
|
||||
Map<String, Object> params = new LinkedHashMap<>();
|
||||
params.put("operatorcode", memberInfoRequestDTO.getAgentId());
|
||||
params.put("password", gameSecretKey.getPassword());
|
||||
params.put("providercode", gameSecretKey.getProviderCode());
|
||||
KeyInfo keyInfo = memberInfoRequestDTO.getKeyInfo();
|
||||
params.put("password", keyInfo.getPassword());
|
||||
params.put("providercode", keyInfo.getProviderCode());
|
||||
params.put("username", memberInfoRequestDTO.getAccounts());
|
||||
String key = this.getKey(params, memberInfoRequestDTO);
|
||||
params.put("signature", key);
|
||||
|
|
@ -189,11 +174,13 @@ public class GamesPGXServiceImpl implements IGamesService {
|
|||
@Override
|
||||
public String loginWithoutRedirect(GamesLogin gamesLogin) {
|
||||
log.info("GamesPGXServiceImpl [loginWithoutRedirect] 请求参数 {}", gamesLogin);
|
||||
GameSecretKey gameSecretKey = gameSecretKeyService.selectGameSecretKeyByCode(gamesLogin.getAgentId());
|
||||
// GameSecretKey gameSecretKey = gameSecretKeyService.selectGameSecretKeyByCode(gamesLogin.getAgentId());
|
||||
KeyInfo keyInfo = gamesLogin.getKeyInfo();
|
||||
|
||||
Map<String, Object> params = new LinkedHashMap<>();
|
||||
params.put("operatorcode", gamesLogin.getAgentId());
|
||||
params.put("password", gameSecretKey.getPassword());
|
||||
params.put("providercode", gameSecretKey.getProviderCode());
|
||||
params.put("password", keyInfo.getPassword());
|
||||
params.put("providercode", keyInfo.getProviderCode());
|
||||
params.put("type", gamesLogin.getGameType());
|
||||
params.put("username", gamesLogin.getAccount());
|
||||
String key = this.getKey(params, gamesLogin);
|
||||
|
|
@ -226,10 +213,11 @@ public class GamesPGXServiceImpl implements IGamesService {
|
|||
return CacheConstants.PGX_GAMES;
|
||||
}
|
||||
|
||||
GameSecretKey gameSecretKey = gameSecretKeyService.selectGameSecretKeyByCode(gamesBaseRequestDTO.getAgentId());
|
||||
// GameSecretKey gameSecretKey = gameSecretKeyService.selectGameSecretKeyByCode(gamesBaseRequestDTO.getAgentId());
|
||||
KeyInfo keyInfo = gamesBaseRequestDTO.getKeyInfo();
|
||||
Map<String, Object> params = new LinkedHashMap<>();
|
||||
params.put("operatorcode", gamesBaseRequestDTO.getAgentId());
|
||||
params.put("providercode", gameSecretKey.getProviderCode());
|
||||
params.put("providercode", keyInfo.getProviderCode());
|
||||
String key = this.getKey(params, gamesBaseRequestDTO);
|
||||
//没有中文
|
||||
params.put("html5", 1);
|
||||
|
|
@ -242,7 +230,7 @@ public class GamesPGXServiceImpl implements IGamesService {
|
|||
|
||||
List<PGXGameListResponse.Game> gameLists = JSON.parseArray(gameList.getGamelist(), PGXGameListResponse.Game.class);
|
||||
for (PGXGameListResponse.Game gamesDataDTO : gameLists) {
|
||||
GamePlatform gamePlatform = GamePlatform.builder()
|
||||
/* GamePlatform gamePlatform = GamePlatform.builder()
|
||||
.platformType(GPXGameType.SL.getSystemCode())
|
||||
.platformCode(GamePlatforms.PGX.getInfo())
|
||||
.build();
|
||||
|
|
@ -255,25 +243,33 @@ public class GamesPGXServiceImpl implements IGamesService {
|
|||
gamePlatformService.insertGamePlatform(gamePlatform);
|
||||
} else {
|
||||
gamePlatform = gamePlatforms.get(0);
|
||||
}
|
||||
}*/
|
||||
Integer platformType = GPXGameType.findSystemByCode(gamesDataDTO.getGameCode());
|
||||
Game game = Game.builder()
|
||||
.platformId(gamePlatform.getId())
|
||||
//.platformId(gamePlatform.getId())
|
||||
.gameCode(gamesDataDTO.getGameId())
|
||||
.platformCode(GamePlatforms.PGX.getCode())
|
||||
.platformType(platformType)
|
||||
.build();
|
||||
List<Game> games = gameService.selectGameList(game);
|
||||
//不存在这个游戏
|
||||
if (CollectionUtils.isEmpty(games)) {
|
||||
game.setGameSourceType(GPXGameType.SL.getCode());
|
||||
game.setFreespin(Boolean.FALSE);
|
||||
game.setSortNo(gameService.selectMaxSortNoByPlatformId(gamePlatform.getId()) + 1);
|
||||
game.setSortNo(gameService.selectMaxSortNo(platformType, GamePlatforms.PGX.getCode()) + 1);
|
||||
game.setGameName(gamesDataDTO.getGameName());
|
||||
game.setCreateBy(Constants.SYSTEM);
|
||||
game.setPlatformCode(GamePlatforms.PGX.getCode());
|
||||
game.setPlatformType(platformType);
|
||||
List<NameInfo> nameInfos = new ArrayList<>();
|
||||
nameInfos.add(new NameInfo(gamesDataDTO.getGameName(), "en-US"));
|
||||
game.setNameInfo(nameInfos);
|
||||
gameService.insertGame(game);
|
||||
} else {
|
||||
game = games.get(0);
|
||||
}
|
||||
gamesDataDTO.setSystemGameId(game.getId());
|
||||
List<GameName> gameNames = gameNameService.selectGameNameList(GameName.builder().gameId(game.getId()).gameName(game.getGameName()).build());
|
||||
/*List<GameName> gameNames = gameNameService.selectGameNameList(GameName.builder().gameId(game.getId()).gameName(game.getGameName()).build());
|
||||
if (CollectionUtils.isEmpty(gameNames)) {
|
||||
gameNameService.insertGameName(GameName.builder()
|
||||
.gameId(game.getId())
|
||||
|
|
@ -281,7 +277,7 @@ public class GamesPGXServiceImpl implements IGamesService {
|
|||
.langCode("en-US")
|
||||
.createBy(Constants.SYSTEM)
|
||||
.build());
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -307,11 +303,11 @@ public class GamesPGXServiceImpl implements IGamesService {
|
|||
public Long exchangeTransferByAgentId(ExchangeTransferMoneyRequestDTO exchangeTransferMoneyRequestDTO) {
|
||||
log.info("GamesPGXServiceImpl [exchangeTransferByAgentId] 请求参数 {}", exchangeTransferMoneyRequestDTO);
|
||||
|
||||
GameSecretKeyCurrency currencyDTO = gameSecretKeyCurrencyService.findByGameSecretKeyCurrencyDTO(GameSecretKeyCurrencyDTO.builder()
|
||||
.platformCode(GamePlatforms.PGX.getInfo())
|
||||
.code(exchangeTransferMoneyRequestDTO.getAgentId())
|
||||
.currency(exchangeTransferMoneyRequestDTO.getCurrency())
|
||||
.build());
|
||||
// GameSecretKeyCurrency currencyDTO = gameSecretKeyCurrencyService.findByGameSecretKeyCurrencyDTO(GameSecretKeyCurrencyDTO.builder()
|
||||
// .platformCode(GamePlatforms.PGX.getInfo())
|
||||
// .code(exchangeTransferMoneyRequestDTO.getAgentId())
|
||||
// .currency(exchangeTransferMoneyRequestDTO.getCurrency())
|
||||
// .build());
|
||||
|
||||
Member member = memberService.selectMemberByGameAccount(exchangeTransferMoneyRequestDTO.getAccount());
|
||||
String transactionId = gameExchangeMoneyService.getTransactionId(GamePlatforms.PGX.getInfo(), 17);
|
||||
|
|
@ -323,7 +319,7 @@ public class GamesPGXServiceImpl implements IGamesService {
|
|||
);
|
||||
Assert.isTrue(CollectionUtils.isEmpty(gameExchangeMonies), "订单号重复");
|
||||
|
||||
GameSecretKey gameSecretKey = gameSecretKeyService.selectGameSecretKeyByCode(exchangeTransferMoneyRequestDTO.getAgentId());
|
||||
// GameSecretKey gameSecretKey = gameSecretKeyService.selectGameSecretKeyByCode(exchangeTransferMoneyRequestDTO.getAgentId());
|
||||
|
||||
//获取下一个自增id
|
||||
GameExchangeMoney exchangeMoney = GameExchangeMoney
|
||||
|
|
@ -333,7 +329,7 @@ public class GamesPGXServiceImpl implements IGamesService {
|
|||
.quota(exchangeTransferMoneyRequestDTO.getQuota())
|
||||
.balance(exchangeTransferMoneyRequestDTO.getAmount())
|
||||
.exchangeType(exchangeTransferMoneyRequestDTO.getTransferType())
|
||||
.currencyCode(currencyDTO.getSystemCurrency())
|
||||
.currencyCode(exchangeTransferMoneyRequestDTO.getSystemCurrency())
|
||||
.memberId(member.getId())
|
||||
.transactionId(transactionId)
|
||||
.platformCode(GamePlatforms.PGX.getInfo())
|
||||
|
|
@ -362,11 +358,12 @@ public class GamesPGXServiceImpl implements IGamesService {
|
|||
}
|
||||
|
||||
|
||||
KeyInfo keyInfo = exchangeTransferMoneyRequestDTO.getKeyInfo();
|
||||
Map<String, Object> paramsMap = new LinkedHashMap<>();
|
||||
paramsMap.put("amount", amount);
|
||||
paramsMap.put("operatorcode", exchangeTransferMoneyRequestDTO.getAgentId());
|
||||
paramsMap.put("password", gameSecretKey.getPassword());
|
||||
paramsMap.put("providercode", gameSecretKey.getProviderCode());
|
||||
paramsMap.put("password", keyInfo.getPassword());
|
||||
paramsMap.put("providercode", keyInfo.getProviderCode());
|
||||
paramsMap.put("referenceid", transactionId);
|
||||
paramsMap.put("type", type);
|
||||
paramsMap.put("username", exchangeTransferMoneyRequestDTO.getAccount());
|
||||
|
|
@ -392,8 +389,8 @@ public class GamesPGXServiceImpl implements IGamesService {
|
|||
ExchangeTransferStatusRequestDTO exchangeTransferStatusRequestDTO = new ExchangeTransferStatusRequestDTO();
|
||||
exchangeTransferStatusRequestDTO.setAccount(member.getGameAccount());
|
||||
exchangeTransferStatusRequestDTO.setOrderId(exchangeMoney.getTransactionId());
|
||||
exchangeTransferStatusRequestDTO.setAgentId(gameSecretKey.getCode());
|
||||
exchangeTransferStatusRequestDTO.setAgentKey(gameSecretKey.getKey());
|
||||
exchangeTransferStatusRequestDTO.setAgentId(keyInfo.getCode());
|
||||
exchangeTransferStatusRequestDTO.setAgentKey(keyInfo.getKey());
|
||||
this.exchangeTransferStatus(exchangeTransferStatusRequestDTO);
|
||||
} else {
|
||||
log.error("GamesFCServiceImpl [exchangeTransferByAgentId] 金额转移失败,错误代码{}", errorResponse.getErrCode());
|
||||
|
|
@ -576,13 +573,17 @@ public class GamesPGXServiceImpl implements IGamesService {
|
|||
*
|
||||
* @param dataBean 数据bean
|
||||
*/
|
||||
private void batchInsert(List<PGXBetHistoryResponse.Result> dataBean, GamesBaseRequestDTO gamesBaseRequestDTO) {
|
||||
private void batchInsert(List<PGXBetHistoryResponse.Result> dataBean, BetRecordByTimeDTO gamesBaseRequestDTO) {
|
||||
List<GameBettingDetails> gameBettingDetails = new ArrayList<>();
|
||||
List<String> wagersIds = new ArrayList<>();
|
||||
|
||||
//数据转化
|
||||
for (PGXBetHistoryResponse.Result bean : dataBean) {
|
||||
GameBettingDetails bettingDetails = this.dataBuild(GamesDataBuildDTO.builder().agentId(gamesBaseRequestDTO.getAgentId()).data(bean).build());
|
||||
GameBettingDetails bettingDetails = this.dataBuild(GamesDataBuildDTO.builder()
|
||||
.currencyCode(gamesBaseRequestDTO.getCurrency())
|
||||
.systemCurrencyCode(gamesBaseRequestDTO.getSystemCurrency())
|
||||
.agentId(gamesBaseRequestDTO.getAgentId())
|
||||
.data(bean).build());
|
||||
if (!ObjectUtils.isEmpty(bettingDetails)) {
|
||||
bettingDetails.setId(IdUtil.getSnowflakeNextId());
|
||||
gameBettingDetails.add(bettingDetails);
|
||||
|
|
@ -591,7 +592,7 @@ public class GamesPGXServiceImpl implements IGamesService {
|
|||
}
|
||||
if (!CollectionUtils.isEmpty(gameBettingDetails)) {
|
||||
//查询重复数据id
|
||||
List<String> removeWagersIds = gameBettingDetailsService.selectGameBettingDetailsByWagersId(wagersIds,GamePlatforms.PGX.getInfo());
|
||||
List<String> removeWagersIds = gameBettingDetailsService.selectGameBettingDetailsByWagersId(wagersIds, GamePlatforms.PGX.getInfo());
|
||||
//用steam流清除list中与wagersIds集合相同的数据
|
||||
gameBettingDetails = gameBettingDetails.stream()
|
||||
.filter(detail -> !removeWagersIds.contains(detail.getWagersId()))
|
||||
|
|
@ -622,10 +623,10 @@ public class GamesPGXServiceImpl implements IGamesService {
|
|||
//转化类
|
||||
PGXBetHistoryResponse.Result resultBean = (PGXBetHistoryResponse.Result) gamesDataBuildDTO.getData();
|
||||
|
||||
GameSecretKeyCurrency currencyDTO = gameSecretKeyCurrencyService.findByGameSecretKeyCurrencyDTO(GameSecretKeyCurrencyDTO.builder()
|
||||
.platformCode(GamePlatforms.PGX.getInfo())
|
||||
.code(gamesDataBuildDTO.getAgentId())
|
||||
.build());
|
||||
// GameSecretKeyCurrency currencyDTO = gameSecretKeyCurrencyService.findByGameSecretKeyCurrencyDTO(GameSecretKeyCurrencyDTO.builder()
|
||||
// .platformCode(GamePlatforms.PGX.getInfo())
|
||||
// .code(gamesDataBuildDTO.getAgentId())
|
||||
// .build());
|
||||
|
||||
Member member = memberService.selectMemberByGameAccount(resultBean.getMember());
|
||||
if (ObjectUtils.isEmpty(member)) {
|
||||
|
|
@ -651,17 +652,17 @@ public class GamesPGXServiceImpl implements IGamesService {
|
|||
GameBettingDetails gameBettingDetails = GameBettingDetails.builder()
|
||||
.tenantKey(member.getTenantKey())
|
||||
//保存我们的币种id
|
||||
.currencyCode(currencyDTO.getSystemCurrency())
|
||||
.currencyCode(/*currencyDTO.getSystemCurrency()*/gamesDataBuildDTO.getSystemCurrencyCode())
|
||||
.memberId(member.getId())
|
||||
.gameCode(resultBean.getGameId())
|
||||
.gameType(GPXGameType.SL.getSystemCode())
|
||||
.platformCode(GamePlatforms.PGX.getInfo())
|
||||
.platformCode(GamePlatforms.PGX.getCode())
|
||||
.gameId(gamesDataDTO.getSystemGameId())
|
||||
.gameName(gamesDataDTO.getGameName())
|
||||
.gameStatus(gameStatus)
|
||||
.gameStatusType(1)
|
||||
.betContent(resultBean.getBetDetail())
|
||||
.gameCurrencyCode(currencyDTO.getCurrency())
|
||||
.gameCurrencyCode(/*currencyDTO.getCurrency()*/gamesDataBuildDTO.getCurrencyCode())
|
||||
.account(resultBean.getMember())
|
||||
.wagersId(String.valueOf(resultBean.getId()))
|
||||
.wagersTime(resultBean.getStartTime().getTime())
|
||||
|
|
|
|||
|
|
@ -5,23 +5,20 @@ import cn.hutool.core.util.NumberUtil;
|
|||
import com.ff.base.constant.CacheConstants;
|
||||
import com.ff.base.constant.ConfigConstants;
|
||||
import com.ff.base.constant.Constants;
|
||||
import com.ff.base.core.redis.RedisCache;
|
||||
import com.ff.base.enums.*;
|
||||
import com.ff.base.exception.base.ApiException;
|
||||
import com.ff.base.exception.base.BaseException;
|
||||
import com.ff.base.system.service.ISysConfigService;
|
||||
import com.ff.base.utils.*;
|
||||
import com.ff.base.utils.sign.Md5Utils;
|
||||
import com.ff.base.utils.uuid.IdUtils;
|
||||
import com.ff.config.KeyConfig;
|
||||
import com.ff.game.api.IGamesService;
|
||||
import com.ff.game.api.request.*;
|
||||
import com.ff.game.api.sa.client.SAClient;
|
||||
import com.ff.game.api.sa.dto.*;
|
||||
import com.ff.game.api.xk.dto.*;
|
||||
import com.ff.game.domain.*;
|
||||
import com.ff.game.dto.GameSecretKeyCurrencyDTO;
|
||||
import com.ff.game.service.*;
|
||||
import com.ff.game.service.IGameBettingDetailsService;
|
||||
import com.ff.game.service.IGameExchangeMoneyService;
|
||||
import com.ff.game.service.IGameService;
|
||||
import com.ff.member.domain.Member;
|
||||
import com.ff.member.service.IMemberService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
|
@ -33,8 +30,10 @@ import org.springframework.util.ObjectUtils;
|
|||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
|
|
@ -52,17 +51,9 @@ public class GamesSAServiceImpl implements IGamesService {
|
|||
@Resource
|
||||
private ISysConfigService configService;
|
||||
|
||||
@Resource
|
||||
private RedisCache redisCache;
|
||||
|
||||
@Resource
|
||||
private IGameExchangeMoneyService gameExchangeMoneyService;
|
||||
|
||||
|
||||
@Resource
|
||||
private IGamePlatformService gamePlatformService;
|
||||
|
||||
|
||||
@Resource
|
||||
private IGameService gameService;
|
||||
|
||||
|
|
@ -70,14 +61,6 @@ public class GamesSAServiceImpl implements IGamesService {
|
|||
@Resource
|
||||
private IMemberService memberService;
|
||||
|
||||
@Resource
|
||||
private IGameFreeRecordService gameFreeRecordService;
|
||||
@Resource
|
||||
private IGameSecretKeyService gameSecretKeyService;
|
||||
|
||||
@Resource
|
||||
private IGameSecretKeyCurrencyService gameSecretKeyCurrencyService;
|
||||
|
||||
@Resource
|
||||
private SAClient SAClient;
|
||||
|
||||
|
|
@ -88,9 +71,6 @@ public class GamesSAServiceImpl implements IGamesService {
|
|||
@Resource
|
||||
private IGameBettingDetailsService gameBettingDetailsService;
|
||||
|
||||
@Resource
|
||||
private IGameNameService gameNameService;
|
||||
|
||||
/**
|
||||
* 游戏id
|
||||
*/
|
||||
|
|
@ -241,9 +221,9 @@ public class GamesSAServiceImpl implements IGamesService {
|
|||
@Transactional
|
||||
@Override
|
||||
public String getGameList(GamesBaseRequestDTO gamesBaseRequestDTO) {
|
||||
GamePlatform gamePlatform = gamePlatformService.selectGamePlatformById(PLATFORM_ID);
|
||||
// GamePlatform gamePlatform = gamePlatformService.selectGamePlatformById(PLATFORM_ID);
|
||||
//没有此平台就新增一个平台
|
||||
if (ObjectUtils.isEmpty(gamePlatform)) {
|
||||
/*if (ObjectUtils.isEmpty(gamePlatform)) {
|
||||
gamePlatform = new GamePlatform();
|
||||
gamePlatform.setId(PLATFORM_ID);
|
||||
gamePlatform.setPlatformCode(GamePlatforms.SA.getInfo());
|
||||
|
|
@ -252,30 +232,36 @@ public class GamesSAServiceImpl implements IGamesService {
|
|||
gamePlatform.setSortNo(gamePlatformService.selectMaxSortNo() + 1);
|
||||
gamePlatform.setCreateBy(Constants.SYSTEM);
|
||||
gamePlatformService.insertGamePlatform(gamePlatform);
|
||||
}
|
||||
}*/
|
||||
Game game = gameService.selectGameById(GAME_ID);
|
||||
Integer platformType = PlatformType.CARD_GAME.getCode();
|
||||
//不存在这个游戏
|
||||
if (ObjectUtils.isEmpty(game)) {
|
||||
game = new Game();
|
||||
game.setId(GAME_ID);
|
||||
game.setSortNo(gameService.selectMaxSortNoByPlatformId(gamePlatform.getId()) + 1);
|
||||
game.setPlatformId(gamePlatform.getId());
|
||||
game.setSortNo(gameService.selectMaxSortNo(platformType, GamePlatforms.SA.getCode()) + 1);
|
||||
//game.setPlatformId(gamePlatform.getId());
|
||||
game.setPlatformCode(GamePlatforms.SA.getCode());
|
||||
game.setPlatformType(platformType);
|
||||
game.setGameCode("1");
|
||||
game.setGameSourceType(String.valueOf(1));
|
||||
game.setGameName("真人棋牌");
|
||||
game.setCreateBy(Constants.SYSTEM);
|
||||
List<NameInfo> nameInfos = new ArrayList<>();
|
||||
nameInfos.add(new NameInfo("真人棋牌", "zh-CN"));
|
||||
game.setNameInfo(nameInfos);
|
||||
gameService.insertGame(game);
|
||||
}
|
||||
GameName gameName = gameNameService.selectGameNameById(GAME_NAME_ID);
|
||||
if (ObjectUtils.isEmpty(gameName)) {
|
||||
// GameName gameName = gameNameService.selectGameNameById(GAME_NAME_ID);
|
||||
/*if (ObjectUtils.isEmpty(gameName)) {
|
||||
gameNameService.insertGameName(GameName.builder()
|
||||
.id(GAME_NAME_ID)
|
||||
.id(GAME_NAME_ID)
|
||||
.gameId(game.getId())
|
||||
.gameName(game.getGameName())
|
||||
.langCode("zh-CN")
|
||||
.createBy(Constants.SYSTEM)
|
||||
.build());
|
||||
}
|
||||
}*/
|
||||
return CacheConstants.SA_GAMES;
|
||||
}
|
||||
|
||||
|
|
@ -289,10 +275,10 @@ public class GamesSAServiceImpl implements IGamesService {
|
|||
@Transactional
|
||||
public Long exchangeTransferByAgentId(ExchangeTransferMoneyRequestDTO exchangeTransferMoneyRequestDTO) {
|
||||
log.info("GamesSAServiceImpl [exchangeTransferByAgentId] 请求参数 {}", exchangeTransferMoneyRequestDTO);
|
||||
GameSecretKeyCurrency currencyDTO = gameSecretKeyCurrencyService.findByGameSecretKeyCurrencyDTO(GameSecretKeyCurrencyDTO.builder()
|
||||
.platformCode(GamePlatforms.SA.getInfo())
|
||||
.code(exchangeTransferMoneyRequestDTO.getAgentId())
|
||||
.build());
|
||||
// GameSecretKeyCurrency currencyDTO = gameSecretKeyCurrencyService.findByGameSecretKeyCurrencyDTO(GameSecretKeyCurrencyDTO.builder()
|
||||
// .platformCode(GamePlatforms.SA.getInfo())
|
||||
// .code(exchangeTransferMoneyRequestDTO.getAgentId())
|
||||
// .build());
|
||||
|
||||
Member member = memberService.selectMemberByGameAccount(exchangeTransferMoneyRequestDTO.getAccount());
|
||||
|
||||
|
|
@ -318,7 +304,7 @@ public class GamesSAServiceImpl implements IGamesService {
|
|||
.quota(exchangeTransferMoneyRequestDTO.getQuota())
|
||||
.balance(exchangeTransferMoneyRequestDTO.getAmount())
|
||||
.exchangeType(exchangeTransferMoneyRequestDTO.getTransferType())
|
||||
.currencyCode(currencyDTO.getSystemCurrency())
|
||||
.currencyCode(exchangeTransferMoneyRequestDTO.getSystemCurrency())
|
||||
.memberId(member.getId())
|
||||
.transactionId(transactionId)
|
||||
.platformCode(GamePlatforms.SA.getInfo())
|
||||
|
|
@ -355,7 +341,7 @@ public class GamesSAServiceImpl implements IGamesService {
|
|||
params.put("Username", exchangeTransferMoneyRequestDTO.getAccount());
|
||||
params.put("OrderId", exchangeMoney.getTransactionId());
|
||||
params.put("CreditAmount", exchangeTransferMoneyRequestDTO.getAmount().stripTrailingZeros().toPlainString());
|
||||
params.put("CurrencyType", currencyDTO.getCurrency());
|
||||
params.put("CurrencyType", exchangeTransferMoneyRequestDTO.getCurrency());
|
||||
String query = JsonUtil.mapToQueryString(params);
|
||||
exchangeTransferMoneyRequestDTO.setQuery(query);
|
||||
String key = this.getKey(exchangeTransferMoneyRequestDTO, "CreditBalanceDV");
|
||||
|
|
@ -424,7 +410,7 @@ public class GamesSAServiceImpl implements IGamesService {
|
|||
//判断是否获取成功
|
||||
if (this.getIsSuccess(errorCode)) {
|
||||
//数据组装
|
||||
this.batchInsert(saGetAllBetDetailsResponse);
|
||||
this.batchInsert(saGetAllBetDetailsResponse, betRecordByTimeDTO);
|
||||
|
||||
return Boolean.TRUE;
|
||||
} else {
|
||||
|
|
@ -541,14 +527,17 @@ public class GamesSAServiceImpl implements IGamesService {
|
|||
*
|
||||
* @param saGetAllBetDetailsResponse sa获取所有投注详细信息响应
|
||||
*/
|
||||
private void batchInsert(SAGetAllBetDetailsResponse saGetAllBetDetailsResponse) {
|
||||
private void batchInsert(SAGetAllBetDetailsResponse saGetAllBetDetailsResponse, BetRecordByTimeDTO betRecordByTimeDTO) {
|
||||
List<GameBettingDetails> gameBettingDetails = new ArrayList<>();
|
||||
List<String> wagersIds = new ArrayList<>();
|
||||
//数据组装
|
||||
List<SAGetAllBetDetailsResponse.BetDetail> result = saGetAllBetDetailsResponse.getBetDetailList();
|
||||
//数据转化
|
||||
for (SAGetAllBetDetailsResponse.BetDetail bean : result) {
|
||||
GameBettingDetails bettingDetails = this.dataBuild(GamesDataBuildDTO.builder().data(bean).build());
|
||||
GameBettingDetails bettingDetails = this.dataBuild(GamesDataBuildDTO.builder()
|
||||
.platform(betRecordByTimeDTO.getVendor())
|
||||
.data(bean)
|
||||
.build());
|
||||
if (!ObjectUtils.isEmpty(bettingDetails)) {
|
||||
bettingDetails.setId(IdUtil.getSnowflakeNextId());
|
||||
gameBettingDetails.add(bettingDetails);
|
||||
|
|
@ -557,7 +546,7 @@ public class GamesSAServiceImpl implements IGamesService {
|
|||
}
|
||||
if (!CollectionUtils.isEmpty(gameBettingDetails)) {
|
||||
//查询重复数据id
|
||||
List<String> removeWagersIds = gameBettingDetailsService.selectGameBettingDetailsByWagersId(wagersIds,GamePlatforms.SA.getInfo());
|
||||
List<String> removeWagersIds = gameBettingDetailsService.selectGameBettingDetailsByWagersId(wagersIds, GamePlatforms.SA.getInfo());
|
||||
//用steam流清除list中与wagersIds集合相同的数据
|
||||
gameBettingDetails = gameBettingDetails.stream()
|
||||
.filter(detail -> !removeWagersIds.contains(detail.getWagersId()))
|
||||
|
|
@ -580,10 +569,10 @@ public class GamesSAServiceImpl implements IGamesService {
|
|||
//转化类
|
||||
SAGetAllBetDetailsResponse.BetDetail resultBean = (SAGetAllBetDetailsResponse.BetDetail) gamesDataBuildDTO.getData();
|
||||
|
||||
GameSecretKeyCurrency currencyDTO = gameSecretKeyCurrencyService.findByGameSecretKeyCurrencyDTO(GameSecretKeyCurrencyDTO.builder()
|
||||
.platformCode(GamePlatforms.SA.getInfo())
|
||||
.currency(resultBean.getCurrency())
|
||||
.build());
|
||||
// GameSecretKeyCurrency currencyDTO = gameSecretKeyCurrencyService.findByGameSecretKeyCurrencyDTO(GameSecretKeyCurrencyDTO.builder()
|
||||
// .platformCode(GamePlatforms.SA.getInfo())
|
||||
// .currency(resultBean.getCurrency())
|
||||
// .build());
|
||||
|
||||
Member member = memberService.selectMemberByGameAccount(resultBean.getUsername());
|
||||
if (ObjectUtils.isEmpty(member)) {
|
||||
|
|
@ -602,11 +591,12 @@ public class GamesSAServiceImpl implements IGamesService {
|
|||
}
|
||||
|
||||
|
||||
String systemCurrency = gamesDataBuildDTO.getPlatform().getOurCurrency(resultBean.getCurrency());
|
||||
//数据构造
|
||||
GameBettingDetails gameBettingDetails = GameBettingDetails.builder()
|
||||
.tenantKey(member.getTenantKey())
|
||||
//保存我们的币种id
|
||||
.currencyCode(currencyDTO.getSystemCurrency())
|
||||
.currencyCode(systemCurrency)
|
||||
.memberId(member.getId())
|
||||
.gameCode(resultBean.getGameID())
|
||||
.gameType(PlatformType.CARD_GAME.getCode())
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import com.ff.base.core.redis.RedisCache;
|
|||
import com.ff.base.enums.*;
|
||||
import com.ff.base.exception.base.ApiException;
|
||||
import com.ff.base.exception.base.BaseException;
|
||||
import com.ff.base.system.service.ISysConfigService;
|
||||
import com.ff.base.utils.DateUtils;
|
||||
import com.ff.base.utils.JsonUtil;
|
||||
import com.ff.base.utils.sign.Md5Utils;
|
||||
|
|
@ -19,8 +18,9 @@ import com.ff.game.api.request.*;
|
|||
import com.ff.game.api.xk.client.XKClient;
|
||||
import com.ff.game.api.xk.dto.*;
|
||||
import com.ff.game.domain.*;
|
||||
import com.ff.game.dto.GameSecretKeyCurrencyDTO;
|
||||
import com.ff.game.service.*;
|
||||
import com.ff.game.service.IGameBettingDetailsService;
|
||||
import com.ff.game.service.IGameExchangeMoneyService;
|
||||
import com.ff.game.service.IGameService;
|
||||
import com.ff.member.domain.Member;
|
||||
import com.ff.member.service.IMemberService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
|
@ -47,49 +47,27 @@ import java.util.stream.Collectors;
|
|||
@Slf4j
|
||||
public class GamesXKServiceImpl implements IGamesService {
|
||||
|
||||
|
||||
@Resource
|
||||
private ISysConfigService configService;
|
||||
|
||||
@Resource
|
||||
private RedisCache redisCache;
|
||||
|
||||
@Resource
|
||||
private IGameExchangeMoneyService gameExchangeMoneyService;
|
||||
|
||||
|
||||
@Resource
|
||||
private IGamePlatformService gamePlatformService;
|
||||
|
||||
|
||||
@Resource
|
||||
private IGameService gameService;
|
||||
|
||||
|
||||
@Resource
|
||||
private IMemberService memberService;
|
||||
|
||||
@Resource
|
||||
private IGameFreeRecordService gameFreeRecordService;
|
||||
@Resource
|
||||
private IGameSecretKeyService gameSecretKeyService;
|
||||
|
||||
@Resource
|
||||
private IGameSecretKeyCurrencyService gameSecretKeyCurrencyService;
|
||||
|
||||
@Resource
|
||||
private XKClient xkClient;
|
||||
|
||||
|
||||
@Resource
|
||||
private KeyConfig keyConfig;
|
||||
|
||||
@Resource
|
||||
private IGameBettingDetailsService gameBettingDetailsService;
|
||||
|
||||
@Resource
|
||||
private IGameNameService gameNameService;
|
||||
|
||||
|
||||
/**
|
||||
* 获得就是成功
|
||||
|
|
@ -248,7 +226,7 @@ public class GamesXKServiceImpl implements IGamesService {
|
|||
if (this.getIsSuccess(xkGamesDTO.getCode())) {
|
||||
|
||||
for (XKGamesDTO.DataBean gamesDataDTO : xkGamesDTO.getData()) {
|
||||
GamePlatform gamePlatform = GamePlatform.builder()
|
||||
/*GamePlatform gamePlatform = GamePlatform.builder()
|
||||
.platformType(XKGameType.findSystemByCode(gamesDataDTO.getGameCategoryId()))
|
||||
.platformCode(GamePlatforms.XK.getCode())
|
||||
.build();
|
||||
|
|
@ -261,9 +239,12 @@ public class GamesXKServiceImpl implements IGamesService {
|
|||
gamePlatformService.insertGamePlatform(gamePlatform);
|
||||
} else {
|
||||
gamePlatform = gamePlatforms.get(0);
|
||||
}
|
||||
}*/
|
||||
Integer platformType = XKGameType.findSystemByCode(gamesDataDTO.getGameCategoryId());
|
||||
Game game = Game.builder()
|
||||
.platformId(gamePlatform.getId())
|
||||
//.platformId(gamePlatform.getId())
|
||||
.platformCode(GamePlatforms.XK.getCode())
|
||||
.platformType(platformType)
|
||||
.gameCode(String.valueOf(gamesDataDTO.getGameId()))
|
||||
.build();
|
||||
List<Game> games = gameService.selectGameList(game);
|
||||
|
|
@ -271,24 +252,30 @@ public class GamesXKServiceImpl implements IGamesService {
|
|||
if (CollectionUtils.isEmpty(games)) {
|
||||
game.setGameSourceType(String.valueOf(gamesDataDTO.getGameCategoryId()));
|
||||
game.setFreespin(gamesDataDTO.isFreeSpin());
|
||||
game.setSortNo(gameService.selectMaxSortNoByPlatformId(gamePlatform.getId()) + 1);
|
||||
game.setSortNo(gameService.selectMaxSortNo(platformType, GamePlatforms.XK.getCode()) + 1);
|
||||
game.setPlatformCode(GamePlatforms.XK.getCode());
|
||||
game.setPlatformType(platformType);
|
||||
game.setGameName(gamesDataDTO.getName());
|
||||
game.setCreateBy(Constants.SYSTEM);
|
||||
|
||||
List<NameInfo> nameInfos = new ArrayList<>();
|
||||
nameInfos.add(new NameInfo(gamesDataDTO.getName(), "zh-CN"));
|
||||
game.setNameInfo(nameInfos);
|
||||
|
||||
gameService.insertGame(game);
|
||||
} else {
|
||||
game = games.get(0);
|
||||
}
|
||||
gamesDataDTO.setSystemGameId(game.getId());
|
||||
List<GameName> gameNames = gameNameService.selectGameNameList(GameName.builder().gameId(game.getId()).gameName(game.getGameName()).build());
|
||||
if (CollectionUtils.isEmpty(gameNames)){
|
||||
/*List<GameName> gameNames = gameNameService.selectGameNameList(GameName.builder().gameId(game.getId()).gameName(game.getGameName()).build());
|
||||
if (CollectionUtils.isEmpty(gameNames)) {
|
||||
gameNameService.insertGameName(GameName.builder()
|
||||
.gameId(game.getId())
|
||||
.gameName(game.getGameName())
|
||||
.langCode("zh-CN")
|
||||
.createBy(Constants.SYSTEM)
|
||||
.build());
|
||||
}
|
||||
|
||||
}*/
|
||||
}
|
||||
|
||||
redisCache.deleteObject(CacheConstants.XK_GAMES);
|
||||
|
|
@ -312,10 +299,10 @@ public class GamesXKServiceImpl implements IGamesService {
|
|||
@Transactional
|
||||
public Long exchangeTransferByAgentId(ExchangeTransferMoneyRequestDTO exchangeTransferMoneyRequestDTO) {
|
||||
log.info("GamesXKServiceImpl [exchangeTransferByAgentId] 请求参数 {}", exchangeTransferMoneyRequestDTO);
|
||||
GameSecretKeyCurrency currencyDTO = gameSecretKeyCurrencyService.findByGameSecretKeyCurrencyDTO(GameSecretKeyCurrencyDTO.builder()
|
||||
.platformCode(GamePlatforms.XK.getInfo())
|
||||
.code(exchangeTransferMoneyRequestDTO.getAgentId())
|
||||
.build());
|
||||
// GameSecretKeyCurrency currencyDTO = gameSecretKeyCurrencyService.findByGameSecretKeyCurrencyDTO(GameSecretKeyCurrencyDTO.builder()
|
||||
// .platformCode(GamePlatforms.XK.getInfo())
|
||||
// .code(exchangeTransferMoneyRequestDTO.getAgentId())
|
||||
// .build());
|
||||
|
||||
Member member = memberService.selectMemberByGameAccount(exchangeTransferMoneyRequestDTO.getAccount());
|
||||
String transactionId = GamePlatforms.XK.getCode() + IdUtils.simpleUUID();
|
||||
|
|
@ -335,7 +322,7 @@ public class GamesXKServiceImpl implements IGamesService {
|
|||
.quota(exchangeTransferMoneyRequestDTO.getQuota())
|
||||
.balance(exchangeTransferMoneyRequestDTO.getAmount())
|
||||
.exchangeType(exchangeTransferMoneyRequestDTO.getTransferType())
|
||||
.currencyCode(currencyDTO.getSystemCurrency())
|
||||
.currencyCode(exchangeTransferMoneyRequestDTO.getSystemCurrency())
|
||||
.memberId(member.getId())
|
||||
.transactionId(transactionId)
|
||||
.platformCode(GamePlatforms.XK.getCode())
|
||||
|
|
@ -395,7 +382,7 @@ public class GamesXKServiceImpl implements IGamesService {
|
|||
*/
|
||||
@Override
|
||||
public Boolean getBetRecordByTime(BetRecordByTimeDTO betRecordByTimeDTO) {
|
||||
List<GameBettingDetails> gameBettingDetails = new ArrayList<>();
|
||||
// List<GameBettingDetails> gameBettingDetails = new ArrayList<>();
|
||||
//请求参数
|
||||
log.info("GamesXKServiceImpl [getBetRecordByTime] 请求参数 {}", betRecordByTimeDTO);
|
||||
Map<String, Object> params = new LinkedHashMap<>();
|
||||
|
|
@ -414,7 +401,7 @@ public class GamesXKServiceImpl implements IGamesService {
|
|||
if (this.getIsSuccess(xkBetRecordResponseDTO.getCode())) {
|
||||
//数据组装
|
||||
XKBetRecordResponseDTO.DataBean dataBean = xkBetRecordResponseDTO.getData();
|
||||
this.batchInsert(xkBetRecordResponseDTO);
|
||||
this.batchInsert(xkBetRecordResponseDTO, betRecordByTimeDTO);
|
||||
|
||||
//获取下一页数据
|
||||
while (!Objects.equals(dataBean.getCurrentPage(), dataBean.getTotalPages()) && dataBean.getTotalPages() > 0) {
|
||||
|
|
@ -432,7 +419,7 @@ public class GamesXKServiceImpl implements IGamesService {
|
|||
params.put("key", key);
|
||||
xkBetRecordResponseDTO = xkClient.getBetRecordByTime(params);
|
||||
dataBean = xkBetRecordResponseDTO.getData();
|
||||
this.batchInsert(xkBetRecordResponseDTO);
|
||||
this.batchInsert(xkBetRecordResponseDTO, betRecordByTimeDTO);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -463,7 +450,7 @@ public class GamesXKServiceImpl implements IGamesService {
|
|||
*/
|
||||
@Override
|
||||
public Boolean createFreeSpin(CreateFreeSpinRequestDTO createFreeSpinRequest) {
|
||||
throw new ApiException(ErrorCode.PLATFORM_NOT_METHODS.getCode());
|
||||
throw new ApiException(ErrorCode.PLATFORM_NOT_METHODS.getCode());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -474,7 +461,7 @@ public class GamesXKServiceImpl implements IGamesService {
|
|||
*/
|
||||
@Override
|
||||
public GetGameDetailResponseDTO getGameDetail(GetGameDetailRequestDTO getGameDetailRequestDTO) {
|
||||
throw new ApiException(ErrorCode.PLATFORM_NOT_METHODS.getCode());
|
||||
throw new ApiException(ErrorCode.PLATFORM_NOT_METHODS.getCode());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -510,7 +497,7 @@ public class GamesXKServiceImpl implements IGamesService {
|
|||
*/
|
||||
@Override
|
||||
public Boolean kickMemberAll(KickMemberAllDTO kickMemberAllDTO) {
|
||||
throw new ApiException(ErrorCode.PLATFORM_NOT_METHODS.getCode());
|
||||
throw new ApiException(ErrorCode.PLATFORM_NOT_METHODS.getCode());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -521,7 +508,7 @@ public class GamesXKServiceImpl implements IGamesService {
|
|||
*/
|
||||
@Override
|
||||
public List<GameFreeRecord> getFreeSpinDashflow(GetFreeSpinDashflowRequestDTO getFreeSpinDashflowRequestDTO) {
|
||||
throw new ApiException(ErrorCode.PLATFORM_NOT_METHODS.getCode());
|
||||
throw new ApiException(ErrorCode.PLATFORM_NOT_METHODS.getCode());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -532,8 +519,9 @@ public class GamesXKServiceImpl implements IGamesService {
|
|||
*/
|
||||
@Override
|
||||
public Boolean cancelFreeSpin(CancelFreeSpinRequestDTO cancelFreeSpinRequestDTO) {
|
||||
throw new ApiException(ErrorCode.PLATFORM_NOT_METHODS.getCode());
|
||||
throw new ApiException(ErrorCode.PLATFORM_NOT_METHODS.getCode());
|
||||
}
|
||||
|
||||
/**
|
||||
* 游戏演示登录
|
||||
*
|
||||
|
|
@ -546,20 +534,24 @@ public class GamesXKServiceImpl implements IGamesService {
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 批量插入
|
||||
*
|
||||
* @param xkBetRecordResponseDTO xk下注记录响应dto
|
||||
*/
|
||||
private void batchInsert(XKBetRecordResponseDTO xkBetRecordResponseDTO) {
|
||||
private void batchInsert(XKBetRecordResponseDTO xkBetRecordResponseDTO, BetRecordByTimeDTO betRecordByTimeDTO) {
|
||||
List<GameBettingDetails> gameBettingDetails = new ArrayList<>();
|
||||
List<String> wagersIds = new ArrayList<>();
|
||||
//数据组装
|
||||
XKBetRecordResponseDTO.DataBean dataBean = xkBetRecordResponseDTO.getData();
|
||||
//数据转化
|
||||
for (XKBetRecordResponseDTO.DataBean.ResultBean bean : dataBean.getResult()) {
|
||||
GameBettingDetails bettingDetails = this.dataBuild(GamesDataBuildDTO.builder().data(bean).build());
|
||||
GameBettingDetails bettingDetails = this.dataBuild(GamesDataBuildDTO.builder()
|
||||
.platform(betRecordByTimeDTO.getVendor())
|
||||
.systemCurrencyCode(betRecordByTimeDTO.getSystemCurrency())
|
||||
.currencyCode(betRecordByTimeDTO.getCurrency())
|
||||
.data(bean)
|
||||
.build());
|
||||
if (!ObjectUtils.isEmpty(bettingDetails)) {
|
||||
bettingDetails.setId(IdUtil.getSnowflakeNextId());
|
||||
gameBettingDetails.add(bettingDetails);
|
||||
|
|
@ -568,7 +560,7 @@ public class GamesXKServiceImpl implements IGamesService {
|
|||
}
|
||||
if (!CollectionUtils.isEmpty(gameBettingDetails)) {
|
||||
//查询重复数据id
|
||||
List<String> removeWagersIds = gameBettingDetailsService.selectGameBettingDetailsByWagersId(wagersIds,GamePlatforms.XK.getInfo());
|
||||
List<String> removeWagersIds = gameBettingDetailsService.selectGameBettingDetailsByWagersId(wagersIds, GamePlatforms.XK.getInfo());
|
||||
//用steam流清除list中与wagersIds集合相同的数据
|
||||
gameBettingDetails = gameBettingDetails.stream()
|
||||
.filter(detail -> !removeWagersIds.contains(detail.getWagersId()))
|
||||
|
|
@ -591,10 +583,10 @@ public class GamesXKServiceImpl implements IGamesService {
|
|||
//转化类
|
||||
XKBetRecordResponseDTO.DataBean.ResultBean resultBean = (XKBetRecordResponseDTO.DataBean.ResultBean) gamesDataBuildDTO.getData();
|
||||
|
||||
GameSecretKeyCurrency currencyDTO = gameSecretKeyCurrencyService.findByGameSecretKeyCurrencyDTO(GameSecretKeyCurrencyDTO.builder()
|
||||
.platformCode(GamePlatforms.XK.getInfo())
|
||||
.code(resultBean.getAgentId())
|
||||
.build());
|
||||
// GameSecretKeyCurrency currencyDTO = gameSecretKeyCurrencyService.findByGameSecretKeyCurrencyDTO(GameSecretKeyCurrencyDTO.builder()
|
||||
// .platformCode(GamePlatforms.XK.getInfo())
|
||||
// .code(resultBean.getAgentId())
|
||||
// .build());
|
||||
|
||||
Member member = memberService.selectMemberByGameAccount(resultBean.getAccount());
|
||||
if (ObjectUtils.isEmpty(member)) {
|
||||
|
|
@ -614,7 +606,7 @@ public class GamesXKServiceImpl implements IGamesService {
|
|||
GameBettingDetails gameBettingDetails = GameBettingDetails.builder()
|
||||
.tenantKey(member.getTenantKey())
|
||||
//保存我们的币种id
|
||||
.currencyCode(currencyDTO.getSystemCurrency())
|
||||
.currencyCode(gamesDataBuildDTO.getSystemCurrencyCode())
|
||||
.memberId(member.getId())
|
||||
.gameCode(resultBean.getGameId())
|
||||
.gameType(XKGameType.findSystemByCode(resultBean.getGameCategoryId()))
|
||||
|
|
|
|||
|
|
@ -1,27 +1,11 @@
|
|||
package com.ff.game.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ff.base.enums.GamePlatforms;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ff.base.annotation.Log;
|
||||
import com.ff.base.core.controller.BaseController;
|
||||
import com.ff.base.core.domain.AjaxResult;
|
||||
import com.ff.base.enums.BusinessType;
|
||||
import com.ff.game.domain.GamePlatform;
|
||||
import com.ff.game.service.IGamePlatformService;
|
||||
import com.ff.base.utils.poi.ExcelUtil;
|
||||
import com.ff.base.core.page.TableDataInfo;
|
||||
import com.ff.base.enums.GamePlatforms;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 平台管理Controller
|
||||
|
|
@ -32,19 +16,7 @@ import com.ff.base.core.page.TableDataInfo;
|
|||
@RestController
|
||||
@RequestMapping("/game/platform")
|
||||
public class GamePlatformController extends BaseController {
|
||||
@Autowired
|
||||
private IGamePlatformService gamePlatformService;
|
||||
|
||||
/**
|
||||
* 查询平台管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('game:platform:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(GamePlatform gamePlatform) {
|
||||
startPage();
|
||||
List<GamePlatform> list = gamePlatformService.selectGamePlatformList(gamePlatform);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 选择
|
||||
|
|
@ -56,54 +28,4 @@ public class GamePlatformController extends BaseController {
|
|||
return AjaxResult.success(GamePlatforms.getCodes());
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出平台管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('game:platform:export')")
|
||||
@Log(title = "平台管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, GamePlatform gamePlatform) {
|
||||
List<GamePlatform> list = gamePlatformService.selectGamePlatformList(gamePlatform);
|
||||
ExcelUtil<GamePlatform> util = new ExcelUtil<GamePlatform>(GamePlatform.class);
|
||||
util.exportExcel(response, list, "平台管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取平台管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('game:platform:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(gamePlatformService.selectGamePlatformById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增平台管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('game:platform:add')")
|
||||
@Log(title = "平台管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody GamePlatform gamePlatform) {
|
||||
return toAjax(gamePlatformService.insertGamePlatform(gamePlatform));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改平台管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('game:platform:edit')")
|
||||
@Log(title = "平台管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody GamePlatform gamePlatform) {
|
||||
return toAjax(gamePlatformService.updateGamePlatform(gamePlatform));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除平台管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('game:platform:remove')")
|
||||
@Log(title = "平台管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(gamePlatformService.deleteGamePlatformByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,104 +0,0 @@
|
|||
package com.ff.game.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ff.base.annotation.Log;
|
||||
import com.ff.base.core.controller.BaseController;
|
||||
import com.ff.base.core.domain.AjaxResult;
|
||||
import com.ff.base.enums.BusinessType;
|
||||
import com.ff.game.domain.GameSecretKey;
|
||||
import com.ff.game.service.IGameSecretKeyService;
|
||||
import com.ff.base.utils.poi.ExcelUtil;
|
||||
import com.ff.base.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 游戏平台密钥管理Controller
|
||||
*
|
||||
* @author shi
|
||||
* @date 2025-02-10
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/game/key")
|
||||
public class GameSecretKeyController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IGameSecretKeyService gameSecretKeyService;
|
||||
|
||||
/**
|
||||
* 查询游戏平台密钥管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('game:key:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(GameSecretKey gameSecretKey)
|
||||
{
|
||||
startPage();
|
||||
List<GameSecretKey> list = gameSecretKeyService.selectGameSecretKeyList(gameSecretKey);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出游戏平台密钥管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('game:key:export')")
|
||||
@Log(title = "游戏平台密钥管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, GameSecretKey gameSecretKey)
|
||||
{
|
||||
List<GameSecretKey> list = gameSecretKeyService.selectGameSecretKeyList(gameSecretKey);
|
||||
ExcelUtil<GameSecretKey> util = new ExcelUtil<GameSecretKey>(GameSecretKey.class);
|
||||
util.exportExcel(response, list, "游戏平台密钥管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取游戏平台密钥管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('game:key:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(gameSecretKeyService.selectGameSecretKeyById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增游戏平台密钥管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('game:key:add')")
|
||||
@Log(title = "游戏平台密钥管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody GameSecretKey gameSecretKey)
|
||||
{
|
||||
return toAjax(gameSecretKeyService.insertGameSecretKey(gameSecretKey));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改游戏平台密钥管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('game:key:edit')")
|
||||
@Log(title = "游戏平台密钥管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody GameSecretKey gameSecretKey)
|
||||
{
|
||||
return toAjax(gameSecretKeyService.updateGameSecretKey(gameSecretKey));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除游戏平台密钥管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('game:key:remove')")
|
||||
@Log(title = "游戏平台密钥管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(gameSecretKeyService.deleteGameSecretKeyByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
package com.ff.game.domain;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.ff.base.annotation.Excel;
|
||||
import com.ff.base.core.domain.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 平台子游戏名称管理对象 ff_game_name
|
||||
*
|
||||
* @author shi
|
||||
* @date 2025-03-13
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
public class GameName extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 游戏id
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Excel(name = "游戏id", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Long gameId;
|
||||
|
||||
/**
|
||||
* 游戏名称
|
||||
*/
|
||||
@Excel(name = "游戏名称")
|
||||
private String gameName;
|
||||
|
||||
/**
|
||||
* 语言代码
|
||||
*/
|
||||
@Excel(name = "语言代码")
|
||||
private String langCode;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
package com.ff.game.domain;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.ff.base.annotation.Excel;
|
||||
import com.ff.base.core.domain.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 平台管理对象 ff_game_platform
|
||||
*
|
||||
* @author shi
|
||||
* @date 2025-02-10
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
public class GamePlatform extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键id */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/** 排序 */
|
||||
@Excel(name = "排序")
|
||||
private Integer sortNo;
|
||||
|
||||
/** 平台编码 */
|
||||
@Excel(name = "平台编码")
|
||||
private String platformCode;
|
||||
|
||||
/** 平台类型 ff_game_platform_type 字典 */
|
||||
@Excel(name = "平台类型 ff_game_platform_type 字典")
|
||||
private Integer platformType;
|
||||
|
||||
/** 平台名称 */
|
||||
@Excel(name = "平台名称")
|
||||
private String platformName;
|
||||
|
||||
/** 维护开关 维护状态 */
|
||||
@Excel(name = "维护开关 维护状态 ")
|
||||
private Boolean stopStatus;
|
||||
|
||||
/** 平台开关 平台开关状态 */
|
||||
@Excel(name = "平台开关 平台开关状态 ")
|
||||
private Boolean platformStatus;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
package com.ff.game.domain;
|
||||
|
||||
import com.ff.base.annotation.Excel;
|
||||
import com.ff.base.core.domain.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 游戏平台密钥管理对象 ff_game_secret_key
|
||||
*
|
||||
* @author shi
|
||||
* @date 2025-03-13
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
public class GameSecretKey extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 平台 */
|
||||
@Excel(name = "平台")
|
||||
private String platform;
|
||||
|
||||
/**
|
||||
* 供应商号
|
||||
*/
|
||||
private String providerCode;
|
||||
|
||||
/**
|
||||
* 供应商号密码
|
||||
*/
|
||||
private String password;
|
||||
|
||||
/** 代码 */
|
||||
@Excel(name = "代码")
|
||||
private String code;
|
||||
|
||||
/** 密钥 */
|
||||
@Excel(name = "密钥")
|
||||
private String key;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
package com.ff.game.domain;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.ff.base.annotation.Excel;
|
||||
import com.ff.base.core.domain.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 游戏平台币种管理对象 ff_game_secret_key_currency
|
||||
*
|
||||
* @author shi
|
||||
* @date 2025-03-13
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class GameSecretKeyCurrency extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 平台
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Excel(name = "平台", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Long gameSecretKeyId;
|
||||
|
||||
/**
|
||||
* 货币id
|
||||
*/
|
||||
private String currencyId;
|
||||
/**
|
||||
* 币种
|
||||
*/
|
||||
@Excel(name = "币种")
|
||||
private String currency;
|
||||
|
||||
/**
|
||||
* 系统代码
|
||||
*/
|
||||
@Excel(name = "系统代码")
|
||||
private String systemCurrency;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
package com.ff.game.domain;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.ff.base.annotation.Excel;
|
||||
import com.ff.base.core.domain.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 游戏平台语言管理对象 ff_game_secret_key_lang
|
||||
*
|
||||
* @author shi
|
||||
* @date 2025-03-13
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
public class GameSecretKeyLang extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 平台 */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Excel(name = "平台", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Long gameSecretKeyId;
|
||||
|
||||
/** 语言 */
|
||||
@Excel(name = "语言")
|
||||
private String lang;
|
||||
|
||||
/** 系统语种id */
|
||||
@Excel(name = "系统语种id")
|
||||
private String systemLangCode;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
package com.ff.game.dto;
|
||||
|
||||
import com.ff.game.domain.GameName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
public class GameNameDTO extends GameName {
|
||||
/**
|
||||
* 平台代码
|
||||
*/
|
||||
private String platformCode;
|
||||
|
||||
/**
|
||||
* 默认名称
|
||||
*/
|
||||
private String defaultName;
|
||||
|
||||
/**
|
||||
* 游戏代码
|
||||
*/
|
||||
private String gameCode;
|
||||
}
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
package com.ff.game.dto;
|
||||
|
||||
import com.ff.game.domain.GameSecretKeyCurrency;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 游戏密钥货币dto
|
||||
*
|
||||
* @author shi
|
||||
* @date 2025/03/13
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class GameSecretKeyCurrencyDTO extends GameSecretKeyCurrency {
|
||||
|
||||
/**
|
||||
* 平台
|
||||
*/
|
||||
private String platformCode;
|
||||
|
||||
|
||||
/**
|
||||
* 平台代码
|
||||
*/
|
||||
private List<String> platformCodes;
|
||||
|
||||
/**
|
||||
* API code
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 游戏密钥id
|
||||
*/
|
||||
private Long gameSecretKeyId;
|
||||
|
||||
/**
|
||||
* 密钥
|
||||
*/
|
||||
private String key;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
package com.ff.game.dto;
|
||||
|
||||
import com.ff.game.domain.GameSecretKey;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 游戏密钥dto
|
||||
*
|
||||
* @author shi
|
||||
* @date 2025/03/12
|
||||
*/
|
||||
@Data
|
||||
public class GameSecretKeyDTO extends GameSecretKey {
|
||||
/**
|
||||
* 平台
|
||||
*/
|
||||
private List<String> platforms;
|
||||
}
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
package com.ff.game.dto;
|
||||
|
||||
import com.ff.game.domain.GameSecretKeyLang;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 游戏密钥lang dto
|
||||
*
|
||||
* @author shi
|
||||
* @date 2025/03/13
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
public class GameSecretKeyLangDTO extends GameSecretKeyLang {
|
||||
|
||||
/**
|
||||
* 平台
|
||||
*/
|
||||
private String platformCode;
|
||||
|
||||
/**
|
||||
* API code
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 游戏密钥id
|
||||
*/
|
||||
private Long gameSecretKeyId;
|
||||
|
||||
/**
|
||||
* 密钥
|
||||
*/
|
||||
private String key;
|
||||
|
||||
}
|
||||
|
|
@ -1,72 +0,0 @@
|
|||
package com.ff.game.mapper;
|
||||
|
||||
import com.ff.game.domain.GameName;
|
||||
import com.ff.game.dto.GameDTO;
|
||||
import com.ff.game.dto.GameNameDTO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 平台子游戏名称管理Mapper接口
|
||||
*
|
||||
* @author shi
|
||||
* @date 2025-03-13
|
||||
*/
|
||||
public interface GameNameMapper
|
||||
{
|
||||
/**
|
||||
* 查询平台子游戏名称管理
|
||||
*
|
||||
* @param id 平台子游戏名称管理主键
|
||||
* @return 平台子游戏名称管理
|
||||
*/
|
||||
GameName selectGameNameById(Long id);
|
||||
|
||||
/**
|
||||
* 查询平台子游戏名称管理列表
|
||||
*
|
||||
* @param gameName 平台子游戏名称管理
|
||||
* @return 平台子游戏名称管理集合
|
||||
*/
|
||||
List<GameName> selectGameNameList(GameName gameName);
|
||||
|
||||
/**
|
||||
* 新增平台子游戏名称管理
|
||||
*
|
||||
* @param gameName 平台子游戏名称管理
|
||||
* @return 结果
|
||||
*/
|
||||
int insertGameName(GameName gameName);
|
||||
|
||||
/**
|
||||
* 修改平台子游戏名称管理
|
||||
*
|
||||
* @param gameName 平台子游戏名称管理
|
||||
* @return 结果
|
||||
*/
|
||||
int updateGameName(GameName gameName);
|
||||
|
||||
/**
|
||||
* 删除平台子游戏名称管理
|
||||
*
|
||||
* @param id 平台子游戏名称管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteGameNameById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除平台子游戏名称管理
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteGameNameByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 选择游戏名称数据列表
|
||||
*
|
||||
* @param gameNameDTO 游戏dto
|
||||
* @return {@link List }<{@link GameDTO }>
|
||||
*/
|
||||
List<GameDTO> selectGameNameDTOList(GameNameDTO gameNameDTO);
|
||||
}
|
||||
|
|
@ -1,70 +0,0 @@
|
|||
package com.ff.game.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ff.game.domain.GamePlatform;
|
||||
|
||||
/**
|
||||
* 平台管理Mapper接口
|
||||
*
|
||||
* @author shi
|
||||
* @date 2025-02-10
|
||||
*/
|
||||
public interface GamePlatformMapper
|
||||
{
|
||||
/**
|
||||
* 查询平台管理
|
||||
*
|
||||
* @param id 平台管理主键
|
||||
* @return 平台管理
|
||||
*/
|
||||
GamePlatform selectGamePlatformById(Long id);
|
||||
|
||||
/**
|
||||
* 查询平台管理列表
|
||||
*
|
||||
* @param gamePlatform 平台管理
|
||||
* @return 平台管理集合
|
||||
*/
|
||||
List<GamePlatform> selectGamePlatformList(GamePlatform gamePlatform);
|
||||
|
||||
/**
|
||||
* 新增平台管理
|
||||
*
|
||||
* @param gamePlatform 平台管理
|
||||
* @return 结果
|
||||
*/
|
||||
int insertGamePlatform(GamePlatform gamePlatform);
|
||||
|
||||
/**
|
||||
* 修改平台管理
|
||||
*
|
||||
* @param gamePlatform 平台管理
|
||||
* @return 结果
|
||||
*/
|
||||
int updateGamePlatform(GamePlatform gamePlatform);
|
||||
|
||||
/**
|
||||
* 删除平台管理
|
||||
*
|
||||
* @param id 平台管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteGamePlatformById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除平台管理
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteGamePlatformByIds(Long[] ids);
|
||||
|
||||
|
||||
/**
|
||||
* 选择最大排序号
|
||||
*
|
||||
* @return {@link Integer }
|
||||
*/
|
||||
Integer selectMaxSortNo();
|
||||
|
||||
}
|
||||
|
|
@ -1,79 +0,0 @@
|
|||
package com.ff.game.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ff.game.domain.GameSecretKeyCurrency;
|
||||
import com.ff.game.dto.GameSecretKeyCurrencyDTO;
|
||||
|
||||
/**
|
||||
* 游戏平台币种管理Mapper接口
|
||||
*
|
||||
* @author shi
|
||||
* @date 2025-03-13
|
||||
*/
|
||||
public interface GameSecretKeyCurrencyMapper
|
||||
{
|
||||
/**
|
||||
* 查询游戏平台币种管理
|
||||
*
|
||||
* @param id 游戏平台币种管理主键
|
||||
* @return 游戏平台币种管理
|
||||
*/
|
||||
GameSecretKeyCurrency selectGameSecretKeyCurrencyById(Long id);
|
||||
|
||||
/**
|
||||
* 查询游戏平台币种管理列表
|
||||
*
|
||||
* @param gameSecretKeyCurrency 游戏平台币种管理
|
||||
* @return 游戏平台币种管理集合
|
||||
*/
|
||||
List<GameSecretKeyCurrency> selectGameSecretKeyCurrencyList(GameSecretKeyCurrency gameSecretKeyCurrency);
|
||||
|
||||
/**
|
||||
* 新增游戏平台币种管理
|
||||
*
|
||||
* @param gameSecretKeyCurrency 游戏平台币种管理
|
||||
* @return 结果
|
||||
*/
|
||||
int insertGameSecretKeyCurrency(GameSecretKeyCurrency gameSecretKeyCurrency);
|
||||
|
||||
/**
|
||||
* 修改游戏平台币种管理
|
||||
*
|
||||
* @param gameSecretKeyCurrency 游戏平台币种管理
|
||||
* @return 结果
|
||||
*/
|
||||
int updateGameSecretKeyCurrency(GameSecretKeyCurrency gameSecretKeyCurrency);
|
||||
|
||||
/**
|
||||
* 删除游戏平台币种管理
|
||||
*
|
||||
* @param id 游戏平台币种管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteGameSecretKeyCurrencyById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除游戏平台币种管理
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteGameSecretKeyCurrencyByIds(Long[] ids);
|
||||
|
||||
|
||||
/**
|
||||
* 按游戏找到密钥货币dto
|
||||
*
|
||||
* @param gameSecretKeyCurrencyDTO 游戏密钥货币dto
|
||||
* @return {@link GameSecretKeyCurrencyDTO }
|
||||
*/
|
||||
GameSecretKeyCurrencyDTO findByGameSecretKeyCurrencyDTO(GameSecretKeyCurrencyDTO gameSecretKeyCurrencyDTO);
|
||||
|
||||
/**
|
||||
* 按游戏查找密钥货币数据列表
|
||||
*
|
||||
* @param gameSecretKeyCurrencyDTO 游戏密钥货币dto
|
||||
* @return {@link List }<{@link GameSecretKeyCurrencyDTO }>
|
||||
*/
|
||||
List<GameSecretKeyCurrencyDTO> findByGameSecretKeyCurrencyDTOList(GameSecretKeyCurrencyDTO gameSecretKeyCurrencyDTO);
|
||||
}
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
package com.ff.game.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ff.game.domain.GameSecretKeyLang;
|
||||
import com.ff.game.dto.GameSecretKeyCurrencyDTO;
|
||||
import com.ff.game.dto.GameSecretKeyLangDTO;
|
||||
|
||||
/**
|
||||
* 游戏平台语言管理Mapper接口
|
||||
*
|
||||
* @author shi
|
||||
* @date 2025-03-13
|
||||
*/
|
||||
public interface GameSecretKeyLangMapper
|
||||
{
|
||||
/**
|
||||
* 查询游戏平台语言管理
|
||||
*
|
||||
* @param id 游戏平台语言管理主键
|
||||
* @return 游戏平台语言管理
|
||||
*/
|
||||
GameSecretKeyLang selectGameSecretKeyLangById(Long id);
|
||||
|
||||
/**
|
||||
* 查询游戏平台语言管理列表
|
||||
*
|
||||
* @param gameSecretKeyLang 游戏平台语言管理
|
||||
* @return 游戏平台语言管理集合
|
||||
*/
|
||||
List<GameSecretKeyLang> selectGameSecretKeyLangList(GameSecretKeyLang gameSecretKeyLang);
|
||||
|
||||
/**
|
||||
* 新增游戏平台语言管理
|
||||
*
|
||||
* @param gameSecretKeyLang 游戏平台语言管理
|
||||
* @return 结果
|
||||
*/
|
||||
int insertGameSecretKeyLang(GameSecretKeyLang gameSecretKeyLang);
|
||||
|
||||
/**
|
||||
* 修改游戏平台语言管理
|
||||
*
|
||||
* @param gameSecretKeyLang 游戏平台语言管理
|
||||
* @return 结果
|
||||
*/
|
||||
int updateGameSecretKeyLang(GameSecretKeyLang gameSecretKeyLang);
|
||||
|
||||
/**
|
||||
* 删除游戏平台语言管理
|
||||
*
|
||||
* @param id 游戏平台语言管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteGameSecretKeyLangById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除游戏平台语言管理
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteGameSecretKeyLangByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 查找游戏密钥货币dto
|
||||
*
|
||||
* @param gameSecretKeyLangDTO 游戏密钥货币dto
|
||||
* @return {@link GameSecretKeyLangDTO }
|
||||
*/
|
||||
GameSecretKeyLangDTO findGameSecretKeyLangDTO(GameSecretKeyLangDTO gameSecretKeyLangDTO);
|
||||
}
|
||||
|
|
@ -1,72 +0,0 @@
|
|||
package com.ff.game.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ff.game.domain.GameSecretKey;
|
||||
|
||||
/**
|
||||
* 游戏平台密钥管理Mapper接口
|
||||
*
|
||||
* @author shi
|
||||
* @date 2025-03-13
|
||||
*/
|
||||
public interface GameSecretKeyMapper
|
||||
{
|
||||
/**
|
||||
* 查询游戏平台密钥管理
|
||||
*
|
||||
* @param id 游戏平台密钥管理主键
|
||||
* @return 游戏平台密钥管理
|
||||
*/
|
||||
GameSecretKey selectGameSecretKeyById(Long id);
|
||||
|
||||
/**
|
||||
* 查询游戏平台密钥管理列表
|
||||
*
|
||||
* @param gameSecretKey 游戏平台密钥管理
|
||||
* @return 游戏平台密钥管理集合
|
||||
*/
|
||||
List<GameSecretKey> selectGameSecretKeyList(GameSecretKey gameSecretKey);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 按代码选择游戏密钥
|
||||
*
|
||||
* @param code 代码
|
||||
* @return {@link GameSecretKey }
|
||||
*/
|
||||
GameSecretKey selectGameSecretKeyByCode(String code);
|
||||
|
||||
|
||||
/**
|
||||
* 新增游戏平台密钥管理
|
||||
*
|
||||
* @param gameSecretKey 游戏平台密钥管理
|
||||
* @return 结果
|
||||
*/
|
||||
int insertGameSecretKey(GameSecretKey gameSecretKey);
|
||||
|
||||
/**
|
||||
* 修改游戏平台密钥管理
|
||||
*
|
||||
* @param gameSecretKey 游戏平台密钥管理
|
||||
* @return 结果
|
||||
*/
|
||||
int updateGameSecretKey(GameSecretKey gameSecretKey);
|
||||
|
||||
/**
|
||||
* 删除游戏平台密钥管理
|
||||
*
|
||||
* @param id 游戏平台密钥管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteGameSecretKeyById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除游戏平台密钥管理
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteGameSecretKeyByIds(Long[] ids);
|
||||
}
|
||||
|
|
@ -1,74 +0,0 @@
|
|||
package com.ff.game.service;
|
||||
|
||||
import com.ff.game.domain.GameName;
|
||||
import com.ff.game.dto.GameDTO;
|
||||
import com.ff.game.dto.GameNameDTO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 平台子游戏名称管理Service接口
|
||||
*
|
||||
* @author shi
|
||||
* @date 2025-03-13
|
||||
*/
|
||||
public interface IGameNameService
|
||||
{
|
||||
/**
|
||||
* 查询平台子游戏名称管理
|
||||
*
|
||||
* @param id 平台子游戏名称管理主键
|
||||
* @return 平台子游戏名称管理
|
||||
*/
|
||||
GameName selectGameNameById(Long id);
|
||||
|
||||
/**
|
||||
* 查询平台子游戏名称管理列表
|
||||
*
|
||||
* @param gameName 平台子游戏名称管理
|
||||
* @return 平台子游戏名称管理集合
|
||||
*/
|
||||
List<GameName> selectGameNameList(GameName gameName);
|
||||
|
||||
/**
|
||||
* 新增平台子游戏名称管理
|
||||
*
|
||||
* @param gameName 平台子游戏名称管理
|
||||
* @return 结果
|
||||
*/
|
||||
int insertGameName(GameName gameName);
|
||||
|
||||
/**
|
||||
* 修改平台子游戏名称管理
|
||||
*
|
||||
* @param gameName 平台子游戏名称管理
|
||||
* @return 结果
|
||||
*/
|
||||
int updateGameName(GameName gameName);
|
||||
|
||||
/**
|
||||
* 批量删除平台子游戏名称管理
|
||||
*
|
||||
* @param ids 需要删除的平台子游戏名称管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteGameNameByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除平台子游戏名称管理信息
|
||||
*
|
||||
* @param id 平台子游戏名称管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteGameNameById(Long id);
|
||||
|
||||
/**
|
||||
* 选择游戏名称数据列表
|
||||
*
|
||||
* @param gameNameDTO 游戏dto
|
||||
* @return {@link List }<{@link GameDTO }>
|
||||
*/
|
||||
List<GameDTO> selectGameNameDTOList(GameNameDTO gameNameDTO);
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
package com.ff.game.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ff.game.domain.GamePlatform;
|
||||
|
||||
/**
|
||||
* 平台管理Service接口
|
||||
*
|
||||
* @author shi
|
||||
* @date 2025-02-10
|
||||
*/
|
||||
public interface IGamePlatformService
|
||||
{
|
||||
/**
|
||||
* 查询平台管理
|
||||
*
|
||||
* @param id 平台管理主键
|
||||
* @return 平台管理
|
||||
*/
|
||||
GamePlatform selectGamePlatformById(Long id);
|
||||
|
||||
/**
|
||||
* 查询平台管理列表
|
||||
*
|
||||
* @param gamePlatform 平台管理
|
||||
* @return 平台管理集合
|
||||
*/
|
||||
List<GamePlatform> selectGamePlatformList(GamePlatform gamePlatform);
|
||||
|
||||
/**
|
||||
* 新增平台管理
|
||||
*
|
||||
* @param gamePlatform 平台管理
|
||||
* @return 结果
|
||||
*/
|
||||
int insertGamePlatform(GamePlatform gamePlatform);
|
||||
|
||||
/**
|
||||
* 修改平台管理
|
||||
*
|
||||
* @param gamePlatform 平台管理
|
||||
* @return 结果
|
||||
*/
|
||||
int updateGamePlatform(GamePlatform gamePlatform);
|
||||
|
||||
/**
|
||||
* 批量删除平台管理
|
||||
*
|
||||
* @param ids 需要删除的平台管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteGamePlatformByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除平台管理信息
|
||||
*
|
||||
* @param id 平台管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteGamePlatformById(Long id);
|
||||
|
||||
|
||||
/**
|
||||
* 选择最大排序号
|
||||
*
|
||||
* @return {@link Integer }
|
||||
*/
|
||||
Integer selectMaxSortNo();
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,86 +0,0 @@
|
|||
package com.ff.game.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ff.game.domain.GameName;
|
||||
import com.ff.game.domain.GameSecretKey;
|
||||
import com.ff.game.domain.GameSecretKeyCurrency;
|
||||
import com.ff.game.dto.GameSecretKeyCurrencyDTO;
|
||||
import com.ff.game.dto.GameSecretKeyDTO;
|
||||
|
||||
/**
|
||||
* 游戏平台币种管理Service接口
|
||||
*
|
||||
* @author shi
|
||||
* @date 2025-03-13
|
||||
*/
|
||||
public interface IGameSecretKeyCurrencyService
|
||||
{
|
||||
/**
|
||||
* 查询游戏平台币种管理
|
||||
*
|
||||
* @param id 游戏平台币种管理主键
|
||||
* @return 游戏平台币种管理
|
||||
*/
|
||||
GameSecretKeyCurrency selectGameSecretKeyCurrencyById(Long id);
|
||||
|
||||
/**
|
||||
* 查询游戏平台币种管理列表
|
||||
*
|
||||
* @param gameSecretKeyCurrency 游戏平台币种管理
|
||||
* @return 游戏平台币种管理集合
|
||||
*/
|
||||
List<GameSecretKeyCurrency> selectGameSecretKeyCurrencyList(GameSecretKeyCurrency gameSecretKeyCurrency);
|
||||
|
||||
/**
|
||||
* 新增游戏平台币种管理
|
||||
*
|
||||
* @param gameSecretKeyCurrency 游戏平台币种管理
|
||||
* @return 结果
|
||||
*/
|
||||
int insertGameSecretKeyCurrency(GameSecretKeyCurrency gameSecretKeyCurrency);
|
||||
|
||||
/**
|
||||
* 修改游戏平台币种管理
|
||||
*
|
||||
* @param gameSecretKeyCurrency 游戏平台币种管理
|
||||
* @return 结果
|
||||
*/
|
||||
int updateGameSecretKeyCurrency(GameSecretKeyCurrency gameSecretKeyCurrency);
|
||||
|
||||
/**
|
||||
* 批量删除游戏平台币种管理
|
||||
*
|
||||
* @param ids 需要删除的游戏平台币种管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteGameSecretKeyCurrencyByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除游戏平台币种管理信息
|
||||
*
|
||||
* @param id 游戏平台币种管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteGameSecretKeyCurrencyById(Long id);
|
||||
|
||||
/**
|
||||
* 按游戏找到密钥货币dto
|
||||
*
|
||||
* @param gameSecretKeyCurrencyDTO 游戏密钥货币dto
|
||||
* @return {@link GameSecretKeyCurrencyDTO }
|
||||
*/
|
||||
GameSecretKeyCurrencyDTO findByGameSecretKeyCurrencyDTO(GameSecretKeyCurrencyDTO gameSecretKeyCurrencyDTO);
|
||||
|
||||
|
||||
/**
|
||||
* 按游戏查找密钥货币数据列表
|
||||
*
|
||||
* @param gameSecretKeyCurrencyDTO 游戏密钥货币dto
|
||||
* @return {@link List }<{@link GameSecretKeyCurrencyDTO }>
|
||||
*/
|
||||
List<GameSecretKeyCurrencyDTO> findByGameSecretKeyCurrencyDTOList(GameSecretKeyCurrencyDTO gameSecretKeyCurrencyDTO);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,72 +0,0 @@
|
|||
package com.ff.game.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ff.game.domain.GameSecretKeyLang;
|
||||
import com.ff.game.dto.GameSecretKeyCurrencyDTO;
|
||||
import com.ff.game.dto.GameSecretKeyDTO;
|
||||
import com.ff.game.dto.GameSecretKeyLangDTO;
|
||||
|
||||
/**
|
||||
* 游戏平台语言管理Service接口
|
||||
*
|
||||
* @author shi
|
||||
* @date 2025-03-13
|
||||
*/
|
||||
public interface IGameSecretKeyLangService {
|
||||
/**
|
||||
* 查询游戏平台语言管理
|
||||
*
|
||||
* @param id 游戏平台语言管理主键
|
||||
* @return 游戏平台语言管理
|
||||
*/
|
||||
GameSecretKeyLang selectGameSecretKeyLangById(Long id);
|
||||
|
||||
/**
|
||||
* 查询游戏平台语言管理列表
|
||||
*
|
||||
* @param gameSecretKeyLang 游戏平台语言管理
|
||||
* @return 游戏平台语言管理集合
|
||||
*/
|
||||
List<GameSecretKeyLang> selectGameSecretKeyLangList(GameSecretKeyLang gameSecretKeyLang);
|
||||
|
||||
/**
|
||||
* 新增游戏平台语言管理
|
||||
*
|
||||
* @param gameSecretKeyLang 游戏平台语言管理
|
||||
* @return 结果
|
||||
*/
|
||||
int insertGameSecretKeyLang(GameSecretKeyLang gameSecretKeyLang);
|
||||
|
||||
/**
|
||||
* 修改游戏平台语言管理
|
||||
*
|
||||
* @param gameSecretKeyLang 游戏平台语言管理
|
||||
* @return 结果
|
||||
*/
|
||||
int updateGameSecretKeyLang(GameSecretKeyLang gameSecretKeyLang);
|
||||
|
||||
/**
|
||||
* 批量删除游戏平台语言管理
|
||||
*
|
||||
* @param ids 需要删除的游戏平台语言管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteGameSecretKeyLangByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除游戏平台语言管理信息
|
||||
*
|
||||
* @param id 游戏平台语言管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteGameSecretKeyLangById(Long id);
|
||||
|
||||
/**
|
||||
* 查找游戏密钥货币dto
|
||||
*
|
||||
* @param gameSecretKeyLangDTO 游戏密钥货币dto
|
||||
* @return {@link GameSecretKeyLangDTO }
|
||||
*/
|
||||
GameSecretKeyLangDTO findGameSecretKeyLangDTO(GameSecretKeyLangDTO gameSecretKeyLangDTO);
|
||||
}
|
||||
|
|
@ -1,72 +0,0 @@
|
|||
package com.ff.game.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ff.game.domain.Game;
|
||||
import com.ff.game.domain.GameSecretKey;
|
||||
|
||||
/**
|
||||
* 游戏平台密钥管理Service接口
|
||||
*
|
||||
* @author shi
|
||||
* @date 2025-03-13
|
||||
*/
|
||||
public interface IGameSecretKeyService
|
||||
{
|
||||
/**
|
||||
* 查询游戏平台密钥管理
|
||||
*
|
||||
* @param id 游戏平台密钥管理主键
|
||||
* @return 游戏平台密钥管理
|
||||
*/
|
||||
GameSecretKey selectGameSecretKeyById(Long id);
|
||||
|
||||
|
||||
/**
|
||||
* 按代码选择游戏密钥
|
||||
*
|
||||
* @param code 代码
|
||||
* @return {@link GameSecretKey }
|
||||
*/
|
||||
GameSecretKey selectGameSecretKeyByCode(String code);
|
||||
|
||||
/**
|
||||
* 查询游戏平台密钥管理列表
|
||||
*
|
||||
* @param gameSecretKey 游戏平台密钥管理
|
||||
* @return 游戏平台密钥管理集合
|
||||
*/
|
||||
List<GameSecretKey> selectGameSecretKeyList(GameSecretKey gameSecretKey);
|
||||
|
||||
/**
|
||||
* 新增游戏平台密钥管理
|
||||
*
|
||||
* @param gameSecretKey 游戏平台密钥管理
|
||||
* @return 结果
|
||||
*/
|
||||
int insertGameSecretKey(GameSecretKey gameSecretKey);
|
||||
|
||||
/**
|
||||
* 修改游戏平台密钥管理
|
||||
*
|
||||
* @param gameSecretKey 游戏平台密钥管理
|
||||
* @return 结果
|
||||
*/
|
||||
int updateGameSecretKey(GameSecretKey gameSecretKey);
|
||||
|
||||
/**
|
||||
* 批量删除游戏平台密钥管理
|
||||
*
|
||||
* @param ids 需要删除的游戏平台密钥管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteGameSecretKeyByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除游戏平台密钥管理信息
|
||||
*
|
||||
* @param id 游戏平台密钥管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteGameSecretKeyById(Long id);
|
||||
}
|
||||
|
|
@ -93,14 +93,5 @@ public interface IGameService {
|
|||
*/
|
||||
List<GameResponse> selectGameResponseList();
|
||||
|
||||
/**
|
||||
* 插入游戏投注详细信息
|
||||
*
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @param platformCode 平台代码
|
||||
*/
|
||||
void insertGameBettingDetails(Long startTime, Long endTime, String platformCode);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,110 +0,0 @@
|
|||
package com.ff.game.service.impl;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import com.ff.base.utils.DateUtils;
|
||||
import com.ff.game.domain.GameName;
|
||||
import com.ff.game.dto.GameDTO;
|
||||
import com.ff.game.dto.GameNameDTO;
|
||||
import com.ff.game.mapper.GameNameMapper;
|
||||
import com.ff.game.service.IGameNameService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
|
||||
|
||||
/**
|
||||
* 平台子游戏名称管理Service业务层处理
|
||||
*
|
||||
* @author shi
|
||||
* @date 2025-03-13
|
||||
*/
|
||||
@Service
|
||||
public class GameNameServiceImpl implements IGameNameService {
|
||||
@Autowired
|
||||
private GameNameMapper gameNameMapper;
|
||||
|
||||
/**
|
||||
* 查询平台子游戏名称管理
|
||||
*
|
||||
* @param id 平台子游戏名称管理主键
|
||||
* @return 平台子游戏名称管理
|
||||
*/
|
||||
@Override
|
||||
public GameName selectGameNameById(Long id) {
|
||||
return gameNameMapper.selectGameNameById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询平台子游戏名称管理列表
|
||||
*
|
||||
* @param gameName 平台子游戏名称管理
|
||||
* @return 平台子游戏名称管理
|
||||
*/
|
||||
@Override
|
||||
public List<GameName> selectGameNameList(GameName gameName) {
|
||||
return gameNameMapper.selectGameNameList(gameName);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增平台子游戏名称管理
|
||||
*
|
||||
* @param gameName 平台子游戏名称管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertGameName(GameName gameName) {
|
||||
if (gameName.getId() == null) {
|
||||
gameName.setId(IdUtil.getSnowflakeNextId());
|
||||
}
|
||||
|
||||
gameName.setCreateTime(DateUtils.getNowDate());
|
||||
return gameNameMapper.insertGameName(gameName);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改平台子游戏名称管理
|
||||
*
|
||||
* @param gameName 平台子游戏名称管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateGameName(GameName gameName) {
|
||||
gameName.setUpdateTime(DateUtils.getNowDate());
|
||||
return gameNameMapper.updateGameName(gameName);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除平台子游戏名称管理
|
||||
*
|
||||
* @param ids 需要删除的平台子游戏名称管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteGameNameByIds(Long[] ids) {
|
||||
return gameNameMapper.deleteGameNameByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除平台子游戏名称管理信息
|
||||
*
|
||||
* @param id 平台子游戏名称管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteGameNameById(Long id) {
|
||||
return gameNameMapper.deleteGameNameById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 选择游戏名称数据列表
|
||||
*
|
||||
* @param gameNameDTO 游戏dto
|
||||
* @return {@link List }<{@link GameDTO }>
|
||||
*/
|
||||
@Override
|
||||
public List<GameDTO> selectGameNameDTOList(GameNameDTO gameNameDTO) {
|
||||
return gameNameMapper.selectGameNameDTOList(gameNameDTO);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,107 +0,0 @@
|
|||
package com.ff.game.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.ff.base.utils.DateUtils;
|
||||
import com.ff.base.utils.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ff.game.mapper.GamePlatformMapper;
|
||||
import com.ff.game.domain.GamePlatform;
|
||||
import com.ff.game.service.IGamePlatformService;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
/**
|
||||
* 平台管理Service业务层处理
|
||||
*
|
||||
* @author shi
|
||||
* @date 2025-02-10
|
||||
*/
|
||||
@Service
|
||||
public class GamePlatformServiceImpl implements IGamePlatformService {
|
||||
@Autowired
|
||||
private GamePlatformMapper gamePlatformMapper;
|
||||
|
||||
/**
|
||||
* 查询平台管理
|
||||
*
|
||||
* @param id 平台管理主键
|
||||
* @return 平台管理
|
||||
*/
|
||||
@Override
|
||||
public GamePlatform selectGamePlatformById(Long id) {
|
||||
return gamePlatformMapper.selectGamePlatformById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询平台管理列表
|
||||
*
|
||||
* @param gamePlatform 平台管理
|
||||
* @return 平台管理
|
||||
*/
|
||||
@Override
|
||||
public List<GamePlatform> selectGamePlatformList(GamePlatform gamePlatform) {
|
||||
return gamePlatformMapper.selectGamePlatformList(gamePlatform);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增平台管理
|
||||
*
|
||||
* @param gamePlatform 平台管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertGamePlatform(GamePlatform gamePlatform) {
|
||||
if (ObjectUtils.isEmpty(gamePlatform.getId())) {
|
||||
gamePlatform.setId(IdUtil.getSnowflakeNextId());
|
||||
}
|
||||
gamePlatform.setCreateTime(DateUtils.getNowDate());
|
||||
return gamePlatformMapper.insertGamePlatform(gamePlatform);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改平台管理
|
||||
*
|
||||
* @param gamePlatform 平台管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateGamePlatform(GamePlatform gamePlatform) {
|
||||
gamePlatform.setUpdateTime(DateUtils.getNowDate());
|
||||
return gamePlatformMapper.updateGamePlatform(gamePlatform);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除平台管理
|
||||
*
|
||||
* @param ids 需要删除的平台管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteGamePlatformByIds(Long[] ids) {
|
||||
return gamePlatformMapper.deleteGamePlatformByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除平台管理信息
|
||||
*
|
||||
* @param id 平台管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteGamePlatformById(Long id) {
|
||||
return gamePlatformMapper.deleteGamePlatformById(id);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 选择最大排序号
|
||||
*
|
||||
* @return {@link Integer }
|
||||
*/
|
||||
@Override
|
||||
public Integer selectMaxSortNo() {
|
||||
return gamePlatformMapper.selectMaxSortNo();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,123 +0,0 @@
|
|||
package com.ff.game.service.impl;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import com.ff.base.utils.DateUtils;
|
||||
import com.ff.game.dto.GameSecretKeyCurrencyDTO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ff.game.mapper.GameSecretKeyCurrencyMapper;
|
||||
import com.ff.game.domain.GameSecretKeyCurrency;
|
||||
import com.ff.game.service.IGameSecretKeyCurrencyService;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
|
||||
|
||||
/**
|
||||
* 游戏平台币种管理Service业务层处理
|
||||
*
|
||||
* @author shi
|
||||
* @date 2025-03-13
|
||||
*/
|
||||
@Service
|
||||
public class GameSecretKeyCurrencyServiceImpl implements IGameSecretKeyCurrencyService
|
||||
{
|
||||
@Autowired
|
||||
private GameSecretKeyCurrencyMapper gameSecretKeyCurrencyMapper;
|
||||
|
||||
/**
|
||||
* 查询游戏平台币种管理
|
||||
*
|
||||
* @param id 游戏平台币种管理主键
|
||||
* @return 游戏平台币种管理
|
||||
*/
|
||||
@Override
|
||||
public GameSecretKeyCurrency selectGameSecretKeyCurrencyById(Long id)
|
||||
{
|
||||
return gameSecretKeyCurrencyMapper.selectGameSecretKeyCurrencyById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询游戏平台币种管理列表
|
||||
*
|
||||
* @param gameSecretKeyCurrency 游戏平台币种管理
|
||||
* @return 游戏平台币种管理
|
||||
*/
|
||||
@Override
|
||||
public List<GameSecretKeyCurrency> selectGameSecretKeyCurrencyList(GameSecretKeyCurrency gameSecretKeyCurrency)
|
||||
{
|
||||
return gameSecretKeyCurrencyMapper.selectGameSecretKeyCurrencyList(gameSecretKeyCurrency);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增游戏平台币种管理
|
||||
*
|
||||
* @param gameSecretKeyCurrency 游戏平台币种管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertGameSecretKeyCurrency(GameSecretKeyCurrency gameSecretKeyCurrency)
|
||||
{
|
||||
gameSecretKeyCurrency.setId(IdUtil.getSnowflakeNextId());
|
||||
gameSecretKeyCurrency.setCreateTime(DateUtils.getNowDate());
|
||||
return gameSecretKeyCurrencyMapper.insertGameSecretKeyCurrency(gameSecretKeyCurrency);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改游戏平台币种管理
|
||||
*
|
||||
* @param gameSecretKeyCurrency 游戏平台币种管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateGameSecretKeyCurrency(GameSecretKeyCurrency gameSecretKeyCurrency)
|
||||
{
|
||||
gameSecretKeyCurrency.setUpdateTime(DateUtils.getNowDate());
|
||||
return gameSecretKeyCurrencyMapper.updateGameSecretKeyCurrency(gameSecretKeyCurrency);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除游戏平台币种管理
|
||||
*
|
||||
* @param ids 需要删除的游戏平台币种管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteGameSecretKeyCurrencyByIds(Long[] ids)
|
||||
{
|
||||
return gameSecretKeyCurrencyMapper.deleteGameSecretKeyCurrencyByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除游戏平台币种管理信息
|
||||
*
|
||||
* @param id 游戏平台币种管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteGameSecretKeyCurrencyById(Long id)
|
||||
{
|
||||
return gameSecretKeyCurrencyMapper.deleteGameSecretKeyCurrencyById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 按游戏找到密钥货币dto
|
||||
*
|
||||
* @param gameSecretKeyCurrencyDTO 游戏密钥货币dto
|
||||
* @return {@link GameSecretKeyCurrency }
|
||||
*/
|
||||
@Override
|
||||
public GameSecretKeyCurrencyDTO findByGameSecretKeyCurrencyDTO(GameSecretKeyCurrencyDTO gameSecretKeyCurrencyDTO) {
|
||||
return gameSecretKeyCurrencyMapper.findByGameSecretKeyCurrencyDTO(gameSecretKeyCurrencyDTO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 按游戏查找密钥货币数据列表
|
||||
*
|
||||
* @param gameSecretKeyCurrencyDTO 游戏密钥货币dto
|
||||
* @return {@link List }<{@link GameSecretKeyCurrencyDTO }>
|
||||
*/
|
||||
@Override
|
||||
public List<GameSecretKeyCurrencyDTO> findByGameSecretKeyCurrencyDTOList(GameSecretKeyCurrencyDTO gameSecretKeyCurrencyDTO) {
|
||||
return gameSecretKeyCurrencyMapper.findByGameSecretKeyCurrencyDTOList(gameSecretKeyCurrencyDTO);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,106 +0,0 @@
|
|||
package com.ff.game.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ff.base.utils.DateUtils;
|
||||
import com.ff.game.dto.GameSecretKeyCurrencyDTO;
|
||||
import com.ff.game.dto.GameSecretKeyLangDTO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ff.game.mapper.GameSecretKeyLangMapper;
|
||||
import com.ff.game.domain.GameSecretKeyLang;
|
||||
import com.ff.game.service.IGameSecretKeyLangService;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
|
||||
|
||||
/**
|
||||
* 游戏平台语言管理Service业务层处理
|
||||
*
|
||||
* @author shi
|
||||
* @date 2025-03-13
|
||||
*/
|
||||
@Service
|
||||
public class GameSecretKeyLangServiceImpl implements IGameSecretKeyLangService {
|
||||
@Autowired
|
||||
private GameSecretKeyLangMapper gameSecretKeyLangMapper;
|
||||
|
||||
/**
|
||||
* 查询游戏平台语言管理
|
||||
*
|
||||
* @param id 游戏平台语言管理主键
|
||||
* @return 游戏平台语言管理
|
||||
*/
|
||||
@Override
|
||||
public GameSecretKeyLang selectGameSecretKeyLangById(Long id) {
|
||||
return gameSecretKeyLangMapper.selectGameSecretKeyLangById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询游戏平台语言管理列表
|
||||
*
|
||||
* @param gameSecretKeyLang 游戏平台语言管理
|
||||
* @return 游戏平台语言管理
|
||||
*/
|
||||
@Override
|
||||
public List<GameSecretKeyLang> selectGameSecretKeyLangList(GameSecretKeyLang gameSecretKeyLang) {
|
||||
return gameSecretKeyLangMapper.selectGameSecretKeyLangList(gameSecretKeyLang);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增游戏平台语言管理
|
||||
*
|
||||
* @param gameSecretKeyLang 游戏平台语言管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertGameSecretKeyLang(GameSecretKeyLang gameSecretKeyLang) {
|
||||
gameSecretKeyLang.setId(IdUtil.getSnowflakeNextId());
|
||||
gameSecretKeyLang.setCreateTime(DateUtils.getNowDate());
|
||||
return gameSecretKeyLangMapper.insertGameSecretKeyLang(gameSecretKeyLang);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改游戏平台语言管理
|
||||
*
|
||||
* @param gameSecretKeyLang 游戏平台语言管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateGameSecretKeyLang(GameSecretKeyLang gameSecretKeyLang) {
|
||||
gameSecretKeyLang.setUpdateTime(DateUtils.getNowDate());
|
||||
return gameSecretKeyLangMapper.updateGameSecretKeyLang(gameSecretKeyLang);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除游戏平台语言管理
|
||||
*
|
||||
* @param ids 需要删除的游戏平台语言管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteGameSecretKeyLangByIds(Long[] ids) {
|
||||
return gameSecretKeyLangMapper.deleteGameSecretKeyLangByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除游戏平台语言管理信息
|
||||
*
|
||||
* @param id 游戏平台语言管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteGameSecretKeyLangById(Long id) {
|
||||
return gameSecretKeyLangMapper.deleteGameSecretKeyLangById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查找游戏密钥货币dto
|
||||
*
|
||||
* @param gameSecretKeyLangDTO 游戏密钥货币dto
|
||||
* @return {@link GameSecretKeyLangDTO }
|
||||
*/
|
||||
@Override
|
||||
public GameSecretKeyLangDTO findGameSecretKeyLangDTO(GameSecretKeyLangDTO gameSecretKeyLangDTO) {
|
||||
return gameSecretKeyLangMapper.findGameSecretKeyLangDTO(gameSecretKeyLangDTO);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,110 +0,0 @@
|
|||
package com.ff.game.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ff.base.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ff.game.mapper.GameSecretKeyMapper;
|
||||
import com.ff.game.domain.GameSecretKey;
|
||||
import com.ff.game.service.IGameSecretKeyService;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
|
||||
|
||||
/**
|
||||
* 游戏平台密钥管理Service业务层处理
|
||||
*
|
||||
* @author shi
|
||||
* @date 2025-03-13
|
||||
*/
|
||||
@Service
|
||||
public class GameSecretKeyServiceImpl implements IGameSecretKeyService
|
||||
{
|
||||
@Autowired
|
||||
private GameSecretKeyMapper gameSecretKeyMapper;
|
||||
|
||||
/**
|
||||
* 查询游戏平台密钥管理
|
||||
*
|
||||
* @param id 游戏平台密钥管理主键
|
||||
* @return 游戏平台密钥管理
|
||||
*/
|
||||
@Override
|
||||
public GameSecretKey selectGameSecretKeyById(Long id)
|
||||
{
|
||||
return gameSecretKeyMapper.selectGameSecretKeyById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 按代码选择游戏密钥
|
||||
*
|
||||
* @param code 代码
|
||||
* @return {@link GameSecretKey }
|
||||
*/
|
||||
@Override
|
||||
public GameSecretKey selectGameSecretKeyByCode(String code) {
|
||||
return gameSecretKeyMapper.selectGameSecretKeyByCode(code);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询游戏平台密钥管理列表
|
||||
*
|
||||
* @param gameSecretKey 游戏平台密钥管理
|
||||
* @return 游戏平台密钥管理
|
||||
*/
|
||||
@Override
|
||||
public List<GameSecretKey> selectGameSecretKeyList(GameSecretKey gameSecretKey)
|
||||
{
|
||||
return gameSecretKeyMapper.selectGameSecretKeyList(gameSecretKey);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增游戏平台密钥管理
|
||||
*
|
||||
* @param gameSecretKey 游戏平台密钥管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertGameSecretKey(GameSecretKey gameSecretKey)
|
||||
{
|
||||
gameSecretKey.setId(IdUtil.getSnowflakeNextId());
|
||||
gameSecretKey.setCreateTime(DateUtils.getNowDate());
|
||||
return gameSecretKeyMapper.insertGameSecretKey(gameSecretKey);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改游戏平台密钥管理
|
||||
*
|
||||
* @param gameSecretKey 游戏平台密钥管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateGameSecretKey(GameSecretKey gameSecretKey)
|
||||
{
|
||||
gameSecretKey.setUpdateTime(DateUtils.getNowDate());
|
||||
return gameSecretKeyMapper.updateGameSecretKey(gameSecretKey);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除游戏平台密钥管理
|
||||
*
|
||||
* @param ids 需要删除的游戏平台密钥管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteGameSecretKeyByIds(Long[] ids)
|
||||
{
|
||||
return gameSecretKeyMapper.deleteGameSecretKeyByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除游戏平台密钥管理信息
|
||||
*
|
||||
* @param id 游戏平台密钥管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteGameSecretKeyById(Long id)
|
||||
{
|
||||
return gameSecretKeyMapper.deleteGameSecretKeyById(id);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,29 +1,22 @@
|
|||
package com.ff.game.service.impl;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.ff.api.response.GameResponse;
|
||||
import com.ff.base.constant.ConfigConstants;
|
||||
import com.ff.base.utils.DateUtils;
|
||||
import com.ff.game.api.IGamesService;
|
||||
import com.ff.game.api.request.BetRecordByTimeDTO;
|
||||
import com.ff.game.api.request.GameUniqueDTO;
|
||||
import com.ff.game.api.request.GamesBaseRequestDTO;
|
||||
import com.ff.game.domain.GameSecretKey;
|
||||
import com.ff.game.domain.Game;
|
||||
import com.ff.game.dto.GameDTO;
|
||||
import com.ff.game.service.IGameSecretKeyService;
|
||||
import com.ff.game.mapper.GameMapper;
|
||||
import com.ff.game.service.IGameService;
|
||||
import com.ff.member.service.IMemberService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ff.game.mapper.GameMapper;
|
||||
import com.ff.game.domain.Game;
|
||||
import com.ff.game.service.IGameService;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 平台子游戏管理Service业务层处理
|
||||
|
|
@ -34,16 +27,13 @@ import javax.annotation.Resource;
|
|||
@Service
|
||||
@Slf4j
|
||||
public class GameServiceImpl implements IGameService {
|
||||
|
||||
@Autowired
|
||||
private GameMapper gameMapper;
|
||||
|
||||
@Resource
|
||||
private IMemberService memberService;
|
||||
|
||||
|
||||
@Resource
|
||||
private IGameSecretKeyService gameSecretKeyService;
|
||||
|
||||
@Autowired
|
||||
private Map<String, IGamesService> gamesService;
|
||||
|
||||
|
|
@ -129,19 +119,6 @@ public class GameServiceImpl implements IGameService {
|
|||
return gameMapper.deleteGameById(id);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 按平台id选择最大排序号
|
||||
*
|
||||
* @param platformId 平台id
|
||||
* @return {@link Integer }
|
||||
*/
|
||||
@Override
|
||||
public Integer selectMaxSortNoByPlatformId(Long platformId) {
|
||||
return gameMapper.selectMaxSortNoByPlatformId(platformId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 选择游戏唯一列表
|
||||
*
|
||||
|
|
@ -163,35 +140,9 @@ public class GameServiceImpl implements IGameService {
|
|||
return gameMapper.selectGameResponseList();
|
||||
}
|
||||
|
||||
/**
|
||||
* 插入游戏投注详细信息
|
||||
*
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @param platformCode 平台代码
|
||||
*/
|
||||
@Override
|
||||
public void insertGameBettingDetails(Long startTime, Long endTime, String platformCode) {
|
||||
List<GameSecretKey> gameSecretKeys = gameSecretKeyService.selectGameSecretKeyList(GameSecretKey.builder().platform(platformCode).build());
|
||||
for (GameSecretKey gameSecretKey : gameSecretKeys) {
|
||||
try {
|
||||
gamesService.get(platformCode).getGameList(GamesBaseRequestDTO.builder()
|
||||
.agentId(gameSecretKey.getCode())
|
||||
.agentKey(gameSecretKey.getKey())
|
||||
.build());
|
||||
BetRecordByTimeDTO betRecordByTimeDTO = new BetRecordByTimeDTO();
|
||||
betRecordByTimeDTO.setGamePlatform(gameSecretKey.getPlatform());
|
||||
betRecordByTimeDTO.setStartTime(startTime);
|
||||
betRecordByTimeDTO.setEndTime(endTime);
|
||||
betRecordByTimeDTO.setPage(1);
|
||||
betRecordByTimeDTO.setPageLimit(1000);
|
||||
betRecordByTimeDTO.setAgentId(gameSecretKey.getCode());
|
||||
betRecordByTimeDTO.setAgentKey(gameSecretKey.getKey());
|
||||
gamesService.get(platformCode).getBetRecordByHistoryTime(betRecordByTimeDTO);
|
||||
} catch (Exception e) {
|
||||
log.error("查询 平台 {} 投注记录失败,错误信息 {}", gameSecretKey.getCode(), e);
|
||||
}
|
||||
}
|
||||
public Integer selectMaxSortNo(Integer platformType, String platformCode) {
|
||||
return gameMapper.selectMaxSortNoBy(platformType, platformCode);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -243,7 +243,7 @@ public class GameTask {
|
|||
exchangeTransferStatusRequestDTO.setGameExchangeMoneyId(exchangeMoney.getId());
|
||||
exchangeTransferStatusRequestDTO.setVendor(platform);
|
||||
exchangeTransferStatusRequestDTO.setKeyInfo(keyInfo);
|
||||
exchangeTransferStatusRequestDTO.setSystemCurrency(targetCurrency);
|
||||
exchangeTransferStatusRequestDTO.setSystemCurrency(exchangeMoney.getCurrencyCode());
|
||||
gamesService.get(exchangeMoney.getPlatformCode() + Constants.SERVICE).exchangeTransferStatus(exchangeTransferStatusRequestDTO);
|
||||
} catch (Exception e) {
|
||||
log.error("查询 更新交易记录失败,错误信息 {}", e);
|
||||
|
|
|
|||
|
|
@ -1,124 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ff.game.mapper.GameNameMapper">
|
||||
|
||||
<resultMap type="GameName" id="GameNameResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="gameId" column="game_id" />
|
||||
<result property="gameName" column="game_name" />
|
||||
<result property="langCode" column="lang_code" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="com.ff.game.dto.GameNameDTO" id="GameNameDTOResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="gameId" column="game_id" />
|
||||
<result property="gameName" column="game_name" />
|
||||
<result property="langCode" column="lang_code" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="defaultName" column="default_name" />
|
||||
<result property="gameCode" column="game_code" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectGameNameVo">
|
||||
select id, game_id, game_name, lang_code, create_by, create_time, update_by, update_time from ff_game_name
|
||||
</sql>
|
||||
|
||||
<select id="selectGameNameList" parameterType="GameName" resultMap="GameNameResult">
|
||||
<include refid="selectGameNameVo"/>
|
||||
<where>
|
||||
<if test="gameId != null "> and game_id = #{gameId}</if>
|
||||
<if test="gameName != null and gameName != ''"> and game_name = #{gameName}</if>
|
||||
<if test="langCode != null and langCode != ''"> and lang_code = #{langCode}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectGameNameDTOList" parameterType="com.ff.game.dto.GameNameDTO" resultMap="GameNameDTOResult">
|
||||
select gn.id,
|
||||
gn.game_id,
|
||||
gn.game_name,
|
||||
gn.lang_code,
|
||||
gn.create_by,
|
||||
gn.create_time,
|
||||
gn.update_by,
|
||||
g.game_code,
|
||||
gn.update_time,
|
||||
g.game_name as default_name
|
||||
from ff_game_name gn
|
||||
inner join ff_game g on g.id = gn.game_id
|
||||
inner join ff_game_platform gp on gp.id = g.platform_id
|
||||
|
||||
<where>
|
||||
<if test="platformCode != null and platformCode != ''"> and gp.platform_code = #{platformCode}</if>
|
||||
<if test="gameId != null "> and gn.game_id = #{gameId}</if>
|
||||
<if test="gameName != null and gameName != ''"> and gn.game_name = #{gameName}</if>
|
||||
<if test="langCode != null and langCode != ''"> and gn.lang_code =#{langCode}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectGameNameById" parameterType="Long" resultMap="GameNameResult">
|
||||
<include refid="selectGameNameVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertGameName" parameterType="GameName">
|
||||
insert into ff_game_name
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="gameId != null">game_id,</if>
|
||||
<if test="gameName != null">game_name,</if>
|
||||
<if test="langCode != null">lang_code,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="gameId != null">#{gameId},</if>
|
||||
<if test="gameName != null">#{gameName},</if>
|
||||
<if test="langCode != null">#{langCode},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateGameName" parameterType="GameName">
|
||||
update ff_game_name
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="gameId != null">game_id = #{gameId},</if>
|
||||
<if test="gameName != null">game_name = #{gameName},</if>
|
||||
<if test="langCode != null">lang_code = #{langCode},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteGameNameById" parameterType="Long">
|
||||
delete from ff_game_name where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteGameNameByIds" parameterType="String">
|
||||
delete from ff_game_name where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -1,99 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ff.game.mapper.GamePlatformMapper">
|
||||
|
||||
<resultMap type="GamePlatform" id="GamePlatformResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="sortNo" column="sort_no" />
|
||||
<result property="platformCode" column="platform_code" />
|
||||
<result property="platformType" column="platform_type" />
|
||||
<result property="platformName" column="platform_name" />
|
||||
<result property="stopStatus" column="stop_status" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectGamePlatformVo">
|
||||
select id, sort_no, platform_code, platform_type, platform_name, stop_status, create_by, create_time, update_by, update_time from ff_game_platform
|
||||
</sql>
|
||||
|
||||
<select id="selectGamePlatformList" parameterType="GamePlatform" resultMap="GamePlatformResult">
|
||||
<include refid="selectGamePlatformVo"/>
|
||||
<where>
|
||||
<if test="sortNo != null "> and sort_no = #{sortNo}</if>
|
||||
<if test="platformCode != null and platformCode != ''"> and platform_code = #{platformCode}</if>
|
||||
<if test="platformType != null "> and platform_type = #{platformType}</if>
|
||||
<if test="platformName != null and platformName != ''"> and platform_name like concat('%', #{platformName}, '%')</if>
|
||||
<if test="stopStatus != null "> and stop_status = #{stopStatus}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectGamePlatformById" parameterType="Long" resultMap="GamePlatformResult">
|
||||
<include refid="selectGamePlatformVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertGamePlatform" parameterType="GamePlatform" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into ff_game_platform
|
||||
<trim prefix="(" suffix=")" suffixOverrides=","><if test="id != null">id,</if>
|
||||
<if test="sortNo != null">sort_no,</if>
|
||||
<if test="platformCode != null">platform_code,</if>
|
||||
<if test="platformType != null">platform_type,</if>
|
||||
<if test="platformName != null">platform_name,</if>
|
||||
<if test="stopStatus != null">stop_status,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=","> <if test="id != null">#{id},</if>
|
||||
<if test="sortNo != null">#{sortNo},</if>
|
||||
<if test="platformCode != null">#{platformCode},</if>
|
||||
<if test="platformType != null">#{platformType},</if>
|
||||
<if test="platformName != null">#{platformName},</if>
|
||||
<if test="stopStatus != null">#{stopStatus},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateGamePlatform" parameterType="GamePlatform">
|
||||
update ff_game_platform
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="sortNo != null">sort_no = #{sortNo},</if>
|
||||
<if test="platformCode != null">platform_code = #{platformCode},</if>
|
||||
<if test="platformType != null">platform_type = #{platformType},</if>
|
||||
<if test="platformName != null">platform_name = #{platformName},</if>
|
||||
<if test="stopStatus != null">stop_status = #{stopStatus},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteGamePlatformById" parameterType="Long">
|
||||
delete from ff_game_platform where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteGamePlatformByIds" parameterType="String">
|
||||
delete from ff_game_platform where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectMaxSortNo" resultType="java.lang.Integer">
|
||||
|
||||
select ifnull(max(sort_no),0)
|
||||
from ff_game_platform
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -1,141 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ff.game.mapper.GameSecretKeyCurrencyMapper">
|
||||
|
||||
<resultMap type="GameSecretKeyCurrency" id="GameSecretKeyCurrencyResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="gameSecretKeyId" column="game_secret_key_id" />
|
||||
<result property="currencyId" column="currency_id" />
|
||||
<result property="currency" column="currency" />
|
||||
<result property="systemCurrency" column="system_currency" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="com.ff.game.dto.GameSecretKeyCurrencyDTO" id="GameSecretKeyCurrencyDTOResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="gameSecretKeyId" column="game_secret_key_id" />
|
||||
<result property="currencyId" column="currency_id" />
|
||||
<result property="currency" column="currency" />
|
||||
<result property="systemCurrency" column="system_currency" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="code" column="code" />
|
||||
<result property="key" column="key" />
|
||||
<result property="platformCode" column="platform_code" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectGameSecretKeyCurrencyVo">
|
||||
select id,currency_id, game_secret_key_id, currency, system_currency, create_by, create_time, update_by, update_time from ff_game_secret_key_currency
|
||||
</sql>
|
||||
|
||||
<select id="selectGameSecretKeyCurrencyList" parameterType="GameSecretKeyCurrency" resultMap="GameSecretKeyCurrencyResult">
|
||||
<include refid="selectGameSecretKeyCurrencyVo"/>
|
||||
<where>
|
||||
<if test="gameSecretKeyId != null "> and game_secret_key_id = #{gameSecretKeyId}</if>
|
||||
<if test="currency != null and currency != ''"> and currency = #{currency}</if>
|
||||
<if test="systemCurrency != null and systemCurrency != ''"> and system_currency = #{systemCurrency}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectGameSecretKeyCurrencyById" parameterType="Long" resultMap="GameSecretKeyCurrencyResult">
|
||||
<include refid="selectGameSecretKeyCurrencyVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertGameSecretKeyCurrency" parameterType="GameSecretKeyCurrency">
|
||||
insert into ff_game_secret_key_currency
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="gameSecretKeyId != null">game_secret_key_id,</if>
|
||||
<if test="currencyId != null">currency_id,</if>
|
||||
<if test="currency != null">currency,</if>
|
||||
<if test="systemCurrency != null and systemCurrency != ''">system_currency,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="gameSecretKeyId != null">#{gameSecretKeyId},</if>
|
||||
<if test="currencyId != null">#{currencyId},</if>
|
||||
<if test="currency != null">#{currency},</if>
|
||||
<if test="systemCurrency != null and systemCurrency != ''">#{systemCurrency},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateGameSecretKeyCurrency" parameterType="GameSecretKeyCurrency">
|
||||
update ff_game_secret_key_currency
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="gameSecretKeyId != null">game_secret_key_id = #{gameSecretKeyId},</if>
|
||||
<if test="currencyId != null">currency_id = #{currencyId},</if>
|
||||
<if test="currency != null">currency = #{currency},</if>
|
||||
<if test="systemCurrency != null and systemCurrency != ''">system_currency = #{systemCurrency},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteGameSecretKeyCurrencyById" parameterType="Long">
|
||||
delete from ff_game_secret_key_currency where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteGameSecretKeyCurrencyByIds" parameterType="String">
|
||||
delete from ff_game_secret_key_currency where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
<select id="findByGameSecretKeyCurrencyDTO" parameterType="com.ff.game.dto.GameSecretKeyCurrencyDTO" resultMap="GameSecretKeyCurrencyDTOResult">
|
||||
select gskc.currency, gskc.system_currency,gskc.game_secret_key_id,gsk.code ,gsk.`key`,gsk.platform,gskc.currency_id as platform_code
|
||||
from ff_game_secret_key gsk
|
||||
inner join ff_game_secret_key_currency gskc on gsk.id = gskc.game_secret_key_id
|
||||
<where>
|
||||
<if test="currency != null and currency != ''"> and gskc.currency = #{currency}</if>
|
||||
<if test="systemCurrency != null and systemCurrency != ''"> and gskc.system_currency = #{systemCurrency}</if>
|
||||
<if test="platformCode != null and platformCode != ''"> and gsk.platform = #{platformCode}</if>
|
||||
<if test="code != null and code != ''"> and gsk.code = #{code}</if>
|
||||
<if test="platformCodes != null and platformCodes.size() > 0">
|
||||
and gsk.platform
|
||||
<foreach collection="platformCodes" item="platformCode" open=" in (" separator="," close=")">
|
||||
#{platformCode}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="currencyId != null "> and gskc.currency_id = #{currencyId}</if>
|
||||
</where>
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<select id="findByGameSecretKeyCurrencyDTOList" parameterType="com.ff.game.dto.GameSecretKeyCurrencyDTO" resultMap="GameSecretKeyCurrencyDTOResult">
|
||||
select gskc.currency, gskc.system_currency,gskc.game_secret_key_id,gsk.code ,gsk.`key`,gsk.platform,gskc.currency_id as platform_code
|
||||
from ff_game_secret_key gsk
|
||||
inner join ff_game_secret_key_currency gskc on gsk.id = gskc.game_secret_key_id
|
||||
<where>
|
||||
<if test="currency != null and currency != ''"> and gskc.currency = #{currency}</if>
|
||||
<if test="systemCurrency != null and systemCurrency != ''"> and gskc.system_currency = #{systemCurrency}</if>
|
||||
<if test="platformCode != null and platformCode != ''"> and gsk.platform = #{platformCode}</if>
|
||||
<if test="code != null and code != ''"> and gsk.code = #{code}</if>
|
||||
<if test="platformCodes != null and platformCodes.size() > 0">
|
||||
and gsk.platform
|
||||
<foreach collection="platformCodes" item="platformCode" open=" in (" separator="," close=")">
|
||||
#{platformCode}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -1,112 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ff.game.mapper.GameSecretKeyLangMapper">
|
||||
|
||||
<resultMap type="GameSecretKeyLang" id="GameSecretKeyLangResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="gameSecretKeyId" column="game_secret_key_id" />
|
||||
<result property="lang" column="lang" />
|
||||
<result property="systemLangCode" column="system_lang_code" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="com.ff.game.dto.GameSecretKeyLangDTO" id="GameSecretKeyLangDTOResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="gameSecretKeyId" column="game_secret_key_id" />
|
||||
<result property="lang" column="lang" />
|
||||
<result property="systemLangCode" column="system_lang_code" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="code" column="code" />
|
||||
<result property="key" column="key" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectGameSecretKeyLangVo">
|
||||
select id, game_secret_key_id, lang, system_lang_code, create_by, create_time, update_by, update_time from ff_game_secret_key_lang
|
||||
</sql>
|
||||
|
||||
<select id="selectGameSecretKeyLangList" parameterType="GameSecretKeyLang" resultMap="GameSecretKeyLangResult">
|
||||
<include refid="selectGameSecretKeyLangVo"/>
|
||||
<where>
|
||||
<if test="gameSecretKeyId != null "> and game_secret_key_id = #{gameSecretKeyId}</if>
|
||||
<if test="lang != null and lang != ''"> and lang = #{lang}</if>
|
||||
<if test="systemLangCode != null and systemLangCode != ''"> and system_lang_code = #{systemLangCode}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectGameSecretKeyLangById" parameterType="Long" resultMap="GameSecretKeyLangResult">
|
||||
<include refid="selectGameSecretKeyLangVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertGameSecretKeyLang" parameterType="GameSecretKeyLang">
|
||||
insert into ff_game_secret_key_lang
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="gameSecretKeyId != null">game_secret_key_id,</if>
|
||||
<if test="lang != null and lang != ''">lang,</if>
|
||||
<if test="systemLangCode != null">system_lang_code,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="gameSecretKeyId != null">#{gameSecretKeyId},</if>
|
||||
<if test="lang != null and lang != ''">#{lang},</if>
|
||||
<if test="systemLangCode != null">#{systemLangCode},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateGameSecretKeyLang" parameterType="GameSecretKeyLang">
|
||||
update ff_game_secret_key_lang
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="gameSecretKeyId != null">game_secret_key_id = #{gameSecretKeyId},</if>
|
||||
<if test="lang != null and lang != ''">lang = #{lang},</if>
|
||||
<if test="systemLangCode != null">system_lang_code = #{systemLangCode},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteGameSecretKeyLangById" parameterType="Long">
|
||||
delete from ff_game_secret_key_lang where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteGameSecretKeyLangByIds" parameterType="String">
|
||||
delete from ff_game_secret_key_lang where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="findGameSecretKeyLangDTO" parameterType="com.ff.game.dto.GameSecretKeyLangDTO" resultMap="GameSecretKeyLangDTOResult">
|
||||
select gskl.lang, gskl.system_lang_code,gsk.code ,gsk.`key`,gskl.game_secret_key_id
|
||||
from ff_game_secret_key gsk
|
||||
inner join ff_game_secret_key_lang gskl on gsk.id = gskl.game_secret_key_id
|
||||
<where>
|
||||
<if test="lang != null and lang != ''"> and gskl.lang = #{lang}</if>
|
||||
<if test="systemLangCode != null and systemLangCode != ''"> and gskl.system_lang_code = #{systemLangCode}</if>
|
||||
<if test="platformCode != null and platformCode != ''"> and gsk.platform = #{platformCode}</if>
|
||||
<if test="code != null and code != ''"> and gsk.code = #{code}</if>
|
||||
</where>
|
||||
|
||||
limit 1
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -1,100 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ff.game.mapper.GameSecretKeyMapper">
|
||||
|
||||
<resultMap type="GameSecretKey" id="GameSecretKeyResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="platform" column="platform" />
|
||||
<result property="providerCode" column="provider_code" />
|
||||
<result property="password" column="password" />
|
||||
<result property="code" column="code" />
|
||||
<result property="key" column="key" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectGameSecretKeyVo">
|
||||
select id, platform,provider_code,password, code, `key`, create_by, create_time, update_by, update_time from ff_game_secret_key
|
||||
</sql>
|
||||
|
||||
<select id="selectGameSecretKeyList" parameterType="GameSecretKey" resultMap="GameSecretKeyResult">
|
||||
<include refid="selectGameSecretKeyVo"/>
|
||||
<where>
|
||||
<if test="platform != null and platform != ''"> and platform = #{platform}</if>
|
||||
<if test="providerCode != null and providerCode != ''"> and provider_code = #{providerCode}</if>
|
||||
<if test="password != null and password != ''"> and password = #{password}</if>
|
||||
<if test="code != null and code != ''"> and code = #{code}</if>
|
||||
<if test="key != null and key != ''"> and key = #{key}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectGameSecretKeyById" parameterType="Long" resultMap="GameSecretKeyResult">
|
||||
<include refid="selectGameSecretKeyVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectGameSecretKeyByCode" parameterType="String" resultMap="GameSecretKeyResult">
|
||||
<include refid="selectGameSecretKeyVo"/>
|
||||
where code = #{code}
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertGameSecretKey" parameterType="GameSecretKey">
|
||||
insert into ff_game_secret_key
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="platform != null and platform != ''">platform,</if>
|
||||
<if test="code != null and code != ''">provider_code,</if>
|
||||
<if test="password != null and password != ''">password,</if>
|
||||
<if test="code != null and code != ''">code,</if>
|
||||
<if test="key != null and key != ''">key,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="platform != null and platform != ''">#{platform},</if>
|
||||
<if test="code != null and code != ''">#{providerCode},</if>
|
||||
<if test="password != null and password != ''">#{password},</if>
|
||||
<if test="code != null and code != ''">#{code},</if>
|
||||
<if test="key != null and key != ''">#{key},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateGameSecretKey" parameterType="GameSecretKey">
|
||||
update ff_game_secret_key
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="platform != null and platform != ''">platform = #{platform},</if>
|
||||
<if test="code != null and code != ''">provider_code = #{providerCode},</if>
|
||||
<if test="password != null and password != ''">password = #{password},</if>
|
||||
<if test="code != null and code != ''">code = #{code},</if>
|
||||
<if test="key != null and key != ''">key = #{key},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteGameSecretKeyById" parameterType="Long">
|
||||
delete from ff_game_secret_key where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteGameSecretKeyByIds" parameterType="String">
|
||||
delete from ff_game_secret_key where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue