parent
210d878de7
commit
3e96c67d57
|
@ -13,7 +13,7 @@ import java.util.stream.Stream;
|
|||
*/
|
||||
@Getter
|
||||
public enum ErrorCode {
|
||||
ERROR(500, "系统业务异常"),
|
||||
ERROR(500, "业务异常"),
|
||||
GAME_ACCOUNT_CREATION_FAILED(1001, "当前游戏账号已存在"),
|
||||
ACCOUNT_NOT_EXIST(1002, "当前游戏账号不存在"),
|
||||
PLATFORM_NOT_EXIST(1003, "游戏平台不存在"),
|
||||
|
|
|
@ -11,6 +11,7 @@ public enum GamePlatforms {
|
|||
FC("FC", "FC"),
|
||||
SA("SA", "SA"),
|
||||
DG("DG", "DG"),
|
||||
AE("AE", "AE"),
|
||||
;
|
||||
|
||||
private final String code;
|
||||
|
|
|
@ -171,6 +171,7 @@ public class ApiGameController extends BaseController {
|
|||
.currency(secretKeyCurrencyDTO.getCurrency())
|
||||
.gameId(game.getGameCode())
|
||||
.homeUrl(memberCreateApiRequest.getHomeUrl())
|
||||
.betLimit(memberCreateApiRequest.getBetLimit())
|
||||
.platform(memberCreateApiRequest.getPlatform())
|
||||
.disableFullScreen(memberCreateApiRequest.getDisableFullScreen())
|
||||
.lang(gameSecretKeyLangDTO.getLang())
|
||||
|
|
|
@ -6,6 +6,7 @@ import org.hibernate.validator.constraints.Length;
|
|||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 游戏登录请求
|
||||
|
@ -59,4 +60,9 @@ public class GameLoginRequest implements Serializable {
|
|||
* 带入 1 即关闭全屏幕模式
|
||||
*/
|
||||
private Integer disableFullScreen;
|
||||
|
||||
/**
|
||||
* ae 平台 投注限额
|
||||
*/
|
||||
private Map<String, Map<String, Map<String, Object>>> betLimit;
|
||||
}
|
||||
|
|
|
@ -3,9 +3,7 @@ package com.ff.game.api.ae.client;
|
|||
import com.dtflys.forest.annotation.*;
|
||||
import com.ff.game.api.ae.address.MyAEAddressSource;
|
||||
import com.ff.game.api.ae.dto.*;
|
||||
import com.ff.game.api.ae.impl.GamesAEServiceImpl;
|
||||
import com.ff.game.api.jili.dto.*;
|
||||
import com.ff.game.api.xk.dto.XKGamesDTO;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -33,28 +31,24 @@ public interface AEClient {
|
|||
* 获取会员信息
|
||||
*
|
||||
* @param params 参数
|
||||
* @return {@link XKMemberInfoDTO }
|
||||
* @return {@link AEMemberInfo }
|
||||
*/
|
||||
@Post("/getMemberInfo")
|
||||
XKMemberInfoDTO getMemberInfo(@JSONBody Map<String, Object> params);
|
||||
@Post(url ="/wallet/getBalance",
|
||||
headers = {
|
||||
"Content-type: application/x-www-form-urlencoded"
|
||||
})
|
||||
AEMemberInfo getMemberInfo(@Body Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 无重定向登录
|
||||
*
|
||||
* @param params 参数
|
||||
* @return {@link JILILoginWithoutRedirectResponseDTO }
|
||||
* @return {@link AELoginResponse }
|
||||
*/
|
||||
@Post("/loginWithoutRedirect")
|
||||
XKLoginWithoutRedirectResponseDTO loginWithoutRedirect(@JSONBody Map<String, Object> params);
|
||||
@Post("/wallet/login")
|
||||
AELoginResponse loginWithoutRedirect(@Body Map<String, Object> params);
|
||||
|
||||
|
||||
/**
|
||||
* 获取游戏列表
|
||||
*
|
||||
* @param params 参数
|
||||
* @return {@link JILIGamesDTO }
|
||||
*/
|
||||
@Post("/getGameList")
|
||||
XKGamesDTO getGameList(@JSONBody Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 按代理id进行交换转账
|
||||
|
@ -62,8 +56,18 @@ public interface AEClient {
|
|||
* @param params 参数
|
||||
* @return {@link JILIExchangeMoneyResponseDTO }
|
||||
*/
|
||||
@Post(url = "/exchangeTransferByAgentId")
|
||||
XKExchangeMoneyResponseDTO exchangeTransferByAgentId(@JSONBody Map<String, Object> params);
|
||||
@Post(url ="/wallet/deposit",
|
||||
headers = {
|
||||
"Content-type: application/x-www-form-urlencoded"
|
||||
})
|
||||
AETransactionResponse deposit(@Body Map<String, Object> params);
|
||||
|
||||
|
||||
@Post(url ="/wallet/withdraw",
|
||||
headers = {
|
||||
"Content-type: application/x-www-form-urlencoded"
|
||||
})
|
||||
AETransactionResponse withdraw(@Body Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 按时间获取投注记录
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
package com.ff.game.api.ae.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* aelogin回应
|
||||
*
|
||||
* @author shi
|
||||
* @date 2025/04/01
|
||||
*/
|
||||
@Data
|
||||
public class AELoginResponse {
|
||||
/**
|
||||
* 响应状态
|
||||
*/
|
||||
@JsonProperty("status")
|
||||
private Integer status;
|
||||
|
||||
|
||||
/**
|
||||
* 描述信息 (String类型)
|
||||
* "Success" - 请求成功
|
||||
* 其他 - 错误信息
|
||||
*/
|
||||
private String desc;
|
||||
|
||||
/**
|
||||
* 登录 URL
|
||||
*/
|
||||
@JsonProperty("url")
|
||||
private String url;
|
||||
|
||||
/**
|
||||
* 扩展字段,类型为列表,可以存储多项数据
|
||||
*/
|
||||
@JsonProperty("extension")
|
||||
private List<String> extension;
|
||||
}
|
|
@ -0,0 +1,65 @@
|
|||
package com.ff.game.api.ae.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.ZonedDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* AEMEMBER信息
|
||||
*
|
||||
* @author shi
|
||||
* @date 2025/03/31
|
||||
*/
|
||||
@Data
|
||||
public class AEMemberInfo {
|
||||
/**
|
||||
* 响应结果列表,包含用户信息
|
||||
*/
|
||||
@JsonProperty("results")
|
||||
private List<UserInfo> result;
|
||||
|
||||
/**
|
||||
* 记录数量
|
||||
*/
|
||||
@JsonProperty("count")
|
||||
private int count;
|
||||
|
||||
/**
|
||||
* 查询时间
|
||||
*/
|
||||
@JsonProperty("querytime")
|
||||
private Date queryTime;
|
||||
|
||||
/**
|
||||
* 响应状态
|
||||
*/
|
||||
@JsonProperty("status")
|
||||
private Integer status;
|
||||
|
||||
@Data
|
||||
public static class UserInfo {
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@JsonProperty("userId")
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 用户余额
|
||||
*/
|
||||
@JsonProperty("balance")
|
||||
private BigDecimal balance;
|
||||
|
||||
/**
|
||||
* 最后修改时间
|
||||
*/
|
||||
@JsonProperty("lastModified")
|
||||
private Date lastModified;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
package com.ff.game.api.ae.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.ZonedDateTime;
|
||||
|
||||
/**
|
||||
* 电子交易响应
|
||||
*
|
||||
* @author shi
|
||||
* @date 2025/04/01
|
||||
*/
|
||||
@Data
|
||||
public class AETransactionResponse {
|
||||
|
||||
/**
|
||||
* 响应状态
|
||||
*/
|
||||
@JsonProperty("status")
|
||||
private String status;
|
||||
|
||||
|
||||
/**
|
||||
* 金额
|
||||
*/
|
||||
@JsonProperty("amount")
|
||||
private BigDecimal amount;
|
||||
|
||||
/**
|
||||
* 交易方法(如:DEPOSIT, WITHDRAW)
|
||||
*/
|
||||
@JsonProperty("method")
|
||||
private String method;
|
||||
|
||||
/**
|
||||
* 数据库ID
|
||||
*/
|
||||
@JsonProperty("databaseId")
|
||||
private int databaseId;
|
||||
|
||||
/**
|
||||
* 当前余额
|
||||
*/
|
||||
@JsonProperty("currentBalance")
|
||||
private BigDecimal currentBalance;
|
||||
|
||||
/**
|
||||
* 最后修改时间
|
||||
*/
|
||||
@JsonProperty("lastModified")
|
||||
private ZonedDateTime lastModified;
|
||||
|
||||
/**
|
||||
* 交易代码
|
||||
*/
|
||||
@JsonProperty("txCode")
|
||||
private String txCode;
|
||||
}
|
|
@ -2,7 +2,6 @@ package com.ff.game.api.ae.impl;
|
|||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.ff.base.constant.CacheConstants;
|
||||
import com.ff.base.constant.Constants;
|
||||
import com.ff.base.core.redis.RedisCache;
|
||||
|
@ -12,7 +11,6 @@ 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;
|
||||
import com.ff.base.utils.uuid.IdUtils;
|
||||
import com.ff.config.KeyConfig;
|
||||
import com.ff.game.api.IGamesService;
|
||||
|
@ -35,7 +33,6 @@ import org.springframework.util.ObjectUtils;
|
|||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
|
@ -93,6 +90,21 @@ public class GamesAEServiceImpl implements IGamesService {
|
|||
private IGameNameService gameNameService;
|
||||
|
||||
|
||||
/**
|
||||
* 游戏id
|
||||
*/
|
||||
private static final Long GAME_ID = 1904452832756013817L;
|
||||
|
||||
/**
|
||||
* 平台ID
|
||||
*/
|
||||
private static final Long PLATFORM_ID = 1904411420257108325L;
|
||||
|
||||
/**
|
||||
* 游戏名称id
|
||||
*/
|
||||
private static final Long GAME_NAME_ID = 1904452833756002317L;
|
||||
|
||||
/**
|
||||
* 获得就是成功
|
||||
*
|
||||
|
@ -149,8 +161,22 @@ public class GamesAEServiceImpl implements IGamesService {
|
|||
*/
|
||||
@Override
|
||||
public MemberInfoResponseDTO getMemberInfo(MemberInfoRequestDTO memberInfoRequestDTO) {
|
||||
log.info("GamesXKServiceImpl [getMemberInfo] 请求参数 {}", memberInfoRequestDTO);
|
||||
return null;
|
||||
log.info("GamesAEServiceImpl [getMemberInfo] 请求参数 {}", memberInfoRequestDTO);
|
||||
Map<String, Object> params = this.getKey(memberInfoRequestDTO);
|
||||
params.put("alluser", 0);
|
||||
params.put("userIds", memberInfoRequestDTO.getAccounts());
|
||||
AEMemberInfo memberInfo = AEClient.getMemberInfo(params);
|
||||
//判断是否获取成功
|
||||
if (this.getIsSuccess(memberInfo.getStatus())) {
|
||||
AEMemberInfo.UserInfo userInfo = memberInfo.getResult().get(0);
|
||||
return MemberInfoResponseDTO.builder()
|
||||
.status(GameMemberStatus.UNKNOWN.getCode())
|
||||
.balance(userInfo.getBalance())
|
||||
.account(memberInfoRequestDTO.getAccounts())
|
||||
.build();
|
||||
} else {
|
||||
throw new ApiException(ErrorCode.ERROR.getCode());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -161,26 +187,19 @@ public class GamesAEServiceImpl implements IGamesService {
|
|||
*/
|
||||
@Override
|
||||
public String loginWithoutRedirect(GamesLogin gamesLogin) {
|
||||
log.info("GamesXKServiceImpl [loginWithoutRedirect] 请求参数 {}", gamesLogin);
|
||||
log.info("GamesAEServiceImpl [loginWithoutRedirect] 请求参数 {}", gamesLogin);
|
||||
|
||||
Map<String, Object> params = new LinkedHashMap<>();
|
||||
params.put("account", gamesLogin.getAccount());
|
||||
params.put("gameId", Integer.valueOf(gamesLogin.getGameId()));
|
||||
params.put("lang", gamesLogin.getLang());
|
||||
params.put("agentId", gamesLogin.getAgentId());
|
||||
String query = JsonUtil.mapToQueryString(params);
|
||||
gamesLogin.setQuery(query);
|
||||
Map<String, Object> key = this.getKey(gamesLogin);
|
||||
params.put("key", key);
|
||||
params.put("disableFullScreen", gamesLogin.getDisableFullScreen());
|
||||
params.put("homeUrl", gamesLogin.getHomeUrl());
|
||||
params.put("platform", gamesLogin.getPlatform());
|
||||
XKLoginWithoutRedirectResponseDTO xkLoginWithoutRedirectResponseDTO = AEClient.loginWithoutRedirect(params);
|
||||
Map<String, Object> params = this.getKey(gamesLogin);
|
||||
params.put("userId", gamesLogin.getAccount());
|
||||
params.put("externalURL", gamesLogin.getHomeUrl());
|
||||
params.put("language", gamesLogin.getLang());
|
||||
params.put("betLimit", gamesLogin.getBetLimit());
|
||||
AELoginResponse aeLoginResponse = AEClient.loginWithoutRedirect(params);
|
||||
//判断是否获取成功
|
||||
if (this.getIsSuccess(xkLoginWithoutRedirectResponseDTO.getCode())) {
|
||||
return xkLoginWithoutRedirectResponseDTO.getData();
|
||||
if (this.getIsSuccess(aeLoginResponse.getStatus())) {
|
||||
return aeLoginResponse.getUrl();
|
||||
} else {
|
||||
throw new BaseException(xkLoginWithoutRedirectResponseDTO.getMsg());
|
||||
throw new BaseException(aeLoginResponse.getDesc());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -194,59 +213,35 @@ public class GamesAEServiceImpl implements IGamesService {
|
|||
@Transactional
|
||||
@Override
|
||||
public String getGameList(GamesBaseRequestDTO gamesBaseRequestDTO) {
|
||||
|
||||
List<XKGamesDTO.DataBean> gamesDatas = redisCache.getCacheList(CacheConstants.XK_GAMES);
|
||||
if (!CollectionUtils.isEmpty(gamesDatas)) {
|
||||
return CacheConstants.XK_GAMES;
|
||||
}
|
||||
|
||||
|
||||
Map<String, Object> params = new LinkedHashMap<>();
|
||||
params.put("agentId", gamesBaseRequestDTO.getAgentId());
|
||||
String query = JsonUtil.mapToQueryString(params);
|
||||
gamesBaseRequestDTO.setQuery(query);
|
||||
Map<String, Object> key = this.getKey(gamesBaseRequestDTO);
|
||||
params.put("key", key);
|
||||
|
||||
XKGamesDTO xkGamesDTO = AEClient.getGameList(params);
|
||||
//判断是否获取成功
|
||||
if (this.getIsSuccess(xkGamesDTO.getCode())) {
|
||||
|
||||
for (XKGamesDTO.DataBean gamesDataDTO : xkGamesDTO.getData()) {
|
||||
GamePlatform gamePlatform = GamePlatform.builder()
|
||||
.platformType(XKGameType.findSystemByCode(gamesDataDTO.getGameCategoryId()))
|
||||
.platformCode(GamePlatforms.XK.getCode())
|
||||
.build();
|
||||
List<GamePlatform> gamePlatforms = gamePlatformService.selectGamePlatformList(gamePlatform);
|
||||
GamePlatform gamePlatform = gamePlatformService.selectGamePlatformById(PLATFORM_ID);
|
||||
//没有此平台就新增一个平台
|
||||
if (CollectionUtils.isEmpty(gamePlatforms)) {
|
||||
gamePlatform.setPlatformName(GamePlatforms.XK.getInfo() + XKGameType.findInfoByCode(gamesDataDTO.getGameCategoryId()));
|
||||
if (ObjectUtils.isEmpty(gamePlatform)) {
|
||||
gamePlatform = new GamePlatform();
|
||||
gamePlatform.setId(PLATFORM_ID);
|
||||
gamePlatform.setPlatformCode(GamePlatforms.AE.getInfo());
|
||||
gamePlatform.setPlatformType(PlatformType.GAME_HALL.getCode());
|
||||
gamePlatform.setPlatformName(GamePlatforms.AE.getInfo() + PlatformType.GAME_HALL.getName());
|
||||
gamePlatform.setSortNo(gamePlatformService.selectMaxSortNo() + 1);
|
||||
gamePlatform.setCreateBy(Constants.SYSTEM);
|
||||
gamePlatformService.insertGamePlatform(gamePlatform);
|
||||
} else {
|
||||
gamePlatform = gamePlatforms.get(0);
|
||||
}
|
||||
Game game = Game.builder()
|
||||
.platformId(gamePlatform.getId())
|
||||
.gameCode(String.valueOf(gamesDataDTO.getGameId()))
|
||||
.build();
|
||||
List<Game> games = gameService.selectGameList(game);
|
||||
Game game = gameService.selectGameById(GAME_ID);
|
||||
//不存在这个游戏
|
||||
if (CollectionUtils.isEmpty(games)) {
|
||||
game.setGameSourceType(String.valueOf(gamesDataDTO.getGameCategoryId()));
|
||||
game.setFreespin(gamesDataDTO.isFreeSpin());
|
||||
if (ObjectUtils.isEmpty(game)) {
|
||||
game = new Game();
|
||||
game.setId(GAME_ID);
|
||||
game.setSortNo(gameService.selectMaxSortNoByPlatformId(gamePlatform.getId()) + 1);
|
||||
game.setGameName(gamesDataDTO.getName());
|
||||
game.setPlatformId(gamePlatform.getId());
|
||||
game.setGameCode("1");
|
||||
game.setGameSourceType(String.valueOf(1));
|
||||
game.setGameName("AE大厅");
|
||||
game.setCreateBy(Constants.SYSTEM);
|
||||
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)){
|
||||
GameName gameName = gameNameService.selectGameNameById(GAME_NAME_ID);
|
||||
if (ObjectUtils.isEmpty(gameName)) {
|
||||
gameNameService.insertGameName(GameName.builder()
|
||||
.id(GAME_NAME_ID)
|
||||
.gameId(game.getId())
|
||||
.gameName(game.getGameName())
|
||||
.langCode("zh-CN")
|
||||
|
@ -254,16 +249,6 @@ public class GamesAEServiceImpl implements IGamesService {
|
|||
.build());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
redisCache.deleteObject(CacheConstants.XK_GAMES);
|
||||
redisCache.setCacheList(CacheConstants.XK_GAMES, xkGamesDTO.getData());
|
||||
redisCache.expire(CacheConstants.XK_GAMES, 5L, TimeUnit.HOURS);
|
||||
} else {
|
||||
throw new BaseException(xkGamesDTO.getMsg());
|
||||
|
||||
}
|
||||
|
||||
return CacheConstants.XK_GAMES;
|
||||
}
|
||||
|
||||
|
@ -276,14 +261,14 @@ public class GamesAEServiceImpl implements IGamesService {
|
|||
@Override
|
||||
@Transactional
|
||||
public Long exchangeTransferByAgentId(ExchangeTransferMoneyRequestDTO exchangeTransferMoneyRequestDTO) {
|
||||
log.info("GamesXKServiceImpl [exchangeTransferByAgentId] 请求参数 {}", exchangeTransferMoneyRequestDTO);
|
||||
log.info("GamesAEServiceImpl [exchangeTransferByAgentId] 请求参数 {}", exchangeTransferMoneyRequestDTO);
|
||||
GameSecretKeyCurrency currencyDTO = gameSecretKeyCurrencyService.findByGameSecretKeyCurrencyDTO(GameSecretKeyCurrencyDTO.builder()
|
||||
.platformCode(GamePlatforms.XK.getInfo())
|
||||
.platformCode(GamePlatforms.AE.getInfo())
|
||||
.code(exchangeTransferMoneyRequestDTO.getAgentId())
|
||||
.build());
|
||||
|
||||
Member member = memberService.selectMemberByGameAccount(exchangeTransferMoneyRequestDTO.getAccount());
|
||||
String transactionId = GamePlatforms.XK.getCode() + IdUtils.simpleUUID();
|
||||
String transactionId = GamePlatforms.AE.getCode() + IdUtils.simpleUUID();
|
||||
List<GameExchangeMoney> gameExchangeMonies = gameExchangeMoneyService.selectGameExchangeMoneyList(
|
||||
GameExchangeMoney.builder()
|
||||
.tenantKey(exchangeTransferMoneyRequestDTO.getTenantKey())
|
||||
|
@ -303,40 +288,44 @@ public class GamesAEServiceImpl implements IGamesService {
|
|||
.currencyCode(currencyDTO.getSystemCurrency())
|
||||
.memberId(member.getId())
|
||||
.transactionId(transactionId)
|
||||
.platformCode(GamePlatforms.XK.getCode())
|
||||
.platformCode(GamePlatforms.AE.getInfo())
|
||||
.build();
|
||||
exchangeMoney.setCreateBy(Constants.SYSTEM);
|
||||
//接口限制限制50字符
|
||||
exchangeMoney.setTransactionId(GamePlatforms.XK.getCode() + IdUtils.simpleUUID());
|
||||
Map<String, Object> params = new LinkedHashMap<>();
|
||||
params.put("account", exchangeTransferMoneyRequestDTO.getAccount());
|
||||
params.put("transactionId", exchangeMoney.getTransactionId());
|
||||
params.put("amount", exchangeTransferMoneyRequestDTO.getAmount().stripTrailingZeros().toPlainString());
|
||||
params.put("transferType", exchangeTransferMoneyRequestDTO.getTransferType());
|
||||
params.put("agentId", exchangeTransferMoneyRequestDTO.getAgentId());
|
||||
String query = JsonUtil.mapToQueryString(params);
|
||||
exchangeTransferMoneyRequestDTO.setQuery(query);
|
||||
Map<String, Object> key = this.getKey(exchangeTransferMoneyRequestDTO);
|
||||
params.put("key", key);
|
||||
XKExchangeMoneyResponseDTO exchangeMoneyResponse = AEClient.exchangeTransferByAgentId(params);
|
||||
//判断是否转移成功
|
||||
if (this.getIsSuccess(exchangeMoneyResponse.getCode())) {
|
||||
XKExchangeMoneyResponseDTO.DataBean exchangeMoneyResponseData = exchangeMoneyResponse.getData();
|
||||
ApiException.isTrue(!StatusType.FAILURE.getValue().equals(exchangeMoneyResponseData.getStatus()), ErrorCode.BALANCE_TRANSFER_FAILED.getCode());
|
||||
Map<String, Object> params = this.getKey(exchangeTransferMoneyRequestDTO);
|
||||
AETransactionResponse deposit = null;
|
||||
try {
|
||||
if (TransferType.GAMES.getCode().equals(exchangeTransferMoneyRequestDTO.getTransferType())) {
|
||||
|
||||
params.put("userId", exchangeTransferMoneyRequestDTO.getAccount());
|
||||
params.put("txCode", transactionId);
|
||||
params.put("transferAmount", exchangeTransferMoneyRequestDTO.getAmount());
|
||||
deposit = AEClient.deposit(params);
|
||||
|
||||
} else {
|
||||
params.put("userId", exchangeTransferMoneyRequestDTO.getAccount());
|
||||
params.put("txCode", transactionId);
|
||||
params.put("withdrawType", 1);
|
||||
deposit = AEClient.withdraw(params);
|
||||
}
|
||||
} finally {
|
||||
|
||||
//更新数据
|
||||
exchangeMoney.setBalance(NumberUtil.sub(exchangeMoneyResponseData.getCurrencyAfter(), exchangeMoneyResponseData.getCurrencyBefore()).abs());
|
||||
exchangeMoney.setCoinBefore(exchangeMoneyResponseData.getCoinBefore());
|
||||
exchangeMoney.setCoinAfter(exchangeMoneyResponseData.getCoinAfter());
|
||||
exchangeMoney.setCurrencyBefore(exchangeMoneyResponseData.getCurrencyBefore());
|
||||
exchangeMoney.setCurrencyAfter(exchangeMoneyResponseData.getCurrencyAfter());
|
||||
exchangeMoney.setStatus(exchangeMoneyResponseData.getStatus());
|
||||
gameExchangeMoneyService.insertGameExchangeMoney(exchangeMoney);
|
||||
exchangeMoney.setBalance(deposit.getAmount());
|
||||
exchangeMoney.setCoinBefore(NumberUtil.sub(deposit.getCurrentBalance(), deposit.getAmount()));
|
||||
exchangeMoney.setCoinAfter(deposit.getCurrentBalance());
|
||||
exchangeMoney.setCurrencyBefore(exchangeMoney.getCoinBefore());
|
||||
exchangeMoney.setCurrencyAfter(exchangeMoney.getCoinAfter());
|
||||
//判断是否转移成功
|
||||
if ("0000".equals(deposit.getStatus())) {
|
||||
exchangeMoney.setStatus(StatusType.SUCCESS.getValue());
|
||||
} else {
|
||||
log.error("GamesXKServiceImpl [exchangeTransferByAgentId] 金额转移失败,错误代码{},错误信息{}", exchangeMoneyResponse.getCode(), exchangeMoneyResponse.getMsg());
|
||||
throw new BaseException(exchangeMoneyResponse.getMsg());
|
||||
exchangeMoney.setStatus(StatusType.IN_PROGRESS.getValue());
|
||||
}
|
||||
|
||||
gameExchangeMoneyService.insertGameExchangeMoney(exchangeMoney);
|
||||
}
|
||||
|
||||
|
||||
return exchangeMoney.getId();
|
||||
}
|
||||
|
||||
|
@ -348,6 +337,7 @@ public class GamesAEServiceImpl implements IGamesService {
|
|||
*/
|
||||
@Override
|
||||
public Boolean exchangeTransferStatus(ExchangeTransferStatusRequestDTO exchangeTransferMoneyRequestDTO) {
|
||||
log.info("GamesAEServiceImpl [exchangeTransferStatus] 请求参数 {}", exchangeTransferMoneyRequestDTO);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
|
@ -521,7 +511,7 @@ public class GamesAEServiceImpl implements IGamesService {
|
|||
}
|
||||
if (!CollectionUtils.isEmpty(gameBettingDetails)) {
|
||||
//查询重复数据id
|
||||
List<String> removeWagersIds = gameBettingDetailsService.selectGameBettingDetailsByWagersId(wagersIds);
|
||||
List<String> removeWagersIds = gameBettingDetailsService.selectGameBettingDetailsByWagersId(wagersIds,GamePlatforms.AE.getInfo());
|
||||
//用steam流清除list中与wagersIds集合相同的数据
|
||||
gameBettingDetails = gameBettingDetails.stream()
|
||||
.filter(detail -> !removeWagersIds.contains(detail.getWagersId()))
|
||||
|
|
|
@ -534,7 +534,7 @@ public class GamesDGServiceImpl implements IGamesService {
|
|||
}
|
||||
if (!CollectionUtils.isEmpty(gameBettingDetails)) {
|
||||
//查询重复数据id
|
||||
List<String> removeWagersIds = gameBettingDetailsService.selectGameBettingDetailsByWagersId(wagersIds);
|
||||
List<String> removeWagersIds = gameBettingDetailsService.selectGameBettingDetailsByWagersId(wagersIds,GamePlatforms.DG.getInfo());
|
||||
//用steam流清除list中与wagersIds集合相同的数据
|
||||
gameBettingDetails = gameBettingDetails.stream()
|
||||
.filter(detail -> !removeWagersIds.contains(detail.getWagersId()))
|
||||
|
|
|
@ -278,7 +278,7 @@ public class GamesFCServiceImpl implements IGamesService {
|
|||
Map<String, ApiFCGameListResponseDTO.GameDetails> integerGameDetailsMap = gameList.getGetGameIconList().get(gameTypeKey);
|
||||
GamePlatform gamePlatform = GamePlatform.builder()
|
||||
.platformType(FCGameType.findSystemByCode(gameTypeKey))
|
||||
.platformCode(GamePlatforms.FC.getCode())
|
||||
.platformCode(GamePlatforms.FC.getInfo())
|
||||
.build();
|
||||
List<GamePlatform> gamePlatforms = gamePlatformService.selectGamePlatformList(gamePlatform);
|
||||
//没有此平台就新增一个平台
|
||||
|
@ -360,13 +360,13 @@ public class GamesFCServiceImpl implements IGamesService {
|
|||
log.info("GamesFCServiceImpl [exchangeTransferByAgentId] 请求参数 {}", exchangeTransferMoneyRequestDTO);
|
||||
|
||||
GameSecretKeyCurrency currencyDTO = gameSecretKeyCurrencyService.findByGameSecretKeyCurrencyDTO(GameSecretKeyCurrencyDTO.builder()
|
||||
.platformCode(GamePlatforms.FC.getCode())
|
||||
.platformCode(GamePlatforms.FC.getInfo())
|
||||
.code(exchangeTransferMoneyRequestDTO.getAgentId())
|
||||
.currency(exchangeTransferMoneyRequestDTO.getCurrency())
|
||||
.build());
|
||||
|
||||
Member member = memberService.selectMemberByGameAccount(exchangeTransferMoneyRequestDTO.getAccount());
|
||||
String transactionId = gameExchangeMoneyService.getTransactionId(GamePlatforms.FC.getCode(), 30);
|
||||
String transactionId = gameExchangeMoneyService.getTransactionId(GamePlatforms.FC.getInfo(), 30);
|
||||
List<GameExchangeMoney> gameExchangeMonies = gameExchangeMoneyService.selectGameExchangeMoneyList(
|
||||
GameExchangeMoney.builder()
|
||||
.tenantKey(exchangeTransferMoneyRequestDTO.getTenantKey())
|
||||
|
@ -386,7 +386,7 @@ public class GamesFCServiceImpl implements IGamesService {
|
|||
.currencyCode(currencyDTO.getSystemCurrency())
|
||||
.memberId(member.getId())
|
||||
.transactionId(transactionId)
|
||||
.platformCode(GamePlatforms.FC.getCode())
|
||||
.platformCode(GamePlatforms.FC.getInfo())
|
||||
.build();
|
||||
exchangeMoney.setCreateBy(Constants.SYSTEM);
|
||||
|
||||
|
@ -461,7 +461,7 @@ public class GamesFCServiceImpl implements IGamesService {
|
|||
|
||||
|
||||
List<GameSecretKeyCurrencyDTO> gameSecretKeyCurrencies = gameSecretKeyCurrencyService.findByGameSecretKeyCurrencyDTOList(GameSecretKeyCurrencyDTO.builder()
|
||||
.platformCode(GamePlatforms.FC.getCode())
|
||||
.platformCode(GamePlatforms.FC.getInfo())
|
||||
.build());
|
||||
|
||||
for (GameSecretKeyCurrency gameSecretKeyCurrency : gameSecretKeyCurrencies) {
|
||||
|
@ -494,7 +494,7 @@ public class GamesFCServiceImpl implements IGamesService {
|
|||
@Override
|
||||
public Boolean getBetRecordByHistoryTime(BetRecordByTimeDTO betRecordByTimeDTO) {
|
||||
List<GameSecretKeyCurrencyDTO> gameSecretKeyCurrencies = gameSecretKeyCurrencyService.findByGameSecretKeyCurrencyDTOList(GameSecretKeyCurrencyDTO.builder()
|
||||
.platformCode(GamePlatforms.FC.getCode())
|
||||
.platformCode(GamePlatforms.FC.getInfo())
|
||||
.build());
|
||||
|
||||
for (GameSecretKeyCurrency gameSecretKeyCurrency : gameSecretKeyCurrencies) {
|
||||
|
@ -649,7 +649,7 @@ public class GamesFCServiceImpl implements IGamesService {
|
|||
.memberId(member.getId())
|
||||
.gameCode(resultBean.getGameID())
|
||||
.gameType(FCGameType.findSystemByCode(resultBean.getGametype()))
|
||||
.platformCode(GamePlatforms.FC.getCode())
|
||||
.platformCode(GamePlatforms.FC.getInfo())
|
||||
.gameId(gamesDataDTO.getSystemGameId())
|
||||
.gameName(gamesDataDTO.getGameNameOfChinese())
|
||||
.gameStatus(gameStatus)
|
||||
|
@ -692,7 +692,7 @@ public class GamesFCServiceImpl implements IGamesService {
|
|||
}
|
||||
if (!CollectionUtils.isEmpty(gameBettingDetails)) {
|
||||
//查询重复数据id
|
||||
List<String> removeWagersIds = gameBettingDetailsService.selectGameBettingDetailsByWagersId(wagersIds);
|
||||
List<String> removeWagersIds = gameBettingDetailsService.selectGameBettingDetailsByWagersId(wagersIds,GamePlatforms.FC.getInfo());
|
||||
//用steam流清除list中与wagersIds集合相同的数据
|
||||
gameBettingDetails = gameBettingDetails.stream()
|
||||
.filter(detail -> !removeWagersIds.contains(detail.getWagersId()))
|
||||
|
|
|
@ -237,7 +237,7 @@ public class GamesJILIServiceImpl implements IGamesService {
|
|||
for (JILIGamesDataDTO gamesDataDTO : jiliGames.getData()) {
|
||||
GamePlatform gamePlatform = GamePlatform.builder()
|
||||
.platformType(JILIGameType.findSystemByCode(gamesDataDTO.getGameCategoryId()))
|
||||
.platformCode(GamePlatforms.JILI.getCode())
|
||||
.platformCode(GamePlatforms.JILI.getInfo())
|
||||
.build();
|
||||
List<GamePlatform> gamePlatforms = gamePlatformService.selectGamePlatformList(gamePlatform);
|
||||
//没有此平台就新增一个平台
|
||||
|
@ -313,7 +313,7 @@ public class GamesJILIServiceImpl implements IGamesService {
|
|||
.currency(exchangeTransferMoneyRequestDTO.getCurrency()).build());
|
||||
|
||||
Member member = memberService.selectMemberByGameAccount(exchangeTransferMoneyRequestDTO.getAccount());
|
||||
String transactionId = GamePlatforms.JILI.getCode() + IdUtils.simpleUUID();
|
||||
String transactionId = GamePlatforms.JILI.getInfo() + IdUtils.simpleUUID();
|
||||
|
||||
List<GameExchangeMoney> gameExchangeMonies = gameExchangeMoneyService.selectGameExchangeMoneyList(
|
||||
GameExchangeMoney.builder()
|
||||
|
@ -335,7 +335,7 @@ public class GamesJILIServiceImpl implements IGamesService {
|
|||
.currencyCode(gameSecretKey.getSystemCurrency())
|
||||
.memberId(member.getId())
|
||||
.transactionId(transactionId)
|
||||
.platformCode(GamePlatforms.JILI.getCode())
|
||||
.platformCode(GamePlatforms.JILI.getInfo())
|
||||
.build();
|
||||
exchangeMoney.setCreateBy(Constants.SYSTEM);
|
||||
//接口限制限制50字符
|
||||
|
@ -472,7 +472,7 @@ public class GamesJILIServiceImpl implements IGamesService {
|
|||
.map(Game::getGameCode)
|
||||
.map(String::valueOf)
|
||||
.collect(Collectors.joining(","));
|
||||
String referenceId = GamePlatforms.JILI.getCode() + IdUtils.simpleUUID();
|
||||
String referenceId = GamePlatforms.JILI.getInfo() + IdUtils.simpleUUID();
|
||||
//请求参数
|
||||
String query = "Account=" + createFreeSpinRequest.getAccount()
|
||||
+ "&Currency=" + createFreeSpinRequest.getCurrency()
|
||||
|
@ -715,7 +715,7 @@ public class GamesJILIServiceImpl implements IGamesService {
|
|||
}
|
||||
if (!CollectionUtils.isEmpty(gameBettingDetails)) {
|
||||
//查询重复数据id
|
||||
List<String> removeWagersIds = gameBettingDetailsService.selectGameBettingDetailsByWagersId(wagersIds);
|
||||
List<String> removeWagersIds = gameBettingDetailsService.selectGameBettingDetailsByWagersId(wagersIds,GamePlatforms.JILI.getInfo());
|
||||
//用steam流清除list中与wagersIds集合相同的数据
|
||||
gameBettingDetails = gameBettingDetails.stream()
|
||||
.filter(detail -> !removeWagersIds.contains(detail.getWagersId()))
|
||||
|
@ -765,7 +765,7 @@ public class GamesJILIServiceImpl implements IGamesService {
|
|||
.memberId(member.getId())
|
||||
.gameCode(jiliBetRecordDataResponseDTO.getGameId())
|
||||
.gameType(JILIGameType.findSystemByCode(jiliBetRecordDataResponseDTO.getGameCategoryId()))
|
||||
.platformCode(GamePlatforms.JILI.getCode())
|
||||
.platformCode(GamePlatforms.JILI.getInfo())
|
||||
.gameId(gamesDataDTO.getSystemGameId())
|
||||
.gameName(gamesDataDTO.getName().getZhCN())
|
||||
.gameStatus(jiliBetRecordDataResponseDTO.getStatus())
|
||||
|
|
|
@ -826,7 +826,7 @@ public class GamesPGServiceImpl implements IGamesService {
|
|||
}
|
||||
if (!CollectionUtils.isEmpty(gameBettingDetails)) {
|
||||
//查询重复数据id
|
||||
List<String> removeWagersIds = gameBettingDetailsService.selectGameBettingDetailsByWagersId(wagersIds);
|
||||
List<String> removeWagersIds = gameBettingDetailsService.selectGameBettingDetailsByWagersId(wagersIds,NGPlatforms.PG.getPlatform());
|
||||
//用steam流清除list中与wagersIds集合相同的数据
|
||||
gameBettingDetails = gameBettingDetails.stream()
|
||||
.filter(detail -> !removeWagersIds.contains(detail.getWagersId()))
|
||||
|
|
|
@ -244,7 +244,7 @@ public class GamesPGXServiceImpl implements IGamesService {
|
|||
for (PGXGameListResponse.Game gamesDataDTO : gameLists) {
|
||||
GamePlatform gamePlatform = GamePlatform.builder()
|
||||
.platformType(GPXGameType.SL.getSystemCode())
|
||||
.platformCode(GamePlatforms.PGX.getCode())
|
||||
.platformCode(GamePlatforms.PGX.getInfo())
|
||||
.build();
|
||||
List<GamePlatform> gamePlatforms = gamePlatformService.selectGamePlatformList(gamePlatform);
|
||||
//没有此平台就新增一个平台
|
||||
|
@ -308,13 +308,13 @@ public class GamesPGXServiceImpl implements IGamesService {
|
|||
log.info("GamesPGXServiceImpl [exchangeTransferByAgentId] 请求参数 {}", exchangeTransferMoneyRequestDTO);
|
||||
|
||||
GameSecretKeyCurrency currencyDTO = gameSecretKeyCurrencyService.findByGameSecretKeyCurrencyDTO(GameSecretKeyCurrencyDTO.builder()
|
||||
.platformCode(GamePlatforms.PGX.getCode())
|
||||
.platformCode(GamePlatforms.PGX.getInfo())
|
||||
.code(exchangeTransferMoneyRequestDTO.getAgentId())
|
||||
.currency(exchangeTransferMoneyRequestDTO.getCurrency())
|
||||
.build());
|
||||
|
||||
Member member = memberService.selectMemberByGameAccount(exchangeTransferMoneyRequestDTO.getAccount());
|
||||
String transactionId = gameExchangeMoneyService.getTransactionId(GamePlatforms.PGX.getCode(), 17);
|
||||
String transactionId = gameExchangeMoneyService.getTransactionId(GamePlatforms.PGX.getInfo(), 17);
|
||||
List<GameExchangeMoney> gameExchangeMonies = gameExchangeMoneyService.selectGameExchangeMoneyList(
|
||||
GameExchangeMoney.builder()
|
||||
.tenantKey(exchangeTransferMoneyRequestDTO.getTenantKey())
|
||||
|
@ -336,7 +336,7 @@ public class GamesPGXServiceImpl implements IGamesService {
|
|||
.currencyCode(currencyDTO.getSystemCurrency())
|
||||
.memberId(member.getId())
|
||||
.transactionId(transactionId)
|
||||
.platformCode(GamePlatforms.PGX.getCode())
|
||||
.platformCode(GamePlatforms.PGX.getInfo())
|
||||
.build();
|
||||
exchangeMoney.setCreateBy(Constants.SYSTEM);
|
||||
|
||||
|
@ -421,7 +421,7 @@ public class GamesPGXServiceImpl implements IGamesService {
|
|||
if (this.getIsSuccess(exchangeTransferStatusResponse.getErrCode())) {
|
||||
List<GameExchangeMoney> gameExchangeMonies = gameExchangeMoneyService.selectGameExchangeMoneyList(
|
||||
GameExchangeMoney.builder()
|
||||
.platformCode(GamePlatforms.PGX.getCode())
|
||||
.platformCode(GamePlatforms.PGX.getInfo())
|
||||
.transactionId(exchangeTransferMoneyRequestDTO.getOrderId())
|
||||
.build()
|
||||
);
|
||||
|
@ -564,7 +564,7 @@ public class GamesPGXServiceImpl implements IGamesService {
|
|||
}
|
||||
if (!CollectionUtils.isEmpty(gameBettingDetails)) {
|
||||
//查询重复数据id
|
||||
List<String> removeWagersIds = gameBettingDetailsService.selectGameBettingDetailsByWagersId(wagersIds);
|
||||
List<String> removeWagersIds = gameBettingDetailsService.selectGameBettingDetailsByWagersId(wagersIds,GamePlatforms.PGX.getInfo());
|
||||
//用steam流清除list中与wagersIds集合相同的数据
|
||||
gameBettingDetails = gameBettingDetails.stream()
|
||||
.filter(detail -> !removeWagersIds.contains(detail.getWagersId()))
|
||||
|
@ -628,7 +628,7 @@ public class GamesPGXServiceImpl implements IGamesService {
|
|||
.memberId(member.getId())
|
||||
.gameCode(resultBean.getGameId())
|
||||
.gameType(GPXGameType.SL.getSystemCode())
|
||||
.platformCode(GamePlatforms.PGX.getCode())
|
||||
.platformCode(GamePlatforms.PGX.getInfo())
|
||||
.gameId(gamesDataDTO.getSystemGameId())
|
||||
.gameName(gamesDataDTO.getGameName())
|
||||
.gameStatus(gameStatus)
|
||||
|
|
|
@ -25,7 +25,7 @@ public class CreateMemberRequestDTO extends GamesBaseRequestDTO {
|
|||
private String account;
|
||||
|
||||
/**
|
||||
* 投注限额
|
||||
* ae 平台 投注限额
|
||||
*/
|
||||
private Map<String, Map<String, Map<String, Object>>> betLimit;
|
||||
|
||||
|
|
|
@ -6,6 +6,8 @@ import lombok.Data;
|
|||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 游戏登录
|
||||
*
|
||||
|
@ -46,4 +48,10 @@ public class GamesLogin extends GamesBaseRequestDTO{
|
|||
* 游戏类型
|
||||
*/
|
||||
private String gameType;
|
||||
|
||||
|
||||
/**
|
||||
* ae 平台 投注限额
|
||||
*/
|
||||
private Map<String, Map<String, Map<String, Object>>> betLimit;
|
||||
}
|
||||
|
|
|
@ -321,7 +321,7 @@ public class GamesSAServiceImpl implements IGamesService {
|
|||
.currencyCode(currencyDTO.getSystemCurrency())
|
||||
.memberId(member.getId())
|
||||
.transactionId(transactionId)
|
||||
.platformCode(GamePlatforms.SA.getCode())
|
||||
.platformCode(GamePlatforms.SA.getInfo())
|
||||
.build();
|
||||
exchangeMoney.setCreateBy(Constants.SYSTEM);
|
||||
if (TransferType.ALL.getCode().equals(exchangeTransferMoneyRequestDTO.getTransferType())) {
|
||||
|
@ -546,7 +546,7 @@ public class GamesSAServiceImpl implements IGamesService {
|
|||
}
|
||||
if (!CollectionUtils.isEmpty(gameBettingDetails)) {
|
||||
//查询重复数据id
|
||||
List<String> removeWagersIds = gameBettingDetailsService.selectGameBettingDetailsByWagersId(wagersIds);
|
||||
List<String> removeWagersIds = gameBettingDetailsService.selectGameBettingDetailsByWagersId(wagersIds,GamePlatforms.SA.getInfo());
|
||||
//用steam流清除list中与wagersIds集合相同的数据
|
||||
gameBettingDetails = gameBettingDetails.stream()
|
||||
.filter(detail -> !removeWagersIds.contains(detail.getWagersId()))
|
||||
|
@ -599,7 +599,7 @@ public class GamesSAServiceImpl implements IGamesService {
|
|||
.memberId(member.getId())
|
||||
.gameCode(resultBean.getGameID())
|
||||
.gameType(PlatformType.CARD_GAME.getCode())
|
||||
.platformCode(GamePlatforms.SA.getCode())
|
||||
.platformCode(GamePlatforms.SA.getInfo())
|
||||
.gameId(GAME_ID)
|
||||
.gameName(game.getGameName())
|
||||
.gameStatus(gameStatus)
|
||||
|
|
|
@ -557,7 +557,7 @@ public class GamesXKServiceImpl implements IGamesService {
|
|||
}
|
||||
if (!CollectionUtils.isEmpty(gameBettingDetails)) {
|
||||
//查询重复数据id
|
||||
List<String> removeWagersIds = gameBettingDetailsService.selectGameBettingDetailsByWagersId(wagersIds);
|
||||
List<String> removeWagersIds = gameBettingDetailsService.selectGameBettingDetailsByWagersId(wagersIds,GamePlatforms.XK.getInfo());
|
||||
//用steam流清除list中与wagersIds集合相同的数据
|
||||
gameBettingDetails = gameBettingDetails.stream()
|
||||
.filter(detail -> !removeWagersIds.contains(detail.getWagersId()))
|
||||
|
|
|
@ -27,9 +27,10 @@ public interface GameBettingDetailsMapper
|
|||
* 按投注id选择游戏投注详细信息
|
||||
*
|
||||
* @param wagersIds 投注ID
|
||||
* @param platformCode 平台代码
|
||||
* @return {@link List }<{@link Long }>
|
||||
*/
|
||||
List<String> selectGameBettingDetailsByWagersId(@Param("wagersIds") List<String> wagersIds);
|
||||
List<String> selectGameBettingDetailsByWagersId(@Param("wagersIds") List<String> wagersIds, @Param("platformCode") String platformCode);
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -29,7 +29,7 @@ public interface IGameBettingDetailsService
|
|||
* @param wagersIds 投注ID
|
||||
* @return {@link List }<{@link Long }>
|
||||
*/
|
||||
List<String> selectGameBettingDetailsByWagersId(List<String> wagersIds);
|
||||
List<String> selectGameBettingDetailsByWagersId(List<String> wagersIds,String platformCode);
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -43,8 +43,8 @@ public class GameBettingDetailsServiceImpl implements IGameBettingDetailsService
|
|||
* @return {@link List }<{@link Long }>
|
||||
*/
|
||||
@Override
|
||||
public List<String> selectGameBettingDetailsByWagersId(List<String> wagersIds) {
|
||||
return gameBettingDetailsMapper.selectGameBettingDetailsByWagersId(wagersIds);
|
||||
public List<String> selectGameBettingDetailsByWagersId(List<String> wagersIds, String platformCode) {
|
||||
return gameBettingDetailsMapper.selectGameBettingDetailsByWagersId(wagersIds,platformCode);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,57 +1,57 @@
|
|||
package com.ff.quartz.config;//package com.ff.quartz.config;
|
||||
//
|
||||
//import org.springframework.context.annotation.Bean;
|
||||
//import org.springframework.context.annotation.Configuration;
|
||||
//import org.springframework.scheduling.quartz.SchedulerFactoryBean;
|
||||
//import javax.sql.DataSource;
|
||||
//import java.util.Properties;
|
||||
//
|
||||
///**
|
||||
// * 定时任务配置(单机部署建议删除此类和qrtz数据库表,默认走内存会最高效)
|
||||
// *
|
||||
// * @author ff
|
||||
// */
|
||||
//@Configuration
|
||||
//public class ScheduleConfig
|
||||
//{
|
||||
// @Bean
|
||||
// public SchedulerFactoryBean schedulerFactoryBean(DataSource dataSource)
|
||||
// {
|
||||
// SchedulerFactoryBean factory = new SchedulerFactoryBean();
|
||||
// factory.setDataSource(dataSource);
|
||||
//
|
||||
// // quartz参数
|
||||
// Properties prop = new Properties();
|
||||
// prop.put("org.quartz.scheduler.instanceName", "ffScheduler");
|
||||
// prop.put("org.quartz.scheduler.instanceId", "AUTO");
|
||||
// // 线程池配置
|
||||
// prop.put("org.quartz.threadPool.class", "org.quartz.simpl.SimpleThreadPool");
|
||||
// prop.put("org.quartz.threadPool.threadCount", "20");
|
||||
// prop.put("org.quartz.threadPool.threadPriority", "5");
|
||||
// // JobStore配置
|
||||
// prop.put("org.quartz.jobStore.class", "org.springframework.scheduling.quartz.LocalDataSourceJobStore");
|
||||
// // 集群配置
|
||||
// prop.put("org.quartz.jobStore.isClustered", "true");
|
||||
// prop.put("org.quartz.jobStore.clusterCheckinInterval", "15000");
|
||||
// prop.put("org.quartz.jobStore.maxMisfiresToHandleAtATime", "10");
|
||||
// prop.put("org.quartz.jobStore.txIsolationLevelSerializable", "true");
|
||||
//
|
||||
// // sqlserver 启用
|
||||
// // prop.put("org.quartz.jobStore.selectWithLockSQL", "SELECT * FROM {0}LOCKS UPDLOCK WHERE LOCK_NAME = ?");
|
||||
// prop.put("org.quartz.jobStore.misfireThreshold", "12000");
|
||||
// prop.put("org.quartz.jobStore.tablePrefix", "QRTZ_");
|
||||
// factory.setQuartzProperties(prop);
|
||||
//
|
||||
// factory.setSchedulerName("ffScheduler");
|
||||
// // 延时启动
|
||||
// factory.setStartupDelay(1);
|
||||
// factory.setApplicationContextSchedulerContextKey("applicationContextKey");
|
||||
// // 可选,QuartzScheduler
|
||||
// // 启动时更新己存在的Job,这样就不用每次修改targetObject后删除qrtz_job_details表对应记录了
|
||||
// factory.setOverwriteExistingJobs(true);
|
||||
// // 设置自动启动,默认为true
|
||||
// factory.setAutoStartup(true);
|
||||
//
|
||||
// return factory;
|
||||
// }
|
||||
//}
|
||||
package com.ff.quartz.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.scheduling.quartz.SchedulerFactoryBean;
|
||||
import javax.sql.DataSource;
|
||||
import java.util.Properties;
|
||||
|
||||
/**
|
||||
* 定时任务配置(单机部署建议删除此类和qrtz数据库表,默认走内存会最高效)
|
||||
*
|
||||
* @author ff
|
||||
*/
|
||||
@Configuration
|
||||
public class ScheduleConfig
|
||||
{
|
||||
@Bean
|
||||
public SchedulerFactoryBean schedulerFactoryBean(DataSource dataSource)
|
||||
{
|
||||
SchedulerFactoryBean factory = new SchedulerFactoryBean();
|
||||
factory.setDataSource(dataSource);
|
||||
|
||||
// quartz参数
|
||||
Properties prop = new Properties();
|
||||
prop.put("org.quartz.scheduler.instanceName", "ffScheduler");
|
||||
prop.put("org.quartz.scheduler.instanceId", "AUTO");
|
||||
// 线程池配置
|
||||
prop.put("org.quartz.threadPool.class", "org.quartz.simpl.SimpleThreadPool");
|
||||
prop.put("org.quartz.threadPool.threadCount", "20");
|
||||
prop.put("org.quartz.threadPool.threadPriority", "5");
|
||||
// JobStore配置
|
||||
prop.put("org.quartz.jobStore.class", "org.springframework.scheduling.quartz.LocalDataSourceJobStore");
|
||||
// 集群配置
|
||||
prop.put("org.quartz.jobStore.isClustered", "true");
|
||||
prop.put("org.quartz.jobStore.clusterCheckinInterval", "15000");
|
||||
prop.put("org.quartz.jobStore.maxMisfiresToHandleAtATime", "10");
|
||||
prop.put("org.quartz.jobStore.txIsolationLevelSerializable", "true");
|
||||
|
||||
// sqlserver 启用
|
||||
// prop.put("org.quartz.jobStore.selectWithLockSQL", "SELECT * FROM {0}LOCKS UPDLOCK WHERE LOCK_NAME = ?");
|
||||
prop.put("org.quartz.jobStore.misfireThreshold", "12000");
|
||||
prop.put("org.quartz.jobStore.tablePrefix", "QRTZ_");
|
||||
factory.setQuartzProperties(prop);
|
||||
|
||||
factory.setSchedulerName("ffScheduler");
|
||||
// 延时启动
|
||||
factory.setStartupDelay(1);
|
||||
factory.setApplicationContextSchedulerContextKey("applicationContextKey");
|
||||
// 可选,QuartzScheduler
|
||||
// 启动时更新己存在的Job,这样就不用每次修改targetObject后删除qrtz_job_details表对应记录了
|
||||
factory.setOverwriteExistingJobs(true);
|
||||
// 设置自动启动,默认为true
|
||||
factory.setAutoStartup(true);
|
||||
|
||||
return factory;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where wagers_id in
|
||||
<foreach item="wagersId" collection="wagersIds" open="(" separator="," close=")">
|
||||
#{wagersId}
|
||||
</foreach>
|
||||
</foreach> and platform_code = #{platformCode}
|
||||
and settlement_status !=1
|
||||
|
||||
</select>
|
||||
|
|
Loading…
Reference in New Issue