Compare commits
No commits in common. "58cdc3a44b0b02327e801867f27628a086c22b77" and "0fcf4d05932e8c0076acd6e8be449c84ea00ac63" have entirely different histories.
58cdc3a44b
...
0fcf4d0593
|
@ -92,7 +92,7 @@ public class ApiMemberController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@Transactional
|
@Transactional
|
||||||
public synchronized AjaxResult createMember(@Validated @RequestBody MemberCreateApiRequest memberCreateApiRequest) {
|
public AjaxResult createMember(@Validated @RequestBody MemberCreateApiRequest memberCreateApiRequest) {
|
||||||
|
|
||||||
IGamesService iGamesService = gamesService.get(memberCreateApiRequest.getPlatformCode() + Constants.SERVICE);
|
IGamesService iGamesService = gamesService.get(memberCreateApiRequest.getPlatformCode() + Constants.SERVICE);
|
||||||
ApiException.notNull(iGamesService, ErrorCode.PLATFORM_NOT_EXIST.getCode());
|
ApiException.notNull(iGamesService, ErrorCode.PLATFORM_NOT_EXIST.getCode());
|
||||||
|
|
|
@ -6,7 +6,6 @@ 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 javax.validation.constraints.Pattern;
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -22,7 +21,6 @@ public class MemberCreateApiRequest implements Serializable{
|
||||||
|
|
||||||
@NotBlank(message = "account不能为空")
|
@NotBlank(message = "account不能为空")
|
||||||
@Length(max = 64, message = "account长度不能超过64个字符")
|
@Length(max = 64, message = "account长度不能超过64个字符")
|
||||||
@Pattern(regexp = "^[a-z0-9]+$", message = "account只能包含小写字母和数字")
|
|
||||||
private String account;
|
private String account;
|
||||||
|
|
||||||
/** 平台编码 */
|
/** 平台编码 */
|
||||||
|
|
|
@ -94,6 +94,6 @@ public interface NGClient {
|
||||||
* @param headerMap 标题映射
|
* @param headerMap 标题映射
|
||||||
* @return {@link ApiNGResponseDTO }<{@link ApiGameBetRecordPageResponseDTO }>
|
* @return {@link ApiNGResponseDTO }<{@link ApiGameBetRecordPageResponseDTO }>
|
||||||
*/
|
*/
|
||||||
@Post(url = "server/recordHistory")
|
@Post(url = "server/recordAll")
|
||||||
ApiNGResponseDTO<ApiGameBetRecordPageResponseDTO> getBetRecordByTime(@JSONBody Map<String, Object> parameters, @Header Map<String, String> headerMap);
|
ApiNGResponseDTO<ApiGameBetRecordPageResponseDTO> getBetRecordByTime(@JSONBody Map<String, Object> parameters, @Header Map<String, String> headerMap);
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,10 +43,6 @@ import javax.annotation.Resource;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.security.SecureRandom;
|
import java.security.SecureRandom;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.time.Instant;
|
|
||||||
import java.time.ZoneId;
|
|
||||||
import java.time.ZoneOffset;
|
|
||||||
import java.time.format.DateTimeFormatter;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
@ -503,16 +499,6 @@ public class GamesPGServiceImpl implements IGamesService {
|
||||||
.build());
|
.build());
|
||||||
|
|
||||||
|
|
||||||
String startTime = DateTimeFormatter
|
|
||||||
.ofPattern("yyyy-MM-dd HH:mm:ss")
|
|
||||||
.withZone(ZoneId.of("Asia/Shanghai"))
|
|
||||||
.format(Instant.ofEpochMilli(betRecordByTimeDTO.getStartTime()));
|
|
||||||
|
|
||||||
String endTime = DateTimeFormatter
|
|
||||||
.ofPattern("yyyy-MM-dd HH:mm:ss")
|
|
||||||
.withZone(ZoneId.of("Asia/Shanghai"))
|
|
||||||
.format(Instant.ofEpochMilli(betRecordByTimeDTO.getEndTime()));
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
betRecordByTimeDTO.setAgentId(currencyDTO.getCode());
|
betRecordByTimeDTO.setAgentId(currencyDTO.getCode());
|
||||||
|
@ -523,11 +509,9 @@ public class GamesPGServiceImpl implements IGamesService {
|
||||||
paramsMap.put("currency", currencyDTO.getCurrency());
|
paramsMap.put("currency", currencyDTO.getCurrency());
|
||||||
paramsMap.put("pageNo", pageNo);
|
paramsMap.put("pageNo", pageNo);
|
||||||
paramsMap.put("pageSize", pageSize);
|
paramsMap.put("pageSize", pageSize);
|
||||||
paramsMap.put("startTime", startTime);
|
|
||||||
paramsMap.put("endTime",endTime);
|
|
||||||
Map<String, String> key = this.getKey(betRecordByTimeDTO);
|
Map<String, String> key = this.getKey(betRecordByTimeDTO);
|
||||||
|
|
||||||
|
SleepUtil.sleep(6000);
|
||||||
ApiNGResponseDTO<ApiGameBetRecordPageResponseDTO> betRecordByTime = ngClient.getBetRecordByTime(paramsMap, key);
|
ApiNGResponseDTO<ApiGameBetRecordPageResponseDTO> betRecordByTime = ngClient.getBetRecordByTime(paramsMap, key);
|
||||||
|
|
||||||
if (this.getIsSuccess(betRecordByTime.getCode())) {
|
if (this.getIsSuccess(betRecordByTime.getCode())) {
|
||||||
|
@ -555,9 +539,6 @@ public class GamesPGServiceImpl implements IGamesService {
|
||||||
paramMap.put("currency", currencyDTO.getCurrency());
|
paramMap.put("currency", currencyDTO.getCurrency());
|
||||||
paramMap.put("pageNo", pageNoAtomic.get());
|
paramMap.put("pageNo", pageNoAtomic.get());
|
||||||
paramMap.put("pageSize", pageSize);
|
paramMap.put("pageSize", pageSize);
|
||||||
paramMap.put("startTime", startTime);
|
|
||||||
paramMap.put("endTime", endTime);
|
|
||||||
SleepUtil.sleep(10000);
|
|
||||||
ApiNGResponseDTO<ApiGameBetRecordPageResponseDTO> betRecordByTimePage = ngClient.getBetRecordByTime(paramMap, key);
|
ApiNGResponseDTO<ApiGameBetRecordPageResponseDTO> betRecordByTimePage = ngClient.getBetRecordByTime(paramMap, key);
|
||||||
data = betRecordByTimePage.getData();
|
data = betRecordByTimePage.getData();
|
||||||
//数据组装
|
//数据组装
|
||||||
|
|
|
@ -124,7 +124,7 @@ public class MemberServiceImpl implements IMemberService
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Member selectMemberByGameAccount(String gameAccount) {
|
public Member selectMemberByGameAccount(String gameAccount) {
|
||||||
return memberMapper.selectMemberByGameAccount(gameAccount.toLowerCase());
|
return memberMapper.selectMemberByGameAccount(gameAccount);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package com.ff.quartz.task;
|
package com.ff.quartz.task;
|
||||||
|
|
||||||
import com.ff.base.constant.Constants;
|
import com.ff.base.constant.Constants;
|
||||||
import com.ff.base.core.redis.RedisCache;
|
|
||||||
import com.ff.base.datasource.DynamicDataSourceContextHolder;
|
import com.ff.base.datasource.DynamicDataSourceContextHolder;
|
||||||
import com.ff.base.enums.GamePlatforms;
|
import com.ff.base.enums.GamePlatforms;
|
||||||
import com.ff.base.enums.NGPlatforms;
|
import com.ff.base.enums.NGPlatforms;
|
||||||
|
@ -33,7 +32,6 @@ import org.springframework.security.core.parameters.P;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
import org.springframework.util.ObjectUtils;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.sql.DataSource;
|
import javax.sql.DataSource;
|
||||||
|
@ -74,10 +72,6 @@ public class GameTask {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IMemberService memberService;
|
private IMemberService memberService;
|
||||||
|
|
||||||
@Resource
|
|
||||||
private RedisCache redisCache;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 插入游戏投注详细信息
|
* 插入游戏投注详细信息
|
||||||
*/
|
*/
|
||||||
|
@ -122,17 +116,14 @@ public class GameTask {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 插入游戏ngbetting详细信息
|
* 插入游戏ngbetting详细信息
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
public void insertGameNGBettingDetails(Integer backTime) {
|
public void insertGameNGBettingDetails() {
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
//捞取指定分钟前的数据
|
|
||||||
Long startTime = DateUtils.addOrSubtractMinutes(DateUtils.getNowDate(), backTime);
|
|
||||||
Long endTime = DateUtils.getNowDate();
|
|
||||||
BetRecordByTimeDTO betRecordByTimeDTO = new BetRecordByTimeDTO();
|
BetRecordByTimeDTO betRecordByTimeDTO = new BetRecordByTimeDTO();
|
||||||
betRecordByTimeDTO.setStartTime(startTime);
|
|
||||||
betRecordByTimeDTO.setEndTime(endTime);
|
|
||||||
gamesService.get(NGPlatforms.PG.getPlatform() + Constants.SERVICE).getBetRecordByTime(betRecordByTimeDTO);
|
gamesService.get(NGPlatforms.PG.getPlatform() + Constants.SERVICE).getBetRecordByTime(betRecordByTimeDTO);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("查询 NG 投注记录失败,错误信息 {}", e);
|
log.error("查询 NG 投注记录失败,错误信息 {}", e);
|
||||||
|
|
Loading…
Reference in New Issue