feat(member): 添加会员投注限额功能
- 在会员创建接口中增加投注限额参数 - 更新相关 DTO 和服务实现以支持投注限额- 使用 JSON 序列化投注限额对象以适应 AE 接口要求main-ae
parent
8732f3e85f
commit
210d878de7
|
@ -132,6 +132,7 @@ public class ApiMemberController extends BaseController {
|
|||
.account(gameAccount)
|
||||
.agentId(gameSecretKey.getCode())
|
||||
.agentKey(gameSecretKey.getKey())
|
||||
.betLimit(memberCreateApiRequest.getBetLimit())
|
||||
.currency(gameSecretKey.getCurrency())
|
||||
.build();
|
||||
Boolean result = iGamesService.createMember(gamesBaseRequestDTO);
|
||||
|
|
|
@ -8,6 +8,7 @@ import javax.validation.constraints.NotBlank;
|
|||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Pattern;
|
||||
import java.io.Serializable;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 创建成员请求
|
||||
|
@ -34,4 +35,9 @@ public class MemberCreateApiRequest implements Serializable{
|
|||
@Length(max = 32, message = "currencyCode长度不能超过32个字符")
|
||||
private String currencyCode;
|
||||
|
||||
/**
|
||||
* 投注限额
|
||||
*/
|
||||
private Map<String, Map<String, Map<String, Object>>> betLimit;
|
||||
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ 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;
|
||||
|
@ -129,7 +130,7 @@ public class GamesAEServiceImpl implements IGamesService {
|
|||
Map<String, Object> params = this.getKey(createMemberRequestDTO);
|
||||
params.put("userId", createMemberRequestDTO.getAccount());
|
||||
params.put("currency", createMemberRequestDTO.getCurrency());
|
||||
params.put("betLimit", "{}");
|
||||
params.put("betLimit", JsonUtil.objToString(createMemberRequestDTO.getBetLimit()));
|
||||
AEResponse aeResponse = AEClient.createMember(params);
|
||||
String errorCode = aeResponse.getStatus();
|
||||
if (this.getIsSuccess(Integer.valueOf(errorCode))) {
|
||||
|
|
|
@ -6,6 +6,8 @@ import lombok.Data;
|
|||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 创建成员请求dto
|
||||
*
|
||||
|
@ -22,5 +24,10 @@ public class CreateMemberRequestDTO extends GamesBaseRequestDTO {
|
|||
*/
|
||||
private String account;
|
||||
|
||||
/**
|
||||
* 投注限额
|
||||
*/
|
||||
private Map<String, Map<String, Map<String, Object>>> betLimit;
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue