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