项目初始化
parent
12981b9dbd
commit
22a7943b33
|
|
@ -1,20 +1,25 @@
|
||||||
package com.ff.api.controller;
|
package com.ff.api.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.hutool.core.util.NumberUtil;
|
||||||
import com.ff.annotation.CheckHeader;
|
import com.ff.annotation.CheckHeader;
|
||||||
|
import com.ff.api.request.GameExchangeBalanceRequest;
|
||||||
import com.ff.api.request.GameLoginRequest;
|
import com.ff.api.request.GameLoginRequest;
|
||||||
import com.ff.api.request.MemberCreateApiRequest;
|
import com.ff.api.request.MemberCreateApiRequest;
|
||||||
import com.ff.base.constant.Constants;
|
import com.ff.base.constant.Constants;
|
||||||
import com.ff.base.core.controller.BaseController;
|
import com.ff.base.core.controller.BaseController;
|
||||||
import com.ff.base.core.domain.AjaxResult;
|
import com.ff.base.core.domain.AjaxResult;
|
||||||
|
import com.ff.base.enums.OperationType;
|
||||||
import com.ff.base.utils.SecurityUtils;
|
import com.ff.base.utils.SecurityUtils;
|
||||||
import com.ff.base.utils.StringUtils;
|
import com.ff.base.utils.StringUtils;
|
||||||
|
import com.ff.common.domain.TenantGameQuotaFlow;
|
||||||
import com.ff.common.domain.TenantSecretKey;
|
import com.ff.common.domain.TenantSecretKey;
|
||||||
|
import com.ff.common.dto.BalanceChangesDTO;
|
||||||
|
import com.ff.common.service.ITenantGameQuotaFlowService;
|
||||||
|
import com.ff.common.service.ITenantGameQuotaService;
|
||||||
import com.ff.config.KeyConfig;
|
import com.ff.config.KeyConfig;
|
||||||
import com.ff.game.api.IGamesService;
|
import com.ff.game.api.IGamesService;
|
||||||
import com.ff.game.api.request.CreateMemberRequestDTO;
|
import com.ff.game.api.request.*;
|
||||||
import com.ff.game.api.request.GamesLogin;
|
|
||||||
import com.ff.game.api.request.MemberInfoRequestDTO;
|
|
||||||
import com.ff.game.domain.Game;
|
import com.ff.game.domain.Game;
|
||||||
import com.ff.game.domain.GamePlatform;
|
import com.ff.game.domain.GamePlatform;
|
||||||
import com.ff.game.domain.GameSecretKey;
|
import com.ff.game.domain.GameSecretKey;
|
||||||
|
|
@ -24,6 +29,7 @@ import com.ff.game.service.IGameService;
|
||||||
import com.ff.member.domain.Member;
|
import com.ff.member.domain.Member;
|
||||||
import com.ff.member.service.IMemberService;
|
import com.ff.member.service.IMemberService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.util.Assert;
|
import org.springframework.util.Assert;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
|
@ -32,6 +38,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -67,6 +74,13 @@ public class ApiGameController extends BaseController {
|
||||||
private IGamePlatformService gamePlatformService;
|
private IGamePlatformService gamePlatformService;
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ITenantGameQuotaService tenantGameQuotaService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ITenantGameQuotaFlowService tenantGameQuotaFlowService;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 登录
|
* 登录
|
||||||
*
|
*
|
||||||
|
|
@ -84,7 +98,6 @@ public class ApiGameController extends BaseController {
|
||||||
|
|
||||||
|
|
||||||
IGamesService iGamesService = gamesService.get(gamePlatform.getPlatformCode() + Constants.SERVICE);
|
IGamesService iGamesService = gamesService.get(gamePlatform.getPlatformCode() + Constants.SERVICE);
|
||||||
Assert.notNull(iGamesService, "平台不存在");
|
|
||||||
|
|
||||||
|
|
||||||
TenantSecretKey tenantSecretKey = keyConfig.get();
|
TenantSecretKey tenantSecretKey = keyConfig.get();
|
||||||
|
|
@ -95,6 +108,7 @@ public class ApiGameController extends BaseController {
|
||||||
Assert.notNull(gameSecretKeyLang, "当前语言不存在");
|
Assert.notNull(gameSecretKeyLang, "当前语言不存在");
|
||||||
|
|
||||||
Member member = memberService.selectMemberByGameAccount(StringUtils.addSuffix(memberCreateApiRequest.getAccount(), memberCreateApiRequest.getCurrencyCode() + tenantSecretKey.getTenantSn()));
|
Member member = memberService.selectMemberByGameAccount(StringUtils.addSuffix(memberCreateApiRequest.getAccount(), memberCreateApiRequest.getCurrencyCode() + tenantSecretKey.getTenantSn()));
|
||||||
|
Assert.notNull(member, "会员不存在");
|
||||||
|
|
||||||
GamesLogin gamesLogin = GamesLogin.builder()
|
GamesLogin gamesLogin = GamesLogin.builder()
|
||||||
.agentId(gameSecretKey.getCode())
|
.agentId(gameSecretKey.getCode())
|
||||||
|
|
@ -113,7 +127,82 @@ public class ApiGameController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 汇兑差额
|
||||||
|
*
|
||||||
|
* @param gameExchangeBalanceRequest 游戏兑换余额请求
|
||||||
|
* @return {@link AjaxResult }
|
||||||
|
*/
|
||||||
|
@PostMapping("/exchange/balance")
|
||||||
|
@Transactional
|
||||||
|
public AjaxResult exchangeBalance(@Validated @RequestBody GameExchangeBalanceRequest gameExchangeBalanceRequest) {
|
||||||
|
|
||||||
|
|
||||||
|
IGamesService iGamesService = gamesService.get(gameExchangeBalanceRequest.getPlatformCode() + Constants.SERVICE);
|
||||||
|
|
||||||
|
|
||||||
|
TenantSecretKey tenantSecretKey = keyConfig.get();
|
||||||
|
GameSecretKey gameSecretKey = gameSecretKeyService.findSecretKeyByPlatformAndSystemCode(gameExchangeBalanceRequest.getPlatformCode(), gameExchangeBalanceRequest.getCurrencyCode());
|
||||||
|
Assert.notNull(gameSecretKey, "货币游戏平台不存在");
|
||||||
|
|
||||||
|
|
||||||
|
Member member = memberService.selectMemberByGameAccount(StringUtils.addSuffix(gameExchangeBalanceRequest.getAccount(), gameExchangeBalanceRequest.getCurrencyCode() + tenantSecretKey.getTenantSn()));
|
||||||
|
Assert.notNull(member, "会员不存在");
|
||||||
|
|
||||||
|
//操作租户额度
|
||||||
|
boolean isOut = gameExchangeBalanceRequest.getTransferType() == 1;
|
||||||
|
BigDecimal balanceRequestAmount = gameExchangeBalanceRequest.getAmount();
|
||||||
|
//如果是增加不可以超过对应的额度
|
||||||
|
if (isOut) {
|
||||||
|
|
||||||
|
//获取第三方钱包余额
|
||||||
|
MemberInfoRequestDTO gamesBaseRequestDTO = MemberInfoRequestDTO.builder()
|
||||||
|
.accounts(member.getGameAccount())
|
||||||
|
.agentId(gameSecretKey.getCode())
|
||||||
|
.agentKey(gameSecretKey.getKey())
|
||||||
|
.build();
|
||||||
|
balanceRequestAmount = iGamesService.getMemberInfo(gamesBaseRequestDTO).getBalance();
|
||||||
|
//转入金额
|
||||||
|
BigDecimal balanceInto = tenantGameQuotaFlowService.getBalanceByMemberId(TenantGameQuotaFlow.builder()
|
||||||
|
.isOut(Boolean.TRUE)
|
||||||
|
.tenantKey(tenantSecretKey.getTenantKey())
|
||||||
|
.memberId(member.getId())
|
||||||
|
.build());
|
||||||
|
//转出金额
|
||||||
|
BigDecimal balanceOut = tenantGameQuotaFlowService.getBalanceByMemberId(TenantGameQuotaFlow.builder()
|
||||||
|
.isOut(Boolean.FALSE)
|
||||||
|
.tenantKey(tenantSecretKey.getTenantKey())
|
||||||
|
.memberId(member.getId())
|
||||||
|
.build());
|
||||||
|
//如果转入金额+本次转入金额 大于转出额度则取差值
|
||||||
|
if (NumberUtil.add(balanceInto, balanceRequestAmount).compareTo(balanceOut) > 0){
|
||||||
|
balanceRequestAmount=NumberUtil.sub(balanceOut, balanceInto);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//余额扣除
|
||||||
|
tenantGameQuotaService.balanceChanges(BalanceChangesDTO.builder()
|
||||||
|
.isOut(isOut)
|
||||||
|
.tenantKey(tenantSecretKey.getTenantKey())
|
||||||
|
.balance(balanceRequestAmount)
|
||||||
|
.memberId(member.getId())
|
||||||
|
.operationType(OperationType.API_BALANCE.getCode())
|
||||||
|
.remark(OperationType.API_BALANCE.getDescription())
|
||||||
|
.build());
|
||||||
|
|
||||||
|
|
||||||
|
ExchangeTransferMoneyRequestDTO exchangeTransferMoneyRequestDTO = ExchangeTransferMoneyRequestDTO.builder()
|
||||||
|
.agentId(gameSecretKey.getCode())
|
||||||
|
.agentKey(gameSecretKey.getKey())
|
||||||
|
.account(member.getGameAccount())
|
||||||
|
.quota(balanceRequestAmount)
|
||||||
|
.amount(gameExchangeBalanceRequest.getAmount())
|
||||||
|
.transferType(gameExchangeBalanceRequest.getTransferType())
|
||||||
|
.orderId(gameExchangeBalanceRequest.getOrderId())
|
||||||
|
.build();
|
||||||
|
String transferByAgentId = iGamesService.exchangeTransferByAgentId(exchangeTransferMoneyRequestDTO);
|
||||||
|
|
||||||
|
return AjaxResult.success(transferByAgentId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ import com.ff.common.domain.TenantSecretKey;
|
||||||
import com.ff.config.KeyConfig;
|
import com.ff.config.KeyConfig;
|
||||||
import com.ff.game.api.IGamesService;
|
import com.ff.game.api.IGamesService;
|
||||||
import com.ff.game.api.request.CreateMemberRequestDTO;
|
import com.ff.game.api.request.CreateMemberRequestDTO;
|
||||||
|
import com.ff.game.api.request.GamesBaseRequestDTO;
|
||||||
import com.ff.game.api.request.MemberInfoRequestDTO;
|
import com.ff.game.api.request.MemberInfoRequestDTO;
|
||||||
import com.ff.game.domain.GameSecretKey;
|
import com.ff.game.domain.GameSecretKey;
|
||||||
import com.ff.game.service.IGameSecretKeyService;
|
import com.ff.game.service.IGameSecretKeyService;
|
||||||
|
|
@ -83,7 +84,7 @@ public class ApiMemberController extends BaseController {
|
||||||
Assert.isTrue(result, "建立游戏账号失败");
|
Assert.isTrue(result, "建立游戏账号失败");
|
||||||
//注册本地账号
|
//注册本地账号
|
||||||
Member member = Member.builder()
|
Member member = Member.builder()
|
||||||
.tenantKey(tenantSecretKey.getTenantSn())
|
.tenantKey(tenantSecretKey.getTenantKey())
|
||||||
.memberAccount(memberCreateApiRequest.getAccount())
|
.memberAccount(memberCreateApiRequest.getAccount())
|
||||||
.gameAccount(gameAccount)
|
.gameAccount(gameAccount)
|
||||||
.platformCode(memberCreateApiRequest.getPlatformCode())
|
.platformCode(memberCreateApiRequest.getPlatformCode())
|
||||||
|
|
@ -111,6 +112,7 @@ public class ApiMemberController extends BaseController {
|
||||||
|
|
||||||
Member member = memberService.selectMemberByGameAccount(StringUtils.addSuffix(memberCreateApiRequest.getAccount(), memberCreateApiRequest.getCurrencyCode() + tenantSecretKey.getTenantSn()));
|
Member member = memberService.selectMemberByGameAccount(StringUtils.addSuffix(memberCreateApiRequest.getAccount(), memberCreateApiRequest.getCurrencyCode() + tenantSecretKey.getTenantSn()));
|
||||||
Assert.notNull(member, "会员不存在");
|
Assert.notNull(member, "会员不存在");
|
||||||
|
|
||||||
//向第三方查询账号
|
//向第三方查询账号
|
||||||
MemberInfoRequestDTO gamesBaseRequestDTO = MemberInfoRequestDTO.builder()
|
MemberInfoRequestDTO gamesBaseRequestDTO = MemberInfoRequestDTO.builder()
|
||||||
.accounts(member.getGameAccount())
|
.accounts(member.getGameAccount())
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,68 @@
|
||||||
|
package com.ff.api.request;
|
||||||
|
|
||||||
|
import com.ff.base.annotation.Excel;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.hibernate.validator.constraints.Length;
|
||||||
|
|
||||||
|
import javax.validation.constraints.Max;
|
||||||
|
import javax.validation.constraints.Min;
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 游戏兑换余额请求
|
||||||
|
*
|
||||||
|
* @author shi
|
||||||
|
* @date 2025/02/11
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class GameExchangeBalanceRequest implements Serializable {
|
||||||
|
private final static long serialVersionUID = -881298930995538038L;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 账户
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "account不能为空")
|
||||||
|
private String account;
|
||||||
|
|
||||||
|
|
||||||
|
/** 平台编码 */
|
||||||
|
@NotBlank(message = "platformCode不能为空")
|
||||||
|
private String platformCode;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 金额
|
||||||
|
*/
|
||||||
|
@NotNull(message = "amount不能为空")
|
||||||
|
private BigDecimal amount;
|
||||||
|
|
||||||
|
|
||||||
|
/** 币种编码 */
|
||||||
|
@NotBlank(message = "currencyCode不能为空")
|
||||||
|
private String currencyCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 转账类型
|
||||||
|
* 1: 从 游戏商 转移额度到 平台商 (不看 amount 值,全
|
||||||
|
* 部转出)
|
||||||
|
* 2: 从 平台商 转移额度到 游戏商
|
||||||
|
*/
|
||||||
|
@NotNull(message = "transferType不能为空")
|
||||||
|
@Min(value = 1, message = "transferType最小值为1")
|
||||||
|
@Max(value = 2, message = "transferType最大值为2")
|
||||||
|
private Integer transferType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单id
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "orderId不能为空")
|
||||||
|
@Length(min = 32,max = 32, message = "orderId长度不能超过32个字符")
|
||||||
|
private String orderId;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
package com.ff.api.request;
|
package com.ff.api.request;
|
||||||
|
|
||||||
import com.dtflys.forest.annotation.NotNull;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -39,7 +39,7 @@ public class GameLoginRequest implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 游戏id
|
* 游戏id
|
||||||
*/
|
*/
|
||||||
@NotBlank(message = "gameId不能为空")
|
@NotNull(message = "gameId不能为空")
|
||||||
private Long gameId;
|
private Long gameId;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,104 @@
|
||||||
|
package com.ff.common.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.ff.base.annotation.Log;
|
||||||
|
import com.ff.base.core.controller.BaseController;
|
||||||
|
import com.ff.base.core.domain.AjaxResult;
|
||||||
|
import com.ff.base.enums.BusinessType;
|
||||||
|
import com.ff.common.domain.TenantGameQuota;
|
||||||
|
import com.ff.common.service.ITenantGameQuotaService;
|
||||||
|
import com.ff.base.utils.poi.ExcelUtil;
|
||||||
|
import com.ff.base.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户游戏配额Controller
|
||||||
|
*
|
||||||
|
* @author shi
|
||||||
|
* @date 2025-02-12
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/common/quota")
|
||||||
|
public class TenantGameQuotaController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private ITenantGameQuotaService tenantGameQuotaService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询租户游戏配额列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('common:quota:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(TenantGameQuota tenantGameQuota)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<TenantGameQuota> list = tenantGameQuotaService.selectTenantGameQuotaList(tenantGameQuota);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出租户游戏配额列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('common:quota:export')")
|
||||||
|
@Log(title = "租户游戏配额", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, TenantGameQuota tenantGameQuota)
|
||||||
|
{
|
||||||
|
List<TenantGameQuota> list = tenantGameQuotaService.selectTenantGameQuotaList(tenantGameQuota);
|
||||||
|
ExcelUtil<TenantGameQuota> util = new ExcelUtil<TenantGameQuota>(TenantGameQuota.class);
|
||||||
|
util.exportExcel(response, list, "租户游戏配额数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取租户游戏配额详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('common:quota:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return success(tenantGameQuotaService.selectTenantGameQuotaById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增租户游戏配额
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('common:quota:add')")
|
||||||
|
@Log(title = "租户游戏配额", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody TenantGameQuota tenantGameQuota)
|
||||||
|
{
|
||||||
|
return toAjax(tenantGameQuotaService.insertTenantGameQuota(tenantGameQuota));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改租户游戏配额
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('common:quota:edit')")
|
||||||
|
@Log(title = "租户游戏配额", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody TenantGameQuota tenantGameQuota)
|
||||||
|
{
|
||||||
|
return toAjax(tenantGameQuotaService.updateTenantGameQuota(tenantGameQuota));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除租户游戏配额
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('common:quota:remove')")
|
||||||
|
@Log(title = "租户游戏配额", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(tenantGameQuotaService.deleteTenantGameQuotaByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,104 @@
|
||||||
|
package com.ff.common.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.ff.base.annotation.Log;
|
||||||
|
import com.ff.base.core.controller.BaseController;
|
||||||
|
import com.ff.base.core.domain.AjaxResult;
|
||||||
|
import com.ff.base.enums.BusinessType;
|
||||||
|
import com.ff.common.domain.TenantGameQuotaFlow;
|
||||||
|
import com.ff.common.service.ITenantGameQuotaFlowService;
|
||||||
|
import com.ff.base.utils.poi.ExcelUtil;
|
||||||
|
import com.ff.base.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户游戏额度流水Controller
|
||||||
|
*
|
||||||
|
* @author shi
|
||||||
|
* @date 2025-02-12
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/common/flow")
|
||||||
|
public class TenantGameQuotaFlowController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private ITenantGameQuotaFlowService tenantGameQuotaFlowService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询租户游戏额度流水列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('common:flow:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(TenantGameQuotaFlow tenantGameQuotaFlow)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<TenantGameQuotaFlow> list = tenantGameQuotaFlowService.selectTenantGameQuotaFlowList(tenantGameQuotaFlow);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出租户游戏额度流水列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('common:flow:export')")
|
||||||
|
@Log(title = "租户游戏额度流水", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, TenantGameQuotaFlow tenantGameQuotaFlow)
|
||||||
|
{
|
||||||
|
List<TenantGameQuotaFlow> list = tenantGameQuotaFlowService.selectTenantGameQuotaFlowList(tenantGameQuotaFlow);
|
||||||
|
ExcelUtil<TenantGameQuotaFlow> util = new ExcelUtil<TenantGameQuotaFlow>(TenantGameQuotaFlow.class);
|
||||||
|
util.exportExcel(response, list, "租户游戏额度流水数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取租户游戏额度流水详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('common:flow:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return success(tenantGameQuotaFlowService.selectTenantGameQuotaFlowById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增租户游戏额度流水
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('common:flow:add')")
|
||||||
|
@Log(title = "租户游戏额度流水", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody TenantGameQuotaFlow tenantGameQuotaFlow)
|
||||||
|
{
|
||||||
|
return toAjax(tenantGameQuotaFlowService.insertTenantGameQuotaFlow(tenantGameQuotaFlow));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改租户游戏额度流水
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('common:flow:edit')")
|
||||||
|
@Log(title = "租户游戏额度流水", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody TenantGameQuotaFlow tenantGameQuotaFlow)
|
||||||
|
{
|
||||||
|
return toAjax(tenantGameQuotaFlowService.updateTenantGameQuotaFlow(tenantGameQuotaFlow));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除租户游戏额度流水
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('common:flow:remove')")
|
||||||
|
@Log(title = "租户游戏额度流水", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(tenantGameQuotaFlowService.deleteTenantGameQuotaFlowByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,45 @@
|
||||||
|
package com.ff.common.domain;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import com.ff.base.annotation.Excel;
|
||||||
|
import com.ff.base.core.domain.BaseEntity;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户游戏配额对象 ff_tenant_game_quota
|
||||||
|
*
|
||||||
|
* @author shi
|
||||||
|
* @date 2025-02-12
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Builder
|
||||||
|
public class TenantGameQuota extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键id */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 租户key */
|
||||||
|
@Excel(name = "租户key")
|
||||||
|
private String tenantKey;
|
||||||
|
|
||||||
|
/** 游戏额度 */
|
||||||
|
@Excel(name = "游戏额度")
|
||||||
|
private BigDecimal balance;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** 版本号 */
|
||||||
|
@Excel(name = "版本号")
|
||||||
|
private Integer version;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
package com.ff.common.domain;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import com.ff.base.annotation.Excel;
|
||||||
|
import com.ff.base.core.domain.BaseEntity;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户游戏额度流水对象 ff_tenant_game_quota_flow
|
||||||
|
*
|
||||||
|
* @author shi
|
||||||
|
* @date 2025-02-12
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Builder
|
||||||
|
public class TenantGameQuotaFlow extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键id */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 租户key */
|
||||||
|
@Excel(name = "租户key")
|
||||||
|
private String tenantKey;
|
||||||
|
|
||||||
|
/** 用户账号id */
|
||||||
|
@Excel(name = "用户账号id")
|
||||||
|
private Long memberId;
|
||||||
|
|
||||||
|
/** 充值类型 false 扣除 true 充值 */
|
||||||
|
@Excel(name = "充值类型 false 扣除 true 充值")
|
||||||
|
private Boolean isOut;
|
||||||
|
|
||||||
|
/** 操作类型 operationType枚举 */
|
||||||
|
@Excel(name = "操作类型 operationType枚举")
|
||||||
|
private Integer operationType;
|
||||||
|
|
||||||
|
/** 游戏额度之前 */
|
||||||
|
@Excel(name = "游戏额度之前")
|
||||||
|
private BigDecimal balanceBefore;
|
||||||
|
|
||||||
|
/** 游戏额度 */
|
||||||
|
@Excel(name = "游戏额度")
|
||||||
|
private BigDecimal balance;
|
||||||
|
|
||||||
|
/** 游戏额度之后 */
|
||||||
|
@Excel(name = "游戏额度之后")
|
||||||
|
private BigDecimal balanceAfter;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
package com.ff.common.dto;
|
||||||
|
|
||||||
|
|
||||||
|
import com.ff.base.annotation.Excel;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 余额更改为
|
||||||
|
*
|
||||||
|
* @author shi
|
||||||
|
* @date 2025/02/12
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Builder
|
||||||
|
public class BalanceChangesDTO implements Serializable {
|
||||||
|
private static final long serialVersionUID = -7479292236485670076L;
|
||||||
|
|
||||||
|
/** 充值类型 false 扣除 true 充值 */
|
||||||
|
private Boolean isOut;
|
||||||
|
|
||||||
|
|
||||||
|
/** 租户key */
|
||||||
|
private String tenantKey;
|
||||||
|
|
||||||
|
/** 游戏额度 */
|
||||||
|
private BigDecimal balance;
|
||||||
|
|
||||||
|
/** 备注 */
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 成员id
|
||||||
|
*/
|
||||||
|
private Long memberId;
|
||||||
|
|
||||||
|
|
||||||
|
/** 操作类型 OperationType枚举 */
|
||||||
|
private Integer operationType;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,71 @@
|
||||||
|
package com.ff.common.mapper;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
import com.ff.common.domain.TenantGameQuotaFlow;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户游戏额度流水Mapper接口
|
||||||
|
*
|
||||||
|
* @author shi
|
||||||
|
* @date 2025-02-12
|
||||||
|
*/
|
||||||
|
public interface TenantGameQuotaFlowMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询租户游戏额度流水
|
||||||
|
*
|
||||||
|
* @param id 租户游戏额度流水主键
|
||||||
|
* @return 租户游戏额度流水
|
||||||
|
*/
|
||||||
|
TenantGameQuotaFlow selectTenantGameQuotaFlowById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询租户游戏额度流水列表
|
||||||
|
*
|
||||||
|
* @param tenantGameQuotaFlow 租户游戏额度流水
|
||||||
|
* @return 租户游戏额度流水集合
|
||||||
|
*/
|
||||||
|
List<TenantGameQuotaFlow> selectTenantGameQuotaFlowList(TenantGameQuotaFlow tenantGameQuotaFlow);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增租户游戏额度流水
|
||||||
|
*
|
||||||
|
* @param tenantGameQuotaFlow 租户游戏额度流水
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int insertTenantGameQuotaFlow(TenantGameQuotaFlow tenantGameQuotaFlow);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改租户游戏额度流水
|
||||||
|
*
|
||||||
|
* @param tenantGameQuotaFlow 租户游戏额度流水
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int updateTenantGameQuotaFlow(TenantGameQuotaFlow tenantGameQuotaFlow);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除租户游戏额度流水
|
||||||
|
*
|
||||||
|
* @param id 租户游戏额度流水主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteTenantGameQuotaFlowById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除租户游戏额度流水
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteTenantGameQuotaFlowByIds(Long[] ids);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过会员id获取余额
|
||||||
|
*
|
||||||
|
* @param tenantGameQuotaFlow 租户游戏配额流
|
||||||
|
* @return {@link BigDecimal }
|
||||||
|
*/
|
||||||
|
BigDecimal getBalanceByMemberId(TenantGameQuotaFlow tenantGameQuotaFlow);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,79 @@
|
||||||
|
package com.ff.common.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ff.common.domain.TenantGameQuota;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户游戏配额Mapper接口
|
||||||
|
*
|
||||||
|
* @author shi
|
||||||
|
* @date 2025-02-12
|
||||||
|
*/
|
||||||
|
public interface TenantGameQuotaMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询租户游戏配额
|
||||||
|
*
|
||||||
|
* @param id 租户游戏配额主键
|
||||||
|
* @return 租户游戏配额
|
||||||
|
*/
|
||||||
|
TenantGameQuota selectTenantGameQuotaById(Long id);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询租户游戏配额
|
||||||
|
*
|
||||||
|
* @param tenantKey 租户游戏配额主键
|
||||||
|
* @return 租户游戏配额
|
||||||
|
*/
|
||||||
|
TenantGameQuota selectTenantGameQuotaByTenantKey(String tenantKey);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询租户游戏配额列表
|
||||||
|
*
|
||||||
|
* @param tenantGameQuota 租户游戏配额
|
||||||
|
* @return 租户游戏配额集合
|
||||||
|
*/
|
||||||
|
List<TenantGameQuota> selectTenantGameQuotaList(TenantGameQuota tenantGameQuota);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增租户游戏配额
|
||||||
|
*
|
||||||
|
* @param tenantGameQuota 租户游戏配额
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int insertTenantGameQuota(TenantGameQuota tenantGameQuota);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改租户游戏配额
|
||||||
|
*
|
||||||
|
* @param tenantGameQuota 租户游戏配额
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int updateTenantGameQuota(TenantGameQuota tenantGameQuota);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 改变余额
|
||||||
|
*
|
||||||
|
* @param tenantGameQuota sys游戏配额
|
||||||
|
* @return {@link Boolean }
|
||||||
|
*/
|
||||||
|
Boolean changeBalance(TenantGameQuota tenantGameQuota);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除租户游戏配额
|
||||||
|
*
|
||||||
|
* @param id 租户游戏配额主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteTenantGameQuotaById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除租户游戏配额
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteTenantGameQuotaByIds(Long[] ids);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,70 @@
|
||||||
|
package com.ff.common.service;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
import com.ff.common.domain.TenantGameQuotaFlow;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户游戏额度流水Service接口
|
||||||
|
*
|
||||||
|
* @author shi
|
||||||
|
* @date 2025-02-12
|
||||||
|
*/
|
||||||
|
public interface ITenantGameQuotaFlowService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询租户游戏额度流水
|
||||||
|
*
|
||||||
|
* @param id 租户游戏额度流水主键
|
||||||
|
* @return 租户游戏额度流水
|
||||||
|
*/
|
||||||
|
TenantGameQuotaFlow selectTenantGameQuotaFlowById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询租户游戏额度流水列表
|
||||||
|
*
|
||||||
|
* @param tenantGameQuotaFlow 租户游戏额度流水
|
||||||
|
* @return 租户游戏额度流水集合
|
||||||
|
*/
|
||||||
|
List<TenantGameQuotaFlow> selectTenantGameQuotaFlowList(TenantGameQuotaFlow tenantGameQuotaFlow);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增租户游戏额度流水
|
||||||
|
*
|
||||||
|
* @param tenantGameQuotaFlow 租户游戏额度流水
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int insertTenantGameQuotaFlow(TenantGameQuotaFlow tenantGameQuotaFlow);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改租户游戏额度流水
|
||||||
|
*
|
||||||
|
* @param tenantGameQuotaFlow 租户游戏额度流水
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int updateTenantGameQuotaFlow(TenantGameQuotaFlow tenantGameQuotaFlow);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除租户游戏额度流水
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的租户游戏额度流水主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteTenantGameQuotaFlowByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除租户游戏额度流水信息
|
||||||
|
*
|
||||||
|
* @param id 租户游戏额度流水主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteTenantGameQuotaFlowById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过会员id获取余额
|
||||||
|
*
|
||||||
|
* @param tenantGameQuotaFlow 租户游戏配额流
|
||||||
|
* @return {@link BigDecimal }
|
||||||
|
*/
|
||||||
|
BigDecimal getBalanceByMemberId(TenantGameQuotaFlow tenantGameQuotaFlow);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,70 @@
|
||||||
|
package com.ff.common.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ff.common.domain.TenantGameQuota;
|
||||||
|
import com.ff.common.dto.BalanceChangesDTO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户游戏配额Service接口
|
||||||
|
*
|
||||||
|
* @author shi
|
||||||
|
* @date 2025-02-12
|
||||||
|
*/
|
||||||
|
public interface ITenantGameQuotaService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询租户游戏配额
|
||||||
|
*
|
||||||
|
* @param id 租户游戏配额主键
|
||||||
|
* @return 租户游戏配额
|
||||||
|
*/
|
||||||
|
TenantGameQuota selectTenantGameQuotaById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询租户游戏配额列表
|
||||||
|
*
|
||||||
|
* @param tenantGameQuota 租户游戏配额
|
||||||
|
* @return 租户游戏配额集合
|
||||||
|
*/
|
||||||
|
List<TenantGameQuota> selectTenantGameQuotaList(TenantGameQuota tenantGameQuota);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增租户游戏配额
|
||||||
|
*
|
||||||
|
* @param tenantGameQuota 租户游戏配额
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int insertTenantGameQuota(TenantGameQuota tenantGameQuota);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改租户游戏配额
|
||||||
|
*
|
||||||
|
* @param tenantGameQuota 租户游戏配额
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int updateTenantGameQuota(TenantGameQuota tenantGameQuota);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除租户游戏配额
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的租户游戏配额主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteTenantGameQuotaByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除租户游戏配额信息
|
||||||
|
*
|
||||||
|
* @param id 租户游戏配额主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteTenantGameQuotaById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 余额变化
|
||||||
|
*
|
||||||
|
* @param balanceChangesDTO 余额更改为
|
||||||
|
* @return {@link Boolean }
|
||||||
|
*/
|
||||||
|
Boolean balanceChanges(BalanceChangesDTO balanceChangesDTO);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,108 @@
|
||||||
|
package com.ff.common.service.impl;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
import com.ff.base.utils.DateUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ff.common.mapper.TenantGameQuotaFlowMapper;
|
||||||
|
import com.ff.common.domain.TenantGameQuotaFlow;
|
||||||
|
import com.ff.common.service.ITenantGameQuotaFlowService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户游戏额度流水Service业务层处理
|
||||||
|
*
|
||||||
|
* @author shi
|
||||||
|
* @date 2025-02-12
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class TenantGameQuotaFlowServiceImpl implements ITenantGameQuotaFlowService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private TenantGameQuotaFlowMapper tenantGameQuotaFlowMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询租户游戏额度流水
|
||||||
|
*
|
||||||
|
* @param id 租户游戏额度流水主键
|
||||||
|
* @return 租户游戏额度流水
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TenantGameQuotaFlow selectTenantGameQuotaFlowById(Long id)
|
||||||
|
{
|
||||||
|
return tenantGameQuotaFlowMapper.selectTenantGameQuotaFlowById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询租户游戏额度流水列表
|
||||||
|
*
|
||||||
|
* @param tenantGameQuotaFlow 租户游戏额度流水
|
||||||
|
* @return 租户游戏额度流水
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<TenantGameQuotaFlow> selectTenantGameQuotaFlowList(TenantGameQuotaFlow tenantGameQuotaFlow)
|
||||||
|
{
|
||||||
|
return tenantGameQuotaFlowMapper.selectTenantGameQuotaFlowList(tenantGameQuotaFlow);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增租户游戏额度流水
|
||||||
|
*
|
||||||
|
* @param tenantGameQuotaFlow 租户游戏额度流水
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertTenantGameQuotaFlow(TenantGameQuotaFlow tenantGameQuotaFlow)
|
||||||
|
{
|
||||||
|
tenantGameQuotaFlow.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return tenantGameQuotaFlowMapper.insertTenantGameQuotaFlow(tenantGameQuotaFlow);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改租户游戏额度流水
|
||||||
|
*
|
||||||
|
* @param tenantGameQuotaFlow 租户游戏额度流水
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateTenantGameQuotaFlow(TenantGameQuotaFlow tenantGameQuotaFlow)
|
||||||
|
{
|
||||||
|
tenantGameQuotaFlow.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return tenantGameQuotaFlowMapper.updateTenantGameQuotaFlow(tenantGameQuotaFlow);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除租户游戏额度流水
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的租户游戏额度流水主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteTenantGameQuotaFlowByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return tenantGameQuotaFlowMapper.deleteTenantGameQuotaFlowByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除租户游戏额度流水信息
|
||||||
|
*
|
||||||
|
* @param id 租户游戏额度流水主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteTenantGameQuotaFlowById(Long id)
|
||||||
|
{
|
||||||
|
return tenantGameQuotaFlowMapper.deleteTenantGameQuotaFlowById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过会员id获取余额
|
||||||
|
*
|
||||||
|
* @param tenantGameQuotaFlow 租户游戏配额流
|
||||||
|
* @return {@link BigDecimal }
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public BigDecimal getBalanceByMemberId(TenantGameQuotaFlow tenantGameQuotaFlow) {
|
||||||
|
return tenantGameQuotaFlowMapper.getBalanceByMemberId(tenantGameQuotaFlow);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,166 @@
|
||||||
|
package com.ff.common.service.impl;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.NumberUtil;
|
||||||
|
import com.ff.base.constant.Constants;
|
||||||
|
import com.ff.base.utils.DateUtils;
|
||||||
|
import com.ff.base.utils.MessageUtils;
|
||||||
|
import com.ff.base.utils.SecurityUtils;
|
||||||
|
import com.ff.common.domain.TenantGameQuotaFlow;
|
||||||
|
import com.ff.common.dto.BalanceChangesDTO;
|
||||||
|
import com.ff.common.mapper.TenantGameQuotaFlowMapper;
|
||||||
|
import com.ff.common.service.ITenantGameQuotaFlowService;
|
||||||
|
import com.ff.common.service.ITenantSecretKeyService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ff.common.mapper.TenantGameQuotaMapper;
|
||||||
|
import com.ff.common.domain.TenantGameQuota;
|
||||||
|
import com.ff.common.service.ITenantGameQuotaService;
|
||||||
|
import org.springframework.util.Assert;
|
||||||
|
import org.springframework.util.ObjectUtils;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户游戏配额Service业务层处理
|
||||||
|
*
|
||||||
|
* @author shi
|
||||||
|
* @date 2025-02-12
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class TenantGameQuotaServiceImpl implements ITenantGameQuotaService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private TenantGameQuotaMapper tenantGameQuotaMapper;
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ITenantGameQuotaFlowService tenantGameQuotaFlowService;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询租户游戏配额
|
||||||
|
*
|
||||||
|
* @param id 租户游戏配额主键
|
||||||
|
* @return 租户游戏配额
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TenantGameQuota selectTenantGameQuotaById(Long id)
|
||||||
|
{
|
||||||
|
return tenantGameQuotaMapper.selectTenantGameQuotaById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询租户游戏配额列表
|
||||||
|
*
|
||||||
|
* @param tenantGameQuota 租户游戏配额
|
||||||
|
* @return 租户游戏配额
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<TenantGameQuota> selectTenantGameQuotaList(TenantGameQuota tenantGameQuota)
|
||||||
|
{
|
||||||
|
return tenantGameQuotaMapper.selectTenantGameQuotaList(tenantGameQuota);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增租户游戏配额
|
||||||
|
*
|
||||||
|
* @param tenantGameQuota 租户游戏配额
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertTenantGameQuota(TenantGameQuota tenantGameQuota)
|
||||||
|
{
|
||||||
|
tenantGameQuota.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return tenantGameQuotaMapper.insertTenantGameQuota(tenantGameQuota);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改租户游戏配额
|
||||||
|
*
|
||||||
|
* @param tenantGameQuota 租户游戏配额
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateTenantGameQuota(TenantGameQuota tenantGameQuota)
|
||||||
|
{
|
||||||
|
tenantGameQuota.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return tenantGameQuotaMapper.updateTenantGameQuota(tenantGameQuota);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除租户游戏配额
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的租户游戏配额主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteTenantGameQuotaByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return tenantGameQuotaMapper.deleteTenantGameQuotaByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除租户游戏配额信息
|
||||||
|
*
|
||||||
|
* @param id 租户游戏配额主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteTenantGameQuotaById(Long id)
|
||||||
|
{
|
||||||
|
return tenantGameQuotaMapper.deleteTenantGameQuotaById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 平衡变化
|
||||||
|
*
|
||||||
|
* @param balanceChangesDTO 余额更改为
|
||||||
|
* @return {@link Boolean }
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean balanceChanges(BalanceChangesDTO balanceChangesDTO) {
|
||||||
|
TenantGameQuota tenantGameQuota = tenantGameQuotaMapper.selectTenantGameQuotaByTenantKey(balanceChangesDTO.getTenantKey());
|
||||||
|
Assert.isTrue(!ObjectUtils.isEmpty(tenantGameQuota), "余额额度不足");
|
||||||
|
|
||||||
|
BigDecimal balanceBefore = tenantGameQuota.getBalance();
|
||||||
|
BigDecimal balance =balanceChangesDTO.getBalance();
|
||||||
|
if (BigDecimal.ZERO.compareTo(balance) >= 0) {
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}
|
||||||
|
BigDecimal balanceAfter = tenantGameQuota.getBalance();
|
||||||
|
//判断是充值还是扣除
|
||||||
|
if (balanceChangesDTO.getIsOut()) {
|
||||||
|
balanceAfter = NumberUtil.add(balanceBefore, balance);
|
||||||
|
} else {
|
||||||
|
balanceAfter = NumberUtil.sub(balanceBefore, balance);
|
||||||
|
}
|
||||||
|
//判断剩余额度是否大于0
|
||||||
|
Assert.isTrue(balanceAfter.compareTo(BigDecimal.ZERO)>=0, "余额额度不足");
|
||||||
|
//修改余额
|
||||||
|
Boolean changedBalanceResult = tenantGameQuotaMapper.changeBalance(TenantGameQuota.builder()
|
||||||
|
.tenantKey(balanceChangesDTO.getTenantKey())
|
||||||
|
.balance(balanceAfter)
|
||||||
|
.version(tenantGameQuota.getVersion())
|
||||||
|
.build());
|
||||||
|
Assert.isTrue(changedBalanceResult, "租户游戏额度操作失败");
|
||||||
|
|
||||||
|
//插入流水
|
||||||
|
TenantGameQuotaFlow tenantGameQuotaFlow = TenantGameQuotaFlow.builder()
|
||||||
|
.tenantKey(balanceChangesDTO.getTenantKey())
|
||||||
|
.isOut(balanceChangesDTO.getIsOut())
|
||||||
|
.balanceAfter(balanceAfter)
|
||||||
|
.memberId(balanceChangesDTO.getMemberId())
|
||||||
|
.balance(balance)
|
||||||
|
.balanceBefore(balanceBefore)
|
||||||
|
.operationType(balanceChangesDTO.getOperationType())
|
||||||
|
.build();
|
||||||
|
tenantGameQuotaFlow.setRemark(balanceChangesDTO.getRemark());
|
||||||
|
tenantGameQuotaFlow.setCreateTime(DateUtils.getNowDate());
|
||||||
|
tenantGameQuotaFlow.setCreateBy(Constants.SYSTEM);
|
||||||
|
tenantGameQuotaFlowService.insertTenantGameQuotaFlow(tenantGameQuotaFlow);
|
||||||
|
return changedBalanceResult;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -67,7 +67,7 @@ public interface IGamesService {
|
||||||
* @param exchangeTransferMoneyRequestDTO 外汇转账moeny dto
|
* @param exchangeTransferMoneyRequestDTO 外汇转账moeny dto
|
||||||
* @return {@link Long }
|
* @return {@link Long }
|
||||||
*/
|
*/
|
||||||
Long exchangeTransferByAgentId(ExchangeTransferMoneyRequestDTO exchangeTransferMoneyRequestDTO);
|
String exchangeTransferByAgentId(ExchangeTransferMoneyRequestDTO exchangeTransferMoneyRequestDTO);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 按时间获取投注记录
|
* 按时间获取投注记录
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,9 @@
|
||||||
package com.ff.game.api.jili.client;
|
package com.ff.game.api.jili.client;
|
||||||
|
|
||||||
import com.dtflys.forest.annotation.Address;
|
import com.dtflys.forest.annotation.*;
|
||||||
import com.dtflys.forest.annotation.Get;
|
|
||||||
import com.dtflys.forest.annotation.Request;
|
|
||||||
import com.dtflys.forest.annotation.Var;
|
|
||||||
import com.ff.game.api.jili.address.MyJILIAddressSource;
|
import com.ff.game.api.jili.address.MyJILIAddressSource;
|
||||||
import com.ff.game.api.jili.dto.JILICreateMemberResponseDTO;
|
import com.ff.game.api.jili.dto.*;
|
||||||
import com.ff.game.api.jili.dto.JILIGamesDTO;
|
import com.ff.game.api.request.GamesBaseRequestDTO;
|
||||||
import com.ff.game.api.jili.dto.JILILoginWithoutRedirectResponseDTO;
|
|
||||||
import com.ff.game.api.jili.dto.JILIMemberInfoDTO;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* jili 请求
|
* jili 请求
|
||||||
|
|
@ -53,4 +48,18 @@ public interface JILIClient {
|
||||||
*/
|
*/
|
||||||
@Get("/GetGameList?${parameters}")
|
@Get("/GetGameList?${parameters}")
|
||||||
JILIGamesDTO getGameList(@Var("parameters") String parameters);
|
JILIGamesDTO getGameList(@Var("parameters") String parameters);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 按代理id进行交换转账
|
||||||
|
*
|
||||||
|
* @param parameters 参数
|
||||||
|
* @return {@link JILIExchangeMoneyResponseDTO }
|
||||||
|
*/
|
||||||
|
@Post(
|
||||||
|
url = "/ExchangeTransferByAgentId?${parameters}",
|
||||||
|
headers = {
|
||||||
|
"Content-type: application/x-www-form-urlencoded"
|
||||||
|
}
|
||||||
|
)
|
||||||
|
JILIExchangeMoneyResponseDTO exchangeTransferByAgentId(@Var("parameters") String parameters,@Body("AgentId") String username);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,7 @@ 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;
|
||||||
import com.ff.base.enums.FreeStatus;
|
import com.ff.base.enums.*;
|
||||||
import com.ff.base.enums.GamePlatforms;
|
|
||||||
import com.ff.base.enums.GameStatus;
|
|
||||||
import com.ff.base.enums.JILIGameType;
|
|
||||||
import com.ff.base.exception.base.BaseException;
|
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;
|
||||||
|
|
@ -19,6 +16,10 @@ import com.ff.base.utils.http.HttpClientSslUtils;
|
||||||
import com.ff.base.utils.http.HttpUtils;
|
import com.ff.base.utils.http.HttpUtils;
|
||||||
import com.ff.base.utils.sign.Md5Utils;
|
import com.ff.base.utils.sign.Md5Utils;
|
||||||
import com.ff.base.utils.uuid.IdUtils;
|
import com.ff.base.utils.uuid.IdUtils;
|
||||||
|
import com.ff.common.domain.TenantSecretKey;
|
||||||
|
import com.ff.common.dto.BalanceChangesDTO;
|
||||||
|
import com.ff.common.service.ITenantGameQuotaService;
|
||||||
|
import com.ff.config.KeyConfig;
|
||||||
import com.ff.game.api.IGamesService;
|
import com.ff.game.api.IGamesService;
|
||||||
import com.ff.game.api.jili.client.JILIClient;
|
import com.ff.game.api.jili.client.JILIClient;
|
||||||
import com.ff.game.api.jili.dto.*;
|
import com.ff.game.api.jili.dto.*;
|
||||||
|
|
@ -31,6 +32,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.http.entity.ContentType;
|
import org.apache.http.entity.ContentType;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.util.Assert;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
import org.springframework.util.ObjectUtils;
|
import org.springframework.util.ObjectUtils;
|
||||||
|
|
||||||
|
|
@ -82,6 +84,13 @@ public class GamesJILIServiceImpl implements IGamesService {
|
||||||
@Resource
|
@Resource
|
||||||
private JILIClient jiliClient;
|
private JILIClient jiliClient;
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private KeyConfig keyConfig;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得就是成功
|
* 获得就是成功
|
||||||
*
|
*
|
||||||
|
|
@ -225,10 +234,6 @@ public class GamesJILIServiceImpl implements IGamesService {
|
||||||
if (this.getIsSuccess(jiliGames.getErrorCode())) {
|
if (this.getIsSuccess(jiliGames.getErrorCode())) {
|
||||||
|
|
||||||
for (JILIGamesDataDTO gamesDataDTO : jiliGames.getData()) {
|
for (JILIGamesDataDTO gamesDataDTO : jiliGames.getData()) {
|
||||||
if (JILIGameType.GAME_HALL.getCode().equals(gamesDataDTO.getGameCategoryId())) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
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.getCode())
|
||||||
|
|
@ -250,6 +255,7 @@ public class GamesJILIServiceImpl implements IGamesService {
|
||||||
List<Game> games = gameService.selectGameList(game);
|
List<Game> games = gameService.selectGameList(game);
|
||||||
//不存在这个游戏
|
//不存在这个游戏
|
||||||
if (CollectionUtils.isEmpty(games)) {
|
if (CollectionUtils.isEmpty(games)) {
|
||||||
|
game.setGameSourceType(gamesDataDTO.getGameCategoryId());
|
||||||
game.setFreespin(gamesDataDTO.isFreespin());
|
game.setFreespin(gamesDataDTO.isFreespin());
|
||||||
game.setSortNo(gameService.selectMaxSortNoByPlatformId(gamePlatform.getId()) + 1);
|
game.setSortNo(gameService.selectMaxSortNoByPlatformId(gamePlatform.getId()) + 1);
|
||||||
game.setGameName(gamesDataDTO.getName().getZhCN());
|
game.setGameName(gamesDataDTO.getName().getZhCN());
|
||||||
|
|
@ -267,8 +273,7 @@ public class GamesJILIServiceImpl implements IGamesService {
|
||||||
redisCache.setCacheList(CacheConstants.JILI_GAMES, jiliGames.getData());
|
redisCache.setCacheList(CacheConstants.JILI_GAMES, jiliGames.getData());
|
||||||
redisCache.expire(CacheConstants.JILI_GAMES, 5L, TimeUnit.HOURS);
|
redisCache.expire(CacheConstants.JILI_GAMES, 5L, TimeUnit.HOURS);
|
||||||
} else {
|
} else {
|
||||||
log.error("GameBettingDataJILIServiceImpl [getGameList] 获取游戏列表失败,错误代码{},错误信息{}", jiliGames.getErrorCode(), jiliGames.getMessage());
|
throw new BaseException(jiliGames.getMessage());
|
||||||
throw new BaseException(MessageUtils.message("game.list.retrieve.failed"));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -283,24 +288,33 @@ public class GamesJILIServiceImpl implements IGamesService {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public Long exchangeTransferByAgentId(ExchangeTransferMoneyRequestDTO exchangeTransferMoneyRequestDTO) {
|
public String exchangeTransferByAgentId(ExchangeTransferMoneyRequestDTO exchangeTransferMoneyRequestDTO) {
|
||||||
String systemByCode = gameSecretKeyService.findSystemByCode(exchangeTransferMoneyRequestDTO.getAgentId(), GamePlatforms.JILI.getInfo());
|
String systemByCode = gameSecretKeyService.findSystemByCode(exchangeTransferMoneyRequestDTO.getAgentId(), GamePlatforms.JILI.getInfo());
|
||||||
Member member = memberService.selectMemberByMemberAccount(exchangeTransferMoneyRequestDTO.getAccount());
|
Member member = memberService.selectMemberByGameAccount(exchangeTransferMoneyRequestDTO.getAccount());
|
||||||
String transactionId = exchangeTransferMoneyRequestDTO.getTransactionId();
|
String transactionId = GamePlatforms.JILI.getCode() + IdUtils.simpleUUID();
|
||||||
//如果没有自定义单号
|
TenantSecretKey tenantSecretKey = keyConfig.get();
|
||||||
if (!StringUtils.hasText(exchangeTransferMoneyRequestDTO.getTransactionId())) {
|
List<GameExchangeMoney> gameExchangeMonies = gameExchangeMoneyService.selectGameExchangeMoneyList(
|
||||||
transactionId = GamePlatforms.JILI.getCode() + IdUtils.simpleUUID();
|
GameExchangeMoney.builder()
|
||||||
}
|
.tenantKey(tenantSecretKey.getTenantKey())
|
||||||
|
.orderId(exchangeTransferMoneyRequestDTO.getOrderId())
|
||||||
|
.build()
|
||||||
|
);
|
||||||
|
Assert.isTrue(CollectionUtils.isEmpty(gameExchangeMonies), "订单号重复");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//获取下一个自增id
|
//获取下一个自增id
|
||||||
GameExchangeMoney exchangeMoney = GameExchangeMoney
|
GameExchangeMoney exchangeMoney = GameExchangeMoney
|
||||||
.builder()
|
.builder()
|
||||||
|
.tenantKey(tenantSecretKey.getTenantKey())
|
||||||
.quota(exchangeTransferMoneyRequestDTO.getQuota())
|
.quota(exchangeTransferMoneyRequestDTO.getQuota())
|
||||||
.platformId(exchangeTransferMoneyRequestDTO.getPlatformId())
|
|
||||||
.balance(exchangeTransferMoneyRequestDTO.getAmount())
|
.balance(exchangeTransferMoneyRequestDTO.getAmount())
|
||||||
.exchangeType(exchangeTransferMoneyRequestDTO.getTransferType())
|
.exchangeType(exchangeTransferMoneyRequestDTO.getTransferType())
|
||||||
.currencyCode(systemByCode)
|
.currencyCode(systemByCode)
|
||||||
.memberId(member.getId())
|
.memberId(member.getId())
|
||||||
|
.transactionId(transactionId)
|
||||||
|
.orderId(exchangeTransferMoneyRequestDTO.getOrderId())
|
||||||
.platformCode(GamePlatforms.JILI.getCode())
|
.platformCode(GamePlatforms.JILI.getCode())
|
||||||
.build();
|
.build();
|
||||||
exchangeMoney.setCreateBy(Constants.SYSTEM);
|
exchangeMoney.setCreateBy(Constants.SYSTEM);
|
||||||
|
|
@ -315,34 +329,29 @@ public class GamesJILIServiceImpl implements IGamesService {
|
||||||
exchangeTransferMoneyRequestDTO.setQuery(query);
|
exchangeTransferMoneyRequestDTO.setQuery(query);
|
||||||
|
|
||||||
String key = this.getKey(exchangeTransferMoneyRequestDTO);
|
String key = this.getKey(exchangeTransferMoneyRequestDTO);
|
||||||
String apiBaseUrl = configService.selectConfigByKey(Constants.JILI_API_BASE_URL);
|
|
||||||
try {
|
|
||||||
String result = HttpClientSslUtils.doPost(apiBaseUrl + "/ExchangeTransferByAgentId?" + query + "&Key=" + key, "AgentId=" + exchangeTransferMoneyRequestDTO.getAgentId(), ContentType.APPLICATION_FORM_URLENCODED);
|
|
||||||
|
|
||||||
JILIExchangeMoneyResponseDTO exchangeMoneyResponse = JsonUtil.stringToObj(result, JILIExchangeMoneyResponseDTO.class);
|
JILIExchangeMoneyResponseDTO exchangeMoneyResponse = jiliClient.exchangeTransferByAgentId(query + "&Key=" + key, exchangeTransferMoneyRequestDTO.getAgentId());
|
||||||
//判断是否转移成功
|
|
||||||
if (this.getIsSuccess(exchangeMoneyResponse.getErrorCode())) {
|
|
||||||
JILIExchangeMoneyResponseDTO.BeanData exchangeMoneyResponseData = exchangeMoneyResponse.getData();
|
|
||||||
//更新数据
|
|
||||||
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);
|
|
||||||
} else {
|
|
||||||
log.error("GameBettingDataJILIServiceImpl [exchangeTransferByAgentId] 金额转移失败,错误代码{},错误信息{}", exchangeMoneyResponse.getErrorCode(), exchangeMoneyResponse.getMessage());
|
|
||||||
throw new BaseException(MessageUtils.message("game.account.balance.transfer.failed"));
|
|
||||||
|
|
||||||
}
|
//判断是否转移成功
|
||||||
} catch (Exception e) {
|
if (this.getIsSuccess(exchangeMoneyResponse.getErrorCode())) {
|
||||||
log.error("GameBettingDataJILIServiceImpl [exchangeTransferByAgentId] 金额转移失败,错误信息{}", e);
|
|
||||||
throw new BaseException(MessageUtils.message("game.account.balance.transfer.failed"));
|
|
||||||
|
|
||||||
|
|
||||||
|
JILIExchangeMoneyResponseDTO.BeanData exchangeMoneyResponseData = exchangeMoneyResponse.getData();
|
||||||
|
//更新数据
|
||||||
|
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);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
throw new BaseException(exchangeMoneyResponse.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
return exchangeMoney.getId();
|
|
||||||
|
return transactionId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,12 @@
|
||||||
package com.ff.game.api.request;
|
package com.ff.game.api.request;
|
||||||
|
|
||||||
import com.ff.base.annotation.Excel;
|
import com.ff.base.annotation.Excel;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -12,6 +16,9 @@ import java.math.BigDecimal;
|
||||||
* @date 2024/10/22
|
* @date 2024/10/22
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@SuperBuilder
|
||||||
public class ExchangeTransferMoneyRequestDTO extends GamesBaseRequestDTO {
|
public class ExchangeTransferMoneyRequestDTO extends GamesBaseRequestDTO {
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -21,9 +28,8 @@ public class ExchangeTransferMoneyRequestDTO extends GamesBaseRequestDTO {
|
||||||
private String account;
|
private String account;
|
||||||
|
|
||||||
|
|
||||||
/** 游戏平台id */
|
|
||||||
@Excel(name = "游戏平台id")
|
|
||||||
private Long platformId;
|
|
||||||
/**
|
/**
|
||||||
* 金额
|
* 金额
|
||||||
*/
|
*/
|
||||||
|
|
@ -48,5 +54,5 @@ public class ExchangeTransferMoneyRequestDTO extends GamesBaseRequestDTO {
|
||||||
/**
|
/**
|
||||||
* 交易id
|
* 交易id
|
||||||
*/
|
*/
|
||||||
private String transactionId;
|
private String orderId;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -319,7 +319,7 @@ public class GamesXKServiceImpl implements IGamesService {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public Long exchangeTransferByAgentId(ExchangeTransferMoneyRequestDTO exchangeTransferMoneyRequestDTO) {
|
public String exchangeTransferByAgentId(ExchangeTransferMoneyRequestDTO exchangeTransferMoneyRequestDTO) {
|
||||||
log.info("GamesXKServiceImpl [exchangeTransferByAgentId] 请求参数 {}", exchangeTransferMoneyRequestDTO);
|
log.info("GamesXKServiceImpl [exchangeTransferByAgentId] 请求参数 {}", exchangeTransferMoneyRequestDTO);
|
||||||
String systemByCode = gameSecretKeyService.findSystemByCode(exchangeTransferMoneyRequestDTO.getAgentId(),GamePlatforms.XK.getInfo());
|
String systemByCode = gameSecretKeyService.findSystemByCode(exchangeTransferMoneyRequestDTO.getAgentId(),GamePlatforms.XK.getInfo());
|
||||||
Member member = memberService.selectMemberByMemberAccount(exchangeTransferMoneyRequestDTO.getAccount());
|
Member member = memberService.selectMemberByMemberAccount(exchangeTransferMoneyRequestDTO.getAccount());
|
||||||
|
|
@ -327,7 +327,6 @@ public class GamesXKServiceImpl implements IGamesService {
|
||||||
GameExchangeMoney exchangeMoney = GameExchangeMoney
|
GameExchangeMoney exchangeMoney = GameExchangeMoney
|
||||||
.builder()
|
.builder()
|
||||||
.quota(exchangeTransferMoneyRequestDTO.getQuota())
|
.quota(exchangeTransferMoneyRequestDTO.getQuota())
|
||||||
.platformId(exchangeTransferMoneyRequestDTO.getPlatformId())
|
|
||||||
.balance(exchangeTransferMoneyRequestDTO.getAmount())
|
.balance(exchangeTransferMoneyRequestDTO.getAmount())
|
||||||
.exchangeType(exchangeTransferMoneyRequestDTO.getTransferType())
|
.exchangeType(exchangeTransferMoneyRequestDTO.getTransferType())
|
||||||
.currencyCode(systemByCode)
|
.currencyCode(systemByCode)
|
||||||
|
|
@ -372,7 +371,7 @@ public class GamesXKServiceImpl implements IGamesService {
|
||||||
throw new BaseException(MessageUtils.message("game.account.balance.transfer.failed"));
|
throw new BaseException(MessageUtils.message("game.account.balance.transfer.failed"));
|
||||||
}
|
}
|
||||||
|
|
||||||
return exchangeMoney.getId();
|
return exchangeMoney.getId().toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ import lombok.NoArgsConstructor;
|
||||||
* 会员金额转移记录对象 ff_game_exchange_money
|
* 会员金额转移记录对象 ff_game_exchange_money
|
||||||
*
|
*
|
||||||
* @author shi
|
* @author shi
|
||||||
* @date 2025-02-10
|
* @date 2025-02-12
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
|
|
@ -25,12 +25,16 @@ public class GameExchangeMoney extends BaseEntity
|
||||||
/** 主键id */
|
/** 主键id */
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
/** 租户key */
|
||||||
|
@Excel(name = "租户key")
|
||||||
|
private String tenantKey;
|
||||||
|
|
||||||
/** 币种编码 */
|
/** 币种编码 */
|
||||||
@Excel(name = "币种编码")
|
@Excel(name = "币种编码")
|
||||||
private String currencyCode;
|
private String currencyCode;
|
||||||
|
|
||||||
/** 交易id */
|
/** 第三方交易id */
|
||||||
@Excel(name = "交易id")
|
@Excel(name = "第三方交易id")
|
||||||
private String transactionId;
|
private String transactionId;
|
||||||
|
|
||||||
/** 会员id */
|
/** 会员id */
|
||||||
|
|
@ -41,10 +45,6 @@ public class GameExchangeMoney extends BaseEntity
|
||||||
@Excel(name = "游戏平台 ")
|
@Excel(name = "游戏平台 ")
|
||||||
private String platformCode;
|
private String platformCode;
|
||||||
|
|
||||||
/** 平台id */
|
|
||||||
@Excel(name = "平台id")
|
|
||||||
private Long platformId;
|
|
||||||
|
|
||||||
/** 操作金额 */
|
/** 操作金额 */
|
||||||
@Excel(name = "操作金额")
|
@Excel(name = "操作金额")
|
||||||
private BigDecimal balance;
|
private BigDecimal balance;
|
||||||
|
|
@ -69,6 +69,10 @@ public class GameExchangeMoney extends BaseEntity
|
||||||
@Excel(name = "转账后金额(指定货币)")
|
@Excel(name = "转账后金额(指定货币)")
|
||||||
private BigDecimal currencyAfter;
|
private BigDecimal currencyAfter;
|
||||||
|
|
||||||
|
/** 系统订单id */
|
||||||
|
@Excel(name = "系统订单id")
|
||||||
|
private String orderId;
|
||||||
|
|
||||||
/** 转出类型 1游戏商转入到用户全部转出 2 用户转移到游戏商 3 游戏商转移额度到平台商 */
|
/** 转出类型 1游戏商转入到用户全部转出 2 用户转移到游戏商 3 游戏商转移额度到平台商 */
|
||||||
@Excel(name = "转出类型 1游戏商转入到用户全部转出 2 用户转移到游戏商 3 游戏商转移额度到平台商")
|
@Excel(name = "转出类型 1游戏商转入到用户全部转出 2 用户转移到游戏商 3 游戏商转移额度到平台商")
|
||||||
private Integer exchangeType;
|
private Integer exchangeType;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,121 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.ff.common.mapper.TenantGameQuotaFlowMapper">
|
||||||
|
|
||||||
|
<resultMap type="TenantGameQuotaFlow" id="TenantGameQuotaFlowResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="tenantKey" column="tenant_key" />
|
||||||
|
<result property="memberId" column="member_id" />
|
||||||
|
<result property="isOut" column="is_out" />
|
||||||
|
<result property="operationType" column="operation_type" />
|
||||||
|
<result property="balanceBefore" column="balance_before" />
|
||||||
|
<result property="balance" column="balance" />
|
||||||
|
<result property="balanceAfter" column="balance_after" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectTenantGameQuotaFlowVo">
|
||||||
|
select id, tenant_key, member_id, is_out, operation_type, balance_before, balance, balance_after, remark, create_by, create_time, update_by, update_time from ff_tenant_game_quota_flow
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectTenantGameQuotaFlowList" parameterType="TenantGameQuotaFlow" resultMap="TenantGameQuotaFlowResult">
|
||||||
|
<include refid="selectTenantGameQuotaFlowVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="tenantKey != null and tenantKey != ''"> and tenant_key = #{tenantKey}</if>
|
||||||
|
<if test="memberId != null "> and member_id = #{memberId}</if>
|
||||||
|
<if test="isOut != null "> and is_out = #{isOut}</if>
|
||||||
|
<if test="operationType != null "> and operation_type = #{operationType}</if>
|
||||||
|
<if test="balanceBefore != null "> and balance_before = #{balanceBefore}</if>
|
||||||
|
<if test="balance != null "> and balance = #{balance}</if>
|
||||||
|
<if test="balanceAfter != null "> and balance_after = #{balanceAfter}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectTenantGameQuotaFlowById" parameterType="Long" resultMap="TenantGameQuotaFlowResult">
|
||||||
|
<include refid="selectTenantGameQuotaFlowVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertTenantGameQuotaFlow" parameterType="TenantGameQuotaFlow" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into ff_tenant_game_quota_flow
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="tenantKey != null and tenantKey != ''">tenant_key,</if>
|
||||||
|
<if test="memberId != null">member_id,</if>
|
||||||
|
<if test="isOut != null">is_out,</if>
|
||||||
|
<if test="operationType != null">operation_type,</if>
|
||||||
|
<if test="balanceBefore != null">balance_before,</if>
|
||||||
|
<if test="balance != null">balance,</if>
|
||||||
|
<if test="balanceAfter != null">balance_after,</if>
|
||||||
|
<if test="remark != null">remark,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="tenantKey != null and tenantKey != ''">#{tenantKey},</if>
|
||||||
|
<if test="memberId != null">#{memberId},</if>
|
||||||
|
<if test="isOut != null">#{isOut},</if>
|
||||||
|
<if test="operationType != null">#{operationType},</if>
|
||||||
|
<if test="balanceBefore != null">#{balanceBefore},</if>
|
||||||
|
<if test="balance != null">#{balance},</if>
|
||||||
|
<if test="balanceAfter != null">#{balanceAfter},</if>
|
||||||
|
<if test="remark != null">#{remark},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateTenantGameQuotaFlow" parameterType="TenantGameQuotaFlow">
|
||||||
|
update ff_tenant_game_quota_flow
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="tenantKey != null and tenantKey != ''">tenant_key = #{tenantKey},</if>
|
||||||
|
<if test="memberId != null">member_id = #{memberId},</if>
|
||||||
|
<if test="isOut != null">is_out = #{isOut},</if>
|
||||||
|
<if test="operationType != null">operation_type = #{operationType},</if>
|
||||||
|
<if test="balanceBefore != null">balance_before = #{balanceBefore},</if>
|
||||||
|
<if test="balance != null">balance = #{balance},</if>
|
||||||
|
<if test="balanceAfter != null">balance_after = #{balanceAfter},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteTenantGameQuotaFlowById" parameterType="Long">
|
||||||
|
delete from ff_tenant_game_quota_flow where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteTenantGameQuotaFlowByIds" parameterType="String">
|
||||||
|
delete from ff_tenant_game_quota_flow where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<select id="getBalanceByMemberId" parameterType="TenantGameQuotaFlow" resultType="java.math.BigDecimal">
|
||||||
|
select sum(balance) from ff_tenant_game_quota_flow
|
||||||
|
<where>
|
||||||
|
<if test="tenantKey != null and tenantKey != ''"> and tenant_key = #{tenantKey}</if>
|
||||||
|
<if test="memberId != null "> and member_id = #{memberId}</if>
|
||||||
|
<if test="isOut != null "> and is_out = #{isOut}</if>
|
||||||
|
<if test="operationType != null "> and operation_type = #{operationType}</if>
|
||||||
|
<if test="balanceBefore != null "> and balance_before = #{balanceBefore}</if>
|
||||||
|
<if test="balance != null "> and balance = #{balance}</if>
|
||||||
|
<if test="balanceAfter != null "> and balance_after = #{balanceAfter}</if>
|
||||||
|
</where>
|
||||||
|
group by member_id
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,94 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.ff.common.mapper.TenantGameQuotaMapper">
|
||||||
|
|
||||||
|
<resultMap type="TenantGameQuota" id="TenantGameQuotaResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="tenantKey" column="tenant_key" />
|
||||||
|
<result property="balance" column="balance" />
|
||||||
|
<result property="version" column="version" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectTenantGameQuotaVo">
|
||||||
|
select id, tenant_key, balance, version, create_by, create_time, update_by, update_time from ff_tenant_game_quota
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectTenantGameQuotaList" parameterType="TenantGameQuota" resultMap="TenantGameQuotaResult">
|
||||||
|
<include refid="selectTenantGameQuotaVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="tenantKey != null and tenantKey != ''"> and tenant_key = #{tenantKey}</if>
|
||||||
|
<if test="balance != null "> and balance = #{balance}</if>
|
||||||
|
<if test="version != null "> and version = #{version}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectTenantGameQuotaById" parameterType="Long" resultMap="TenantGameQuotaResult">
|
||||||
|
<include refid="selectTenantGameQuotaVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectTenantGameQuotaByTenantKey" parameterType="String" resultMap="TenantGameQuotaResult">
|
||||||
|
<include refid="selectTenantGameQuotaVo"/>
|
||||||
|
where tenant_key = #{tenantKey}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertTenantGameQuota" parameterType="TenantGameQuota" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into ff_tenant_game_quota
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="tenantKey != null and tenantKey != ''">tenant_key,</if>
|
||||||
|
<if test="balance != null">balance,</if>
|
||||||
|
<if test="version != null">version,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="tenantKey != null and tenantKey != ''">#{tenantKey},</if>
|
||||||
|
<if test="balance != null">#{balance},</if>
|
||||||
|
<if test="version != null">#{version},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateTenantGameQuota" parameterType="TenantGameQuota">
|
||||||
|
update ff_tenant_game_quota
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="tenantKey != null and tenantKey != ''">tenant_key = #{tenantKey},</if>
|
||||||
|
<if test="balance != null">balance = #{balance},</if>
|
||||||
|
<if test="version != null">version = #{version},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
<update id="changeBalance" parameterType="TenantGameQuota">
|
||||||
|
update ff_tenant_game_quota set balance = #{balance},version =version+1
|
||||||
|
where tenant_key = #{tenantKey} and version = #{version}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
<delete id="deleteTenantGameQuotaById" parameterType="Long">
|
||||||
|
delete from ff_tenant_game_quota where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteTenantGameQuotaByIds" parameterType="String">
|
||||||
|
delete from ff_tenant_game_quota where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
||||||
|
|
@ -1,22 +1,23 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.ff.game.mapper.GameExchangeMoneyMapper">
|
<mapper namespace="com.ff.game.mapper.GameExchangeMoneyMapper">
|
||||||
|
|
||||||
<resultMap type="GameExchangeMoney" id="GameExchangeMoneyResult">
|
<resultMap type="GameExchangeMoney" id="GameExchangeMoneyResult">
|
||||||
<result property="id" column="id" />
|
<result property="id" column="id" />
|
||||||
|
<result property="tenantKey" column="tenant_key" />
|
||||||
<result property="currencyCode" column="currency_code" />
|
<result property="currencyCode" column="currency_code" />
|
||||||
<result property="transactionId" column="transaction_id" />
|
<result property="transactionId" column="transaction_id" />
|
||||||
<result property="memberId" column="member_id" />
|
<result property="memberId" column="member_id" />
|
||||||
<result property="platformCode" column="platform_code" />
|
<result property="platformCode" column="platform_code" />
|
||||||
<result property="platformId" column="platform_id" />
|
|
||||||
<result property="balance" column="balance" />
|
<result property="balance" column="balance" />
|
||||||
<result property="quota" column="quota" />
|
<result property="quota" column="quota" />
|
||||||
<result property="coinBefore" column="coin_before" />
|
<result property="coinBefore" column="coin_before" />
|
||||||
<result property="coinAfter" column="coin_after" />
|
<result property="coinAfter" column="coin_after" />
|
||||||
<result property="currencyBefore" column="currency_before" />
|
<result property="currencyBefore" column="currency_before" />
|
||||||
<result property="currencyAfter" column="currency_after" />
|
<result property="currencyAfter" column="currency_after" />
|
||||||
|
<result property="orderId" column="order_id" />
|
||||||
<result property="exchangeType" column="exchange_type" />
|
<result property="exchangeType" column="exchange_type" />
|
||||||
<result property="status" column="status" />
|
<result property="status" column="status" />
|
||||||
<result property="createBy" column="create_by" />
|
<result property="createBy" column="create_by" />
|
||||||
|
|
@ -26,28 +27,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectGameExchangeMoneyVo">
|
<sql id="selectGameExchangeMoneyVo">
|
||||||
select id, currency_code, transaction_id, member_id, platform_code, platform_id, balance, quota, coin_before, coin_after, currency_before, currency_after, exchange_type, status, create_by, create_time, update_by, update_time from ff_game_exchange_money
|
select id, tenant_key, currency_code, transaction_id, member_id, platform_code, balance, quota, coin_before, coin_after, currency_before, currency_after, order_id, exchange_type, status, create_by, create_time, update_by, update_time from ff_game_exchange_money
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectGameExchangeMoneyList" parameterType="GameExchangeMoney" resultMap="GameExchangeMoneyResult">
|
<select id="selectGameExchangeMoneyList" parameterType="GameExchangeMoney" resultMap="GameExchangeMoneyResult">
|
||||||
<include refid="selectGameExchangeMoneyVo"/>
|
<include refid="selectGameExchangeMoneyVo"/>
|
||||||
<where>
|
<where>
|
||||||
|
<if test="tenantKey != null and tenantKey != ''"> and tenant_key = #{tenantKey}</if>
|
||||||
<if test="currencyCode != null and currencyCode != ''"> and currency_code = #{currencyCode}</if>
|
<if test="currencyCode != null and currencyCode != ''"> and currency_code = #{currencyCode}</if>
|
||||||
<if test="transactionId != null and transactionId != ''"> and transaction_id = #{transactionId}</if>
|
<if test="transactionId != null and transactionId != ''"> and transaction_id = #{transactionId}</if>
|
||||||
<if test="memberId != null "> and member_id = #{memberId}</if>
|
<if test="memberId != null "> and member_id = #{memberId}</if>
|
||||||
<if test="platformCode != null and platformCode != ''"> and platform_code = #{platformCode}</if>
|
<if test="platformCode != null and platformCode != ''"> and platform_code = #{platformCode}</if>
|
||||||
<if test="platformId != null "> and platform_id = #{platformId}</if>
|
|
||||||
<if test="balance != null "> and balance = #{balance}</if>
|
<if test="balance != null "> and balance = #{balance}</if>
|
||||||
<if test="quota != null "> and quota = #{quota}</if>
|
<if test="quota != null "> and quota = #{quota}</if>
|
||||||
<if test="coinBefore != null "> and coin_before = #{coinBefore}</if>
|
<if test="coinBefore != null "> and coin_before = #{coinBefore}</if>
|
||||||
<if test="coinAfter != null "> and coin_after = #{coinAfter}</if>
|
<if test="coinAfter != null "> and coin_after = #{coinAfter}</if>
|
||||||
<if test="currencyBefore != null "> and currency_before = #{currencyBefore}</if>
|
<if test="currencyBefore != null "> and currency_before = #{currencyBefore}</if>
|
||||||
<if test="currencyAfter != null "> and currency_after = #{currencyAfter}</if>
|
<if test="currencyAfter != null "> and currency_after = #{currencyAfter}</if>
|
||||||
|
<if test="orderId != null and orderId != ''"> and order_id = #{orderId}</if>
|
||||||
<if test="exchangeType != null "> and exchange_type = #{exchangeType}</if>
|
<if test="exchangeType != null "> and exchange_type = #{exchangeType}</if>
|
||||||
<if test="status != null "> and status = #{status}</if>
|
<if test="status != null "> and status = #{status}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectGameExchangeMoneyById" parameterType="Long" resultMap="GameExchangeMoneyResult">
|
<select id="selectGameExchangeMoneyById" parameterType="Long" resultMap="GameExchangeMoneyResult">
|
||||||
<include refid="selectGameExchangeMoneyVo"/>
|
<include refid="selectGameExchangeMoneyVo"/>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
|
|
@ -56,59 +58,62 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<insert id="insertGameExchangeMoney" parameterType="GameExchangeMoney" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertGameExchangeMoney" parameterType="GameExchangeMoney" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into ff_game_exchange_money
|
insert into ff_game_exchange_money
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="tenantKey != null">tenant_key,</if>
|
||||||
<if test="currencyCode != null">currency_code,</if>
|
<if test="currencyCode != null">currency_code,</if>
|
||||||
<if test="transactionId != null">transaction_id,</if>
|
<if test="transactionId != null">transaction_id,</if>
|
||||||
<if test="memberId != null">member_id,</if>
|
<if test="memberId != null">member_id,</if>
|
||||||
<if test="platformCode != null">platform_code,</if>
|
<if test="platformCode != null">platform_code,</if>
|
||||||
<if test="platformId != null">platform_id,</if>
|
|
||||||
<if test="balance != null">balance,</if>
|
<if test="balance != null">balance,</if>
|
||||||
<if test="quota != null">quota,</if>
|
<if test="quota != null">quota,</if>
|
||||||
<if test="coinBefore != null">coin_before,</if>
|
<if test="coinBefore != null">coin_before,</if>
|
||||||
<if test="coinAfter != null">coin_after,</if>
|
<if test="coinAfter != null">coin_after,</if>
|
||||||
<if test="currencyBefore != null">currency_before,</if>
|
<if test="currencyBefore != null">currency_before,</if>
|
||||||
<if test="currencyAfter != null">currency_after,</if>
|
<if test="currencyAfter != null">currency_after,</if>
|
||||||
|
<if test="orderId != null">order_id,</if>
|
||||||
<if test="exchangeType != null">exchange_type,</if>
|
<if test="exchangeType != null">exchange_type,</if>
|
||||||
<if test="status != null">status,</if>
|
<if test="status != null">status,</if>
|
||||||
<if test="createBy != null">create_by,</if>
|
<if test="createBy != null">create_by,</if>
|
||||||
<if test="createTime != null">create_time,</if>
|
<if test="createTime != null">create_time,</if>
|
||||||
<if test="updateBy != null">update_by,</if>
|
<if test="updateBy != null">update_by,</if>
|
||||||
<if test="updateTime != null">update_time,</if>
|
<if test="updateTime != null">update_time,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="tenantKey != null">#{tenantKey},</if>
|
||||||
<if test="currencyCode != null">#{currencyCode},</if>
|
<if test="currencyCode != null">#{currencyCode},</if>
|
||||||
<if test="transactionId != null">#{transactionId},</if>
|
<if test="transactionId != null">#{transactionId},</if>
|
||||||
<if test="memberId != null">#{memberId},</if>
|
<if test="memberId != null">#{memberId},</if>
|
||||||
<if test="platformCode != null">#{platformCode},</if>
|
<if test="platformCode != null">#{platformCode},</if>
|
||||||
<if test="platformId != null">#{platformId},</if>
|
|
||||||
<if test="balance != null">#{balance},</if>
|
<if test="balance != null">#{balance},</if>
|
||||||
<if test="quota != null">#{quota},</if>
|
<if test="quota != null">#{quota},</if>
|
||||||
<if test="coinBefore != null">#{coinBefore},</if>
|
<if test="coinBefore != null">#{coinBefore},</if>
|
||||||
<if test="coinAfter != null">#{coinAfter},</if>
|
<if test="coinAfter != null">#{coinAfter},</if>
|
||||||
<if test="currencyBefore != null">#{currencyBefore},</if>
|
<if test="currencyBefore != null">#{currencyBefore},</if>
|
||||||
<if test="currencyAfter != null">#{currencyAfter},</if>
|
<if test="currencyAfter != null">#{currencyAfter},</if>
|
||||||
|
<if test="orderId != null">#{orderId},</if>
|
||||||
<if test="exchangeType != null">#{exchangeType},</if>
|
<if test="exchangeType != null">#{exchangeType},</if>
|
||||||
<if test="status != null">#{status},</if>
|
<if test="status != null">#{status},</if>
|
||||||
<if test="createBy != null">#{createBy},</if>
|
<if test="createBy != null">#{createBy},</if>
|
||||||
<if test="createTime != null">#{createTime},</if>
|
<if test="createTime != null">#{createTime},</if>
|
||||||
<if test="updateBy != null">#{updateBy},</if>
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
<if test="updateTime != null">#{updateTime},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateGameExchangeMoney" parameterType="GameExchangeMoney">
|
<update id="updateGameExchangeMoney" parameterType="GameExchangeMoney">
|
||||||
update ff_game_exchange_money
|
update ff_game_exchange_money
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="tenantKey != null">tenant_key = #{tenantKey},</if>
|
||||||
<if test="currencyCode != null">currency_code = #{currencyCode},</if>
|
<if test="currencyCode != null">currency_code = #{currencyCode},</if>
|
||||||
<if test="transactionId != null">transaction_id = #{transactionId},</if>
|
<if test="transactionId != null">transaction_id = #{transactionId},</if>
|
||||||
<if test="memberId != null">member_id = #{memberId},</if>
|
<if test="memberId != null">member_id = #{memberId},</if>
|
||||||
<if test="platformCode != null">platform_code = #{platformCode},</if>
|
<if test="platformCode != null">platform_code = #{platformCode},</if>
|
||||||
<if test="platformId != null">platform_id = #{platformId},</if>
|
|
||||||
<if test="balance != null">balance = #{balance},</if>
|
<if test="balance != null">balance = #{balance},</if>
|
||||||
<if test="quota != null">quota = #{quota},</if>
|
<if test="quota != null">quota = #{quota},</if>
|
||||||
<if test="coinBefore != null">coin_before = #{coinBefore},</if>
|
<if test="coinBefore != null">coin_before = #{coinBefore},</if>
|
||||||
<if test="coinAfter != null">coin_after = #{coinAfter},</if>
|
<if test="coinAfter != null">coin_after = #{coinAfter},</if>
|
||||||
<if test="currencyBefore != null">currency_before = #{currencyBefore},</if>
|
<if test="currencyBefore != null">currency_before = #{currencyBefore},</if>
|
||||||
<if test="currencyAfter != null">currency_after = #{currencyAfter},</if>
|
<if test="currencyAfter != null">currency_after = #{currencyAfter},</if>
|
||||||
|
<if test="orderId != null">order_id = #{orderId},</if>
|
||||||
<if test="exchangeType != null">exchange_type = #{exchangeType},</if>
|
<if test="exchangeType != null">exchange_type = #{exchangeType},</if>
|
||||||
<if test="status != null">status = #{status},</if>
|
<if test="status != null">status = #{status},</if>
|
||||||
<if test="createBy != null">create_by = #{createBy},</if>
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
|
@ -124,7 +129,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<delete id="deleteGameExchangeMoneyByIds" parameterType="String">
|
<delete id="deleteGameExchangeMoneyByIds" parameterType="String">
|
||||||
delete from ff_game_exchange_money where id in
|
delete from ff_game_exchange_money where id in
|
||||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,23 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.ff.game.mapper.GameExchangeMoneyMapper">
|
<mapper namespace="com.ff.game.mapper.GameExchangeMoneyMapper">
|
||||||
|
|
||||||
<resultMap type="GameExchangeMoney" id="GameExchangeMoneyResult">
|
<resultMap type="GameExchangeMoney" id="GameExchangeMoneyResult">
|
||||||
<result property="id" column="id" />
|
<result property="id" column="id" />
|
||||||
|
<result property="tenantKey" column="tenant_key" />
|
||||||
<result property="currencyCode" column="currency_code" />
|
<result property="currencyCode" column="currency_code" />
|
||||||
<result property="transactionId" column="transaction_id" />
|
<result property="transactionId" column="transaction_id" />
|
||||||
<result property="memberId" column="member_id" />
|
<result property="memberId" column="member_id" />
|
||||||
<result property="platformCode" column="platform_code" />
|
<result property="platformCode" column="platform_code" />
|
||||||
<result property="platformId" column="platform_id" />
|
|
||||||
<result property="balance" column="balance" />
|
<result property="balance" column="balance" />
|
||||||
<result property="quota" column="quota" />
|
<result property="quota" column="quota" />
|
||||||
<result property="coinBefore" column="coin_before" />
|
<result property="coinBefore" column="coin_before" />
|
||||||
<result property="coinAfter" column="coin_after" />
|
<result property="coinAfter" column="coin_after" />
|
||||||
<result property="currencyBefore" column="currency_before" />
|
<result property="currencyBefore" column="currency_before" />
|
||||||
<result property="currencyAfter" column="currency_after" />
|
<result property="currencyAfter" column="currency_after" />
|
||||||
|
<result property="orderId" column="order_id" />
|
||||||
<result property="exchangeType" column="exchange_type" />
|
<result property="exchangeType" column="exchange_type" />
|
||||||
<result property="status" column="status" />
|
<result property="status" column="status" />
|
||||||
<result property="createBy" column="create_by" />
|
<result property="createBy" column="create_by" />
|
||||||
|
|
@ -26,28 +27,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectGameExchangeMoneyVo">
|
<sql id="selectGameExchangeMoneyVo">
|
||||||
select id, currency_code, transaction_id, member_id, platform_code, platform_id, balance, quota, coin_before, coin_after, currency_before, currency_after, exchange_type, status, create_by, create_time, update_by, update_time from ff_game_exchange_money
|
select id, tenant_key, currency_code, transaction_id, member_id, platform_code, balance, quota, coin_before, coin_after, currency_before, currency_after, order_id, exchange_type, status, create_by, create_time, update_by, update_time from ff_game_exchange_money
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectGameExchangeMoneyList" parameterType="GameExchangeMoney" resultMap="GameExchangeMoneyResult">
|
<select id="selectGameExchangeMoneyList" parameterType="GameExchangeMoney" resultMap="GameExchangeMoneyResult">
|
||||||
<include refid="selectGameExchangeMoneyVo"/>
|
<include refid="selectGameExchangeMoneyVo"/>
|
||||||
<where>
|
<where>
|
||||||
|
<if test="tenantKey != null and tenantKey != ''"> and tenant_key = #{tenantKey}</if>
|
||||||
<if test="currencyCode != null and currencyCode != ''"> and currency_code = #{currencyCode}</if>
|
<if test="currencyCode != null and currencyCode != ''"> and currency_code = #{currencyCode}</if>
|
||||||
<if test="transactionId != null and transactionId != ''"> and transaction_id = #{transactionId}</if>
|
<if test="transactionId != null and transactionId != ''"> and transaction_id = #{transactionId}</if>
|
||||||
<if test="memberId != null "> and member_id = #{memberId}</if>
|
<if test="memberId != null "> and member_id = #{memberId}</if>
|
||||||
<if test="platformCode != null and platformCode != ''"> and platform_code = #{platformCode}</if>
|
<if test="platformCode != null and platformCode != ''"> and platform_code = #{platformCode}</if>
|
||||||
<if test="platformId != null "> and platform_id = #{platformId}</if>
|
|
||||||
<if test="balance != null "> and balance = #{balance}</if>
|
<if test="balance != null "> and balance = #{balance}</if>
|
||||||
<if test="quota != null "> and quota = #{quota}</if>
|
<if test="quota != null "> and quota = #{quota}</if>
|
||||||
<if test="coinBefore != null "> and coin_before = #{coinBefore}</if>
|
<if test="coinBefore != null "> and coin_before = #{coinBefore}</if>
|
||||||
<if test="coinAfter != null "> and coin_after = #{coinAfter}</if>
|
<if test="coinAfter != null "> and coin_after = #{coinAfter}</if>
|
||||||
<if test="currencyBefore != null "> and currency_before = #{currencyBefore}</if>
|
<if test="currencyBefore != null "> and currency_before = #{currencyBefore}</if>
|
||||||
<if test="currencyAfter != null "> and currency_after = #{currencyAfter}</if>
|
<if test="currencyAfter != null "> and currency_after = #{currencyAfter}</if>
|
||||||
|
<if test="orderId != null and orderId != ''"> and order_id = #{orderId}</if>
|
||||||
<if test="exchangeType != null "> and exchange_type = #{exchangeType}</if>
|
<if test="exchangeType != null "> and exchange_type = #{exchangeType}</if>
|
||||||
<if test="status != null "> and status = #{status}</if>
|
<if test="status != null "> and status = #{status}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectGameExchangeMoneyById" parameterType="Long" resultMap="GameExchangeMoneyResult">
|
<select id="selectGameExchangeMoneyById" parameterType="Long" resultMap="GameExchangeMoneyResult">
|
||||||
<include refid="selectGameExchangeMoneyVo"/>
|
<include refid="selectGameExchangeMoneyVo"/>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
|
|
@ -56,59 +58,62 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<insert id="insertGameExchangeMoney" parameterType="GameExchangeMoney" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertGameExchangeMoney" parameterType="GameExchangeMoney" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into ff_game_exchange_money
|
insert into ff_game_exchange_money
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="tenantKey != null">tenant_key,</if>
|
||||||
<if test="currencyCode != null">currency_code,</if>
|
<if test="currencyCode != null">currency_code,</if>
|
||||||
<if test="transactionId != null">transaction_id,</if>
|
<if test="transactionId != null">transaction_id,</if>
|
||||||
<if test="memberId != null">member_id,</if>
|
<if test="memberId != null">member_id,</if>
|
||||||
<if test="platformCode != null">platform_code,</if>
|
<if test="platformCode != null">platform_code,</if>
|
||||||
<if test="platformId != null">platform_id,</if>
|
|
||||||
<if test="balance != null">balance,</if>
|
<if test="balance != null">balance,</if>
|
||||||
<if test="quota != null">quota,</if>
|
<if test="quota != null">quota,</if>
|
||||||
<if test="coinBefore != null">coin_before,</if>
|
<if test="coinBefore != null">coin_before,</if>
|
||||||
<if test="coinAfter != null">coin_after,</if>
|
<if test="coinAfter != null">coin_after,</if>
|
||||||
<if test="currencyBefore != null">currency_before,</if>
|
<if test="currencyBefore != null">currency_before,</if>
|
||||||
<if test="currencyAfter != null">currency_after,</if>
|
<if test="currencyAfter != null">currency_after,</if>
|
||||||
|
<if test="orderId != null">order_id,</if>
|
||||||
<if test="exchangeType != null">exchange_type,</if>
|
<if test="exchangeType != null">exchange_type,</if>
|
||||||
<if test="status != null">status,</if>
|
<if test="status != null">status,</if>
|
||||||
<if test="createBy != null">create_by,</if>
|
<if test="createBy != null">create_by,</if>
|
||||||
<if test="createTime != null">create_time,</if>
|
<if test="createTime != null">create_time,</if>
|
||||||
<if test="updateBy != null">update_by,</if>
|
<if test="updateBy != null">update_by,</if>
|
||||||
<if test="updateTime != null">update_time,</if>
|
<if test="updateTime != null">update_time,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="tenantKey != null">#{tenantKey},</if>
|
||||||
<if test="currencyCode != null">#{currencyCode},</if>
|
<if test="currencyCode != null">#{currencyCode},</if>
|
||||||
<if test="transactionId != null">#{transactionId},</if>
|
<if test="transactionId != null">#{transactionId},</if>
|
||||||
<if test="memberId != null">#{memberId},</if>
|
<if test="memberId != null">#{memberId},</if>
|
||||||
<if test="platformCode != null">#{platformCode},</if>
|
<if test="platformCode != null">#{platformCode},</if>
|
||||||
<if test="platformId != null">#{platformId},</if>
|
|
||||||
<if test="balance != null">#{balance},</if>
|
<if test="balance != null">#{balance},</if>
|
||||||
<if test="quota != null">#{quota},</if>
|
<if test="quota != null">#{quota},</if>
|
||||||
<if test="coinBefore != null">#{coinBefore},</if>
|
<if test="coinBefore != null">#{coinBefore},</if>
|
||||||
<if test="coinAfter != null">#{coinAfter},</if>
|
<if test="coinAfter != null">#{coinAfter},</if>
|
||||||
<if test="currencyBefore != null">#{currencyBefore},</if>
|
<if test="currencyBefore != null">#{currencyBefore},</if>
|
||||||
<if test="currencyAfter != null">#{currencyAfter},</if>
|
<if test="currencyAfter != null">#{currencyAfter},</if>
|
||||||
|
<if test="orderId != null">#{orderId},</if>
|
||||||
<if test="exchangeType != null">#{exchangeType},</if>
|
<if test="exchangeType != null">#{exchangeType},</if>
|
||||||
<if test="status != null">#{status},</if>
|
<if test="status != null">#{status},</if>
|
||||||
<if test="createBy != null">#{createBy},</if>
|
<if test="createBy != null">#{createBy},</if>
|
||||||
<if test="createTime != null">#{createTime},</if>
|
<if test="createTime != null">#{createTime},</if>
|
||||||
<if test="updateBy != null">#{updateBy},</if>
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
<if test="updateTime != null">#{updateTime},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateGameExchangeMoney" parameterType="GameExchangeMoney">
|
<update id="updateGameExchangeMoney" parameterType="GameExchangeMoney">
|
||||||
update ff_game_exchange_money
|
update ff_game_exchange_money
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="tenantKey != null">tenant_key = #{tenantKey},</if>
|
||||||
<if test="currencyCode != null">currency_code = #{currencyCode},</if>
|
<if test="currencyCode != null">currency_code = #{currencyCode},</if>
|
||||||
<if test="transactionId != null">transaction_id = #{transactionId},</if>
|
<if test="transactionId != null">transaction_id = #{transactionId},</if>
|
||||||
<if test="memberId != null">member_id = #{memberId},</if>
|
<if test="memberId != null">member_id = #{memberId},</if>
|
||||||
<if test="platformCode != null">platform_code = #{platformCode},</if>
|
<if test="platformCode != null">platform_code = #{platformCode},</if>
|
||||||
<if test="platformId != null">platform_id = #{platformId},</if>
|
|
||||||
<if test="balance != null">balance = #{balance},</if>
|
<if test="balance != null">balance = #{balance},</if>
|
||||||
<if test="quota != null">quota = #{quota},</if>
|
<if test="quota != null">quota = #{quota},</if>
|
||||||
<if test="coinBefore != null">coin_before = #{coinBefore},</if>
|
<if test="coinBefore != null">coin_before = #{coinBefore},</if>
|
||||||
<if test="coinAfter != null">coin_after = #{coinAfter},</if>
|
<if test="coinAfter != null">coin_after = #{coinAfter},</if>
|
||||||
<if test="currencyBefore != null">currency_before = #{currencyBefore},</if>
|
<if test="currencyBefore != null">currency_before = #{currencyBefore},</if>
|
||||||
<if test="currencyAfter != null">currency_after = #{currencyAfter},</if>
|
<if test="currencyAfter != null">currency_after = #{currencyAfter},</if>
|
||||||
|
<if test="orderId != null">order_id = #{orderId},</if>
|
||||||
<if test="exchangeType != null">exchange_type = #{exchangeType},</if>
|
<if test="exchangeType != null">exchange_type = #{exchangeType},</if>
|
||||||
<if test="status != null">status = #{status},</if>
|
<if test="status != null">status = #{status},</if>
|
||||||
<if test="createBy != null">create_by = #{createBy},</if>
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
|
@ -124,7 +129,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<delete id="deleteGameExchangeMoneyByIds" parameterType="String">
|
<delete id="deleteGameExchangeMoneyByIds" parameterType="String">
|
||||||
delete from ff_game_exchange_money where id in
|
delete from ff_game_exchange_money where id in
|
||||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
|
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 人工加款审核状态
|
|
||||||
*
|
|
||||||
* @author liukang
|
|
||||||
*/
|
|
||||||
public enum AccountAuditStatus
|
|
||||||
{
|
|
||||||
|
|
||||||
AccountAuditStatus_0("0", "待审核"),
|
|
||||||
AccountAuditStatus_1("1", "审核通过"),
|
|
||||||
AccountAuditStatus_2("2", "审核拒绝");
|
|
||||||
|
|
||||||
private final String code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
AccountAuditStatus(String code, String info)
|
|
||||||
{
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCode()
|
|
||||||
{
|
|
||||||
return code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getInfo()
|
|
||||||
{
|
|
||||||
return info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 资金账户类型枚举
|
|
||||||
*
|
|
||||||
* @author liukang
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
@AllArgsConstructor
|
|
||||||
public enum AccountChangeType {
|
|
||||||
|
|
||||||
AccountChangeType_0("0","资金切换"),
|
|
||||||
AccountChangeType_1("1","会员充值"),
|
|
||||||
AccountChangeType_2("2","会员提现"),
|
|
||||||
AccountChangeType_3("3","银商结算"),
|
|
||||||
AccountChangeType_4("4","资金修正"),
|
|
||||||
AccountChangeType_5("5","活动"),
|
|
||||||
AccountChangeType_6("6","返水"),
|
|
||||||
AccountChangeType_7("7","返佣"),
|
|
||||||
AccountChangeType_8("8","任务"),
|
|
||||||
AccountChangeType_9("9","VIP奖励"),
|
|
||||||
AccountChangeType_10("10","充值优惠"),
|
|
||||||
AccountChangeType_11("11","俱乐部"),
|
|
||||||
AccountChangeType_12("12","奖励"),
|
|
||||||
AccountChangeType_13("13","公积金");
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 账变大类(字典ff_account_change_type)
|
|
||||||
*/
|
|
||||||
private String changeType;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 描述信息
|
|
||||||
*/
|
|
||||||
private String info;
|
|
||||||
}
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 账号类型
|
|
||||||
*
|
|
||||||
* @author shang
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum AccountType {
|
|
||||||
MEMBER(0, "会员"),
|
|
||||||
AGENT(1, "代理");
|
|
||||||
|
|
||||||
private final Integer code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
AccountType(Integer code, String info) {
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 活动指定平台
|
|
||||||
*
|
|
||||||
* @author liukang
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum ActivityBetPlatformType {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 1.全部 2.指定平台
|
|
||||||
*/
|
|
||||||
BETPLATFORMTYPE_1("1", "全部"),
|
|
||||||
BETPLATFORMTYPE_2("2", "指定平台");
|
|
||||||
|
|
||||||
private final String code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
ActivityBetPlatformType(String code, String info) {
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 推广活动奖励发放状态
|
|
||||||
*
|
|
||||||
* @author liukang
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum ActivityBetSendStatus {
|
|
||||||
|
|
||||||
SENDSTATUS_1("1", "未发放"),
|
|
||||||
SENDSTATUS_2("2", "已发放"),
|
|
||||||
SENDSTATUS_3("3", "人工申请待申请"),
|
|
||||||
SENDSTATUS_4("4", "人工申请审核中"),
|
|
||||||
SENDSTATUS_5("5", "人工申请已拒绝");
|
|
||||||
|
|
||||||
private final String code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
ActivityBetSendStatus(String code, String info) {
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 打码活动奖励派发方式
|
|
||||||
*
|
|
||||||
* @author liukang
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum ActivityBetSendWay {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 1.玩家自领-过期作废 2.玩家自领-过期自动派发 3.玩家申请-人工派发
|
|
||||||
*/
|
|
||||||
SENDWAY_1("1", "玩家自领-过期作废"),
|
|
||||||
SENDWAY_2("2", "玩家自领-过期自动派发"),
|
|
||||||
SENDWAY_3("3", "玩家申请-人工派发"),
|
|
||||||
SENDWAY_4("3", "直接到账");
|
|
||||||
|
|
||||||
|
|
||||||
private final String code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
ActivityBetSendWay(String code, String info) {
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 充值活动更多申领限制
|
|
||||||
*
|
|
||||||
* @author liukang
|
|
||||||
* @date 2025/01/08
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum ActivityChargeReceiveLimitType {
|
|
||||||
ReceiveLimitType_1("1", "完成短信验证才能领取"),
|
|
||||||
ReceiveLimitType_2("2", "完成邮箱验证才能领取"),
|
|
||||||
ReceiveLimitType_3("3", "完成银行卡绑定才能领取"),
|
|
||||||
ReceiveLimitType_4("4", "绑定虚拟货币才能领取"),
|
|
||||||
ReceiveLimitType_5("5", "绑定三方钱包才能领取"),
|
|
||||||
ReceiveLimitType_6("6", "绑定收款方式才能领取"),
|
|
||||||
ReceiveLimitType_7("7", "填写真实姓名才能领取"),
|
|
||||||
ReceiveLimitType_8("8", "同姓名只能领取1次"),
|
|
||||||
ReceiveLimitType_9("9", "同类型活动只能申领1次"),
|
|
||||||
ReceiveLimitType_10("10", "完成首充才能领取"),
|
|
||||||
ReceiveLimitType_11("11", "同登录IP号只能申领1次"),
|
|
||||||
ReceiveLimitType_12("12", "同登录设备号只能申领1次"),
|
|
||||||
ReceiveLimitType_13("13", "充值后且未投注才能领取");
|
|
||||||
|
|
||||||
private final String code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
ActivityChargeReceiveLimitType(String code, String info) {
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 充值活动多笔重复领取
|
|
||||||
*
|
|
||||||
* @author liukang
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum ActivityChargeRepeatReceive {
|
|
||||||
|
|
||||||
/**
|
|
||||||
*多笔重复领取(1.开启 2.关闭) 只有单笔充值才有此开关 并且开启后不用看领取次数
|
|
||||||
*
|
|
||||||
* 开启:每笔充值满足条件都可获得对应奖励,例如,充5笔200档,该档可领取5次
|
|
||||||
* 关闭:每个阶梯奖励仅可领取一次
|
|
||||||
*/
|
|
||||||
REPEATRECEIVE_1("1", "开启"),
|
|
||||||
REPEATRECEIVE_2("2", "关闭");
|
|
||||||
|
|
||||||
private final String code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
ActivityChargeRepeatReceive(String code, String info) {
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 充值活动奖金方式
|
|
||||||
*
|
|
||||||
* @author liukang
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum ActivityChargeRewardType {
|
|
||||||
|
|
||||||
/**
|
|
||||||
*奖励类型 1.固定金额 2.随机金额 3.比例
|
|
||||||
*/
|
|
||||||
REWARDTYPE_1("1", "固定金额"),
|
|
||||||
REWARDTYPE_2("2", "随机金额"),
|
|
||||||
REWARDTYPE_3("3", "比例");
|
|
||||||
|
|
||||||
private final String code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
ActivityChargeRewardType(String code, String info) {
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 充值活动条件类型
|
|
||||||
*
|
|
||||||
* @author liukang
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum ActivityChargeRuleType {
|
|
||||||
|
|
||||||
/**
|
|
||||||
*活动条件 1.账号首充 2.累计充值 3.单笔充值
|
|
||||||
*/
|
|
||||||
RULETYPE_1("1", "账号首充"),
|
|
||||||
RULETYPE_2("2", "累计充值"),
|
|
||||||
RULETYPE_3("3", "单笔充值");
|
|
||||||
|
|
||||||
private final String code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
ActivityChargeRuleType(String code, String info) {
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 充值活动奖励发放状态
|
|
||||||
*
|
|
||||||
* @author liukang
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum ActivityChargeSendStatus {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 1.未发放 2.已发放
|
|
||||||
*/
|
|
||||||
SENDSTATUS_1("1", "未发放"),
|
|
||||||
SENDSTATUS_2("2", "已发放");
|
|
||||||
|
|
||||||
private final String code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
ActivityChargeSendStatus(String code, String info) {
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 充值活动奖励派发方式
|
|
||||||
*
|
|
||||||
* @author liukang
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum ActivityChargeSendWay {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 1.玩家自领-过期作废 2.玩家自领-过期自动派发 3.玩家申请-人工派发
|
|
||||||
*/
|
|
||||||
SENDWAY_1("1", "玩家自领-过期作废"),
|
|
||||||
SENDWAY_2("2", "玩家自领-过期自动派发"),
|
|
||||||
SENDWAY_3("3", "立即派发");
|
|
||||||
|
|
||||||
|
|
||||||
private final String code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
ActivityChargeSendWay(String code, String info) {
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 推广活动奖励是否满足条件
|
|
||||||
*
|
|
||||||
* @author liukang
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum ActivityExtensionAccordCondition {
|
|
||||||
|
|
||||||
ACCORDCONDITION_1("1", "满足"),
|
|
||||||
ACCORDCONDITION_2("2", "不满足");
|
|
||||||
|
|
||||||
private final String code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
ActivityExtensionAccordCondition(String code, String info) {
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 推广活动充值状态
|
|
||||||
*
|
|
||||||
* @author liukang
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum ActivityExtensionChargeStatus {
|
|
||||||
|
|
||||||
CHARGESTATUS_1("1", "仅限已充值"),
|
|
||||||
CHARGESTATUS_2("2", "不限制");
|
|
||||||
|
|
||||||
private final String code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
ActivityExtensionChargeStatus(String code, String info) {
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 推广活动充值类型
|
|
||||||
*
|
|
||||||
* @author liukang
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum ActivityExtensionChargeType {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 1.累计充值 2.累计充值天数 3.累计充值次数
|
|
||||||
*/
|
|
||||||
CHARGETYPE_1("1", "累计充值"),
|
|
||||||
CHARGETYPE_2("2", "累计充值天数"),
|
|
||||||
CHARGETYPE_3("3", "累计充值次数");
|
|
||||||
|
|
||||||
private final String code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
ActivityExtensionChargeType(String code, String info) {
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 推广活动充值状态
|
|
||||||
*
|
|
||||||
* @author liukang
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum ActivityExtensionLoginApp {
|
|
||||||
|
|
||||||
LOGINAPP_1("1", "关闭"),
|
|
||||||
LOGINAPP_2("2", "开启");
|
|
||||||
|
|
||||||
private final String code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
ActivityExtensionLoginApp(String code, String info) {
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 推广活动奖励类型
|
|
||||||
*
|
|
||||||
* @author liukang
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum ActivityExtensionRewardType {
|
|
||||||
|
|
||||||
/**
|
|
||||||
*奖励类型 1.固定金额 2.随机金额 3.累计日结(只领取最高一档,按推广的每人进行派奖,次日自动派发到账 例如:今日有效推广8人,满足最高档奖励10/人,则可获得8*10=80的奖励)
|
|
||||||
*/
|
|
||||||
REWARDTYPE_1("1", "固定金额"),
|
|
||||||
REWARDTYPE_2("2", "随机金额"),
|
|
||||||
REWARDTYPE_3("3", "累计日结");
|
|
||||||
|
|
||||||
private final String code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
ActivityExtensionRewardType(String code, String info) {
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 推广活动奖励发放状态
|
|
||||||
*
|
|
||||||
* @author liukang
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum ActivityExtensionSendStatus {
|
|
||||||
|
|
||||||
SENDSTATUS_1("1", "未发放"),
|
|
||||||
SENDSTATUS_2("2", "已发放"),
|
|
||||||
SENDSTATUS_3("3", "日结待发放"),
|
|
||||||
SENDSTATUS_4("4", "人工申请待申请"),
|
|
||||||
SENDSTATUS_5("5", "人工申请审核中"),
|
|
||||||
SENDSTATUS_6("6", "人工申请已拒绝");
|
|
||||||
|
|
||||||
private final String code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
ActivityExtensionSendStatus(String code, String info) {
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 推广活动奖励派发方式
|
|
||||||
*
|
|
||||||
* @author liukang
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum ActivityExtensionSendWay {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 1.玩家自领-过期作废 2.玩家自领-过期自动派发 3.玩家申请-人工派发
|
|
||||||
*/
|
|
||||||
SENDWAY_1("1", "玩家自领-过期作废"),
|
|
||||||
SENDWAY_2("2", "玩家自领-过期自动派发"),
|
|
||||||
SENDWAY_3("3", "玩家申请-人工派发"),
|
|
||||||
SENDWAY_4("3", "直接到账");
|
|
||||||
|
|
||||||
|
|
||||||
private final String code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
ActivityExtensionSendWay(String code, String info) {
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 充值活动是否限时充值
|
|
||||||
*
|
|
||||||
* @author liukang
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum ActivityLimitedTimeDay {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否限时充值 1.是 2.否
|
|
||||||
*/
|
|
||||||
LIMITEDTIMEDAY_1("1", "是"),
|
|
||||||
LIMITEDTIMEDAY_2("2", "否");
|
|
||||||
|
|
||||||
private final String code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
ActivityLimitedTimeDay(String code, String info) {
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 活动循环方式
|
|
||||||
*
|
|
||||||
* @author liukang
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum ActivityLoopType {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 循环方式 1.每日循环(00:00重置) 2.每周循环(周一00:00重置) 3.每月循环(每月1日00:00重置)
|
|
||||||
*/
|
|
||||||
LOOPTYPE_1("1", "每日循环(00:00重置)"),
|
|
||||||
LOOPTYPE_2("2", "每周循环(周一00:00重置)"),
|
|
||||||
LOOPTYPE_3("3", "每月循环(每月1日00:00重置)");
|
|
||||||
|
|
||||||
private final String code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
ActivityLoopType(String code, String info) {
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 活动首页快捷入口
|
|
||||||
*
|
|
||||||
* @author liukang
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum ActivityMainEntrance {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 首页快捷入口 1.开启 2.关闭
|
|
||||||
*/
|
|
||||||
MAINENTRANCE_1("1", "开启"),
|
|
||||||
MAINENTRANCE_2("2", "关闭");
|
|
||||||
|
|
||||||
private final String code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
ActivityMainEntrance(String code, String info) {
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 活动领取次数
|
|
||||||
*
|
|
||||||
* @author liukang
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum ActivityReceiveCount {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 1.可逐条领取 2.领取最高一档(只能领一次)
|
|
||||||
*/
|
|
||||||
RECEIVECOUNT_1("1", "可逐条领取"),
|
|
||||||
RECEIVECOUNT_2("2", "领取最高一档(只能领一次)");
|
|
||||||
|
|
||||||
private final String code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
ActivityReceiveCount(String code, String info) {
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 活动更多申领限制
|
|
||||||
*
|
|
||||||
* @author liukang
|
|
||||||
* @date 2025/01/03
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum ActivityReceiveLimitType {
|
|
||||||
ReceiveLimitType_1("1", "完成短信验证才能领取"),
|
|
||||||
ReceiveLimitType_2("2", "完成邮箱验证才能领取"),
|
|
||||||
ReceiveLimitType_3("3", "完成银行卡绑定才能领取"),
|
|
||||||
ReceiveLimitType_4("4", "绑定虚拟货币才能领取"),
|
|
||||||
ReceiveLimitType_5("5", "绑定三方钱包才能领取"),
|
|
||||||
ReceiveLimitType_6("6", "绑定收款方式才能领取"),
|
|
||||||
ReceiveLimitType_7("7", "填写真实姓名才能领取"),
|
|
||||||
ReceiveLimitType_8("8", "同姓名只能领取1次"),
|
|
||||||
ReceiveLimitType_9("9", "同类型活动只能申领1次"),
|
|
||||||
ReceiveLimitType_10("10", "完成首充才能领取"),
|
|
||||||
ReceiveLimitType_11("11", "同登录IP号只能申领1次"),
|
|
||||||
ReceiveLimitType_12("12", "同登录设备号只能申领1次");
|
|
||||||
|
|
||||||
private final String code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
ActivityReceiveLimitType(String code, String info) {
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 活动奖励审核状态
|
|
||||||
*
|
|
||||||
* @author liukang
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum ActivityRewardAuditStatus {
|
|
||||||
|
|
||||||
|
|
||||||
AUDITSTATUS_1("1", "待审核"),
|
|
||||||
AUDITSTATUS_2("2", "通过"),
|
|
||||||
AUDITSTATUS_3("3", "拒绝");
|
|
||||||
|
|
||||||
private final String code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
ActivityRewardAuditStatus(String code, String info) {
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 充值活动奖励派发方式
|
|
||||||
*
|
|
||||||
* @author liukang
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum ActivityShowStatus {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 1.展示 2.隐藏
|
|
||||||
*/
|
|
||||||
SHOW("1", "展示"),
|
|
||||||
HIDE("2", "隐藏");
|
|
||||||
|
|
||||||
|
|
||||||
private final String code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
ActivityShowStatus(String code, String info) {
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 活动任务状态
|
|
||||||
*
|
|
||||||
* @author shang
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum ActivityStatus {
|
|
||||||
|
|
||||||
DRAFT(0, "草稿"),
|
|
||||||
UNDER_REVIEW(1, "审核中"),
|
|
||||||
IN_PROGRESS(2, "进行中"),
|
|
||||||
MANUALLY_CLOSED(3, "手动关闭"),
|
|
||||||
EXPIRED_CLOSED(4, "过期关闭"),
|
|
||||||
DELETE(5, "已删除");
|
|
||||||
|
|
||||||
private final Integer code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
ActivityStatus(Integer code, String info) {
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,50 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 活动模板类型
|
|
||||||
*
|
|
||||||
* @author shang
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum ActivityTemplateType {
|
|
||||||
|
|
||||||
ActivityTemplateType_1(1, "充值"),
|
|
||||||
ActivityTemplateType_2(2, "打码"),
|
|
||||||
ActivityTemplateType_3(3, "救援金"),
|
|
||||||
ActivityTemplateType_4(4, "签到"),
|
|
||||||
ActivityTemplateType_5(5, "幸运转盘"),
|
|
||||||
ActivityTemplateType_6(6, "幸运注单"),
|
|
||||||
ActivityTemplateType_7(7, "红包"),
|
|
||||||
ActivityTemplateType_8(8, "投资"),
|
|
||||||
ActivityTemplateType_9(9, "推广"),
|
|
||||||
ActivityTemplateType_10(10, "代理"),
|
|
||||||
ActivityTemplateType_11(11, "集字"),
|
|
||||||
ActivityTemplateType_12(12, "竞猜"),
|
|
||||||
ActivityTemplateType_13(13, "新人彩金"),
|
|
||||||
ActivityTemplateType_14(14, "抽奖助力"),
|
|
||||||
ActivityTemplateType_15(15, "砍一刀"),
|
|
||||||
ActivityTemplateType_16(16, "排行榜"),
|
|
||||||
ActivityTemplateType_17(17, "自定义");
|
|
||||||
|
|
||||||
|
|
||||||
private final Integer code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
ActivityTemplateType(Integer code, String info)
|
|
||||||
{
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
public static ActivityTemplateType getActivityTemplateTypByCode(Integer code)
|
|
||||||
{
|
|
||||||
for (ActivityTemplateType item : ActivityTemplateType.values()) {
|
|
||||||
if(item.getCode().equals(code)) {
|
|
||||||
return item;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import com.ff.base.exception.base.BaseException;
|
|
||||||
import com.ff.base.utils.MessageUtils;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 代理模式类型
|
|
||||||
*
|
|
||||||
* @author shang
|
|
||||||
*/
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@AllArgsConstructor
|
|
||||||
public enum AgentModelType {
|
|
||||||
ONE_LEVEL_PROFIT(1, "一级净盈利"),
|
|
||||||
THREE_LEVEL_PROFIT(2, "三级净盈利"),
|
|
||||||
GLOBAL_AGENT(3, "全民代理"),
|
|
||||||
UNLIMITED(4, "无限极差"),
|
|
||||||
ONE_LEVEL_AGENT(5, "一级代理");
|
|
||||||
|
|
||||||
private final Integer code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
public static AgentModelType getAgentModelTypeByCode(Integer code)
|
|
||||||
{
|
|
||||||
for (AgentModelType item : AgentModelType.values()) {
|
|
||||||
if(item.getCode().equals(code)) {
|
|
||||||
return item;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
throw new BaseException(MessageUtils.message("agent.agentmode.enum.not.exists"));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 安卓强制下载
|
|
||||||
*
|
|
||||||
* @author shi
|
|
||||||
* @date 2024/12/23
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum AndroidForceDownload {
|
|
||||||
DISABLED("1", "关闭(全部限制)"),
|
|
||||||
ENABLED("2", "开启");
|
|
||||||
|
|
||||||
private final String code;
|
|
||||||
private final String description;
|
|
||||||
|
|
||||||
AndroidForceDownload(String code, String description) {
|
|
||||||
this.code = code;
|
|
||||||
this.description = description;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 公告状态
|
|
||||||
*
|
|
||||||
* @author shi
|
|
||||||
* @date 2024/11/22
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum AnnouncementStatus {
|
|
||||||
PENDING_REVIEW(0, "待审核"),
|
|
||||||
PENDING_EFFECT(1, "待生效"),
|
|
||||||
ACTIVE(2, "生效中"),
|
|
||||||
EXPIRED(3, "已过期"),
|
|
||||||
CANCELLED(4, "已取消");
|
|
||||||
private final Integer code;
|
|
||||||
private final String description;
|
|
||||||
|
|
||||||
AnnouncementStatus(Integer code, String description) {
|
|
||||||
this.code = code;
|
|
||||||
this.description = description;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 应用程序位置
|
|
||||||
*
|
|
||||||
* @author shi
|
|
||||||
* @date 2024/12/03
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum AppLocation {
|
|
||||||
HOME(1, "首页"),
|
|
||||||
SECONDARY_PAGE(2, "二级页面");
|
|
||||||
|
|
||||||
private final Integer code;
|
|
||||||
private final String description;
|
|
||||||
|
|
||||||
AppLocation(Integer code, String description) {
|
|
||||||
this.code = code;
|
|
||||||
this.description = description;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 奖励类型
|
|
||||||
*
|
|
||||||
* @author shang
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum AwardType {
|
|
||||||
AwardType_1(1, "固定"),
|
|
||||||
AwardType_2(2, "随机");
|
|
||||||
|
|
||||||
private final Integer code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
AwardType(Integer code, String info)
|
|
||||||
{
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Banner状态
|
|
||||||
*
|
|
||||||
* @author shi
|
|
||||||
* @date 2024/11/22
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum BannerStatus {
|
|
||||||
PENDING_REVIEW(0, "待审核"),
|
|
||||||
PENDING_EFFECT(1, "待生效"),
|
|
||||||
ACTIVE(2, "生效中"),
|
|
||||||
EXPIRED(3, "已过期"),
|
|
||||||
CANCELLED(4, "已取消");
|
|
||||||
private final Integer code;
|
|
||||||
private final String description;
|
|
||||||
|
|
||||||
BannerStatus(Integer code, String description) {
|
|
||||||
this.code = code;
|
|
||||||
this.description = description;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 会员投注任务来源
|
|
||||||
*
|
|
||||||
* @author liukang
|
|
||||||
*/
|
|
||||||
public enum BetTaskSource
|
|
||||||
{
|
|
||||||
|
|
||||||
BetTaskSource_0("0", "会员充值"),
|
|
||||||
BetTaskSource_1("1", "充值优惠"),
|
|
||||||
BetTaskSource_2("2", "返水"),
|
|
||||||
BetTaskSource_3("3", "系统稽核"),
|
|
||||||
BetTaskSource_4("4", "资金修正"),
|
|
||||||
BetTaskSource_5("5", "取消提现"),
|
|
||||||
BetTaskSource_6("6", "VIP奖励"),
|
|
||||||
BetTaskSource_7("7", "任务"),
|
|
||||||
BetTaskSource_8("8", "活动");
|
|
||||||
|
|
||||||
private final String code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
BetTaskSource(String code, String info)
|
|
||||||
{
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCode()
|
|
||||||
{
|
|
||||||
return code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getInfo()
|
|
||||||
{
|
|
||||||
return info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 会员投注任务状态
|
|
||||||
*
|
|
||||||
* @author liukang
|
|
||||||
*/
|
|
||||||
public enum BetTaskStatus
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* 账号状态(0正常 1手动冻结 2异常冻结 3禁止领取优惠 4禁止提现 5黑名单 6停用 7禁止进入游戏 8自我禁止-限制游戏 9自我禁止-限制参与优惠 10自我禁止-限制登录)
|
|
||||||
*/
|
|
||||||
BetTaskStatus_0("0", "等待投注"),
|
|
||||||
BetTaskStatus_1("1", "进行中"),
|
|
||||||
BetTaskStatus_2("2", "完成"),
|
|
||||||
BetTaskStatus_3("3", "人工解除"),
|
|
||||||
BetTaskStatus_4("4", "系统解除"),
|
|
||||||
BetTaskStatus_5("-1", "所有未完成");
|
|
||||||
|
|
||||||
private final String code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
BetTaskStatus(String code, String info)
|
|
||||||
{
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCode()
|
|
||||||
{
|
|
||||||
return code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getInfo()
|
|
||||||
{
|
|
||||||
return info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 宝箱状态类型
|
|
||||||
*
|
|
||||||
* @author shang
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum BoxStatusType {
|
|
||||||
BoxStatusType_1("1", "不满足条件"),
|
|
||||||
BoxStatusType_2("2", "可领取"),
|
|
||||||
BoxStatusType_3("3", "已领取");
|
|
||||||
|
|
||||||
private final String code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
BoxStatusType(String code, String info)
|
|
||||||
{
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 计算方式类型
|
|
||||||
*
|
|
||||||
* @author shang
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum CalcModeType {
|
|
||||||
CalcModeType_0("0", "所有会员(综合盈利会员)"),
|
|
||||||
CalcModeType_1("1", "仅计算亏损会员");
|
|
||||||
|
|
||||||
private final String code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
CalcModeType(String code, String info)
|
|
||||||
{
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 佣金计算依据类型
|
|
||||||
*
|
|
||||||
* @author shang
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum CalcPerformanceType {
|
|
||||||
|
|
||||||
CalcPerformanceType_0("0", "有效投注"),
|
|
||||||
CalcPerformanceType_1("1", "亏损金额"),
|
|
||||||
CalcPerformanceType_2("2", "净盈利");
|
|
||||||
|
|
||||||
private final String code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
CalcPerformanceType(String code, String info)
|
|
||||||
{
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 计算方式类型
|
|
||||||
*
|
|
||||||
* @author shang
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum CalcRangeType {
|
|
||||||
CalcRangeType_0("0", "计算全部(含无效)"),
|
|
||||||
CalcRangeType_1("1", "只计算有效会员业绩");
|
|
||||||
|
|
||||||
private final String code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
CalcRangeType(String code, String info)
|
|
||||||
{
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 任务目标类型
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum CalculateType {
|
|
||||||
CalculateType_1(1, "累计充值"),
|
|
||||||
CalculateType_2(2, "累计有效投注"),
|
|
||||||
CalculateType_3(3, "单局有效投注"),
|
|
||||||
CalculateType_4(4, "单局盈利"),
|
|
||||||
CalculateType_5(5, "单局亏损"),
|
|
||||||
CalculateType_6(6, "累计盈利"),
|
|
||||||
CalculateType_7(7, "累计亏损"),
|
|
||||||
CalculateType_8(8, "神秘大奖");
|
|
||||||
|
|
||||||
private final Integer code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
CalculateType(Integer code, String info) {
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更改状态
|
|
||||||
*
|
|
||||||
* @author shi
|
|
||||||
* @date 2024/10/31
|
|
||||||
*/
|
|
||||||
public enum ChangeStatus {
|
|
||||||
SUCCESS(1, "成功"),
|
|
||||||
FAIL(2, "失败");
|
|
||||||
|
|
||||||
private final Integer code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
ChangeStatus(Integer code, String info) {
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getCode() {
|
|
||||||
return code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getInfo() {
|
|
||||||
return info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通道类型
|
|
||||||
*
|
|
||||||
* @author shi
|
|
||||||
* @date 2025/01/11
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum ChannelType {
|
|
||||||
CHANNEL_LINK(1, "渠道链接"),
|
|
||||||
PWA_SHORTCUT_APP(2, "PWA快捷APP"),
|
|
||||||
WG_GAME_TRIAL_LINK(3, "WG游戏试玩链接"),
|
|
||||||
INDEPENDENT_CHANNEL_PACKAGE(4, "独立渠道包"),
|
|
||||||
NATIVE_MAJIA_PACKAGE(5, "原生马甲包"),
|
|
||||||
DOWNLOAD_SITE_SOURCE(6, "下载站源码");
|
|
||||||
|
|
||||||
private final Integer value;
|
|
||||||
private final String description;
|
|
||||||
|
|
||||||
ChannelType(Integer value, String description) {
|
|
||||||
this.value = value;
|
|
||||||
this.description = description;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 充值订单标记枚举
|
|
||||||
*
|
|
||||||
* @author liukang
|
|
||||||
* @date 2024/11/27
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
@AllArgsConstructor
|
|
||||||
public enum ChargeOrderFlag {
|
|
||||||
|
|
||||||
ChargeOrderFlag_0( "确认入款"),
|
|
||||||
ChargeOrderFlag_1("取消入款"),
|
|
||||||
ChargeOrderFlag_2( "补单审核通过"),
|
|
||||||
ChargeOrderFlag_3( "补单审核拒绝"),
|
|
||||||
ChargeOrderFlag_4( "无审核补单");
|
|
||||||
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
import java.util.Optional;
|
|
||||||
import java.util.stream.Stream;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 充值订单支付状态
|
|
||||||
*
|
|
||||||
* @author liukang
|
|
||||||
* @date 2024/11/22
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
@AllArgsConstructor
|
|
||||||
public enum ChargeOrderPayStatus {
|
|
||||||
|
|
||||||
STATUS_0(0, 0, "待支付"),
|
|
||||||
STATUS_1(1, 1, "支付超时"),
|
|
||||||
STATUS_2(2, 2, "补单审核中"),
|
|
||||||
STATUS_3(3, 3, "支付成功"),
|
|
||||||
STATUS_4(4, 4, "支付失败");
|
|
||||||
|
|
||||||
private final Integer status;
|
|
||||||
private final Integer code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 按code查找状态
|
|
||||||
*
|
|
||||||
* @param code 代码
|
|
||||||
* @return {@link String }
|
|
||||||
*/
|
|
||||||
public static Integer findStatusByCode(Integer code) {
|
|
||||||
Optional<Integer> system = Stream.of(ChargeOrderPayStatus.values())
|
|
||||||
.filter(fyPayStatus -> fyPayStatus.getCode().equals(code))
|
|
||||||
.map(ChargeOrderPayStatus::getStatus)
|
|
||||||
.findFirst();
|
|
||||||
return system.orElse(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 成本型
|
|
||||||
*
|
|
||||||
* @author shi
|
|
||||||
* @date 2025/01/11
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum CostType {
|
|
||||||
YEAR(1, "年"),
|
|
||||||
QUARTER(2, "季度"),
|
|
||||||
MONTH(3, "月");
|
|
||||||
|
|
||||||
private final Integer value; // 使用包装类 Integer
|
|
||||||
private final String description;
|
|
||||||
|
|
||||||
CostType(Integer value, String description) {
|
|
||||||
this.value = value;
|
|
||||||
this.description = description;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设备类型枚举
|
|
||||||
*
|
|
||||||
* @author liukang
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum DeviceType {
|
|
||||||
|
|
||||||
DEVICETYPE_1("APP-iOS", "APP-iOS"),
|
|
||||||
DEVICETYPE_2("H5-iOS", "H5-iOS"),
|
|
||||||
DEVICETYPE_3("APP-Android", "APP-Android"),
|
|
||||||
DEVICETYPE_4("H5-Android", "H5-Android"),
|
|
||||||
DEVICETYPE_5("PC-Windows", "PC-Windows"),
|
|
||||||
DEVICETYPE_6("PC-Mac", "PC-Mac");
|
|
||||||
|
|
||||||
private final String code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
DeviceType(String code, String info) {
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 直属或者其他标识类型
|
|
||||||
*
|
|
||||||
* @author shang
|
|
||||||
*/
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
public enum DirectFlagType {
|
|
||||||
DirectFlagType_0(0, "其他"),
|
|
||||||
DirectFlagType_1(1, "直属");
|
|
||||||
|
|
||||||
private final Integer code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
DirectFlagType(Integer code, String info)
|
|
||||||
{
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,63 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 优惠领取小类
|
|
||||||
*
|
|
||||||
* @author liukang
|
|
||||||
* @date 2024/12/21
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
@AllArgsConstructor
|
|
||||||
public enum DiscountReceiveSmallType {
|
|
||||||
|
|
||||||
SMALLTYPE_1("1", "VIP晋级奖励"),
|
|
||||||
SMALLTYPE_2("2", "VIP日俸禄"),
|
|
||||||
SMALLTYPE_3("3", "VIP周俸禄"),
|
|
||||||
SMALLTYPE_4("4", "VIP月俸禄"),
|
|
||||||
|
|
||||||
SMALLTYPE_5("5", "新人福利(注册账号)"),
|
|
||||||
SMALLTYPE_6("6", "新人福利(首次绑定银行卡)"),
|
|
||||||
SMALLTYPE_7("7", "新人福利(设置生日)"),
|
|
||||||
SMALLTYPE_8("8", "新人福利(设置取款密码)"),
|
|
||||||
SMALLTYPE_9("9", "新人福利(设置密保)"),
|
|
||||||
SMALLTYPE_10("10", "新人福利(利息宝首存)"),
|
|
||||||
SMALLTYPE_11("11", "新人福利(设置头像)"),
|
|
||||||
SMALLTYPE_12("12", "新人福利(短信验证)"),
|
|
||||||
SMALLTYPE_13("13", "新人福利(设置Google验证器)"),
|
|
||||||
SMALLTYPE_14("14", "新人福利(注册首存)"),
|
|
||||||
SMALLTYPE_15("15", "新人福利(首次下载安装并登录APP)"),
|
|
||||||
SMALLTYPE_16("16", "新人福利(邮箱验证)"),
|
|
||||||
SMALLTYPE_17("17", "新人福利(保存桌面快捷方式)"),
|
|
||||||
SMALLTYPE_18("18", "新人福利(首次绑定数字货币)"),
|
|
||||||
SMALLTYPE_19("19", "新人福利(添加提现账户)"),
|
|
||||||
SMALLTYPE_20("20", "新人福利(首次提现)"),
|
|
||||||
SMALLTYPE_21("21", "新人福利(设置任意联系方式)"),
|
|
||||||
|
|
||||||
SMALLTYPE_22("22", "每日任务"),
|
|
||||||
SMALLTYPE_23("23", "每周任务"),
|
|
||||||
SMALLTYPE_24("24", "神秘任务"),
|
|
||||||
SMALLTYPE_25("25", "推广活动"),
|
|
||||||
SMALLTYPE_26("26", "有奖反馈"),
|
|
||||||
SMALLTYPE_27("27", "活跃度宝箱"),
|
|
||||||
SMALLTYPE_28("28", "充值活动"),
|
|
||||||
SMALLTYPE_29("29", "打码活动"),
|
|
||||||
SMALLTYPE_30("30", "返水活动");
|
|
||||||
|
|
||||||
private final String smallType;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
public static DiscountReceiveSmallType getDiscountReceiveSmallTypeByType(String smallType)
|
|
||||||
{
|
|
||||||
for (DiscountReceiveSmallType item : DiscountReceiveSmallType.values()) {
|
|
||||||
if(item.getSmallType().equals(smallType)) {
|
|
||||||
return item;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
import java.util.Optional;
|
|
||||||
import java.util.stream.Stream;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 优惠领取来源
|
|
||||||
*
|
|
||||||
* @author liukang
|
|
||||||
* @date 2024/12/21
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
@AllArgsConstructor
|
|
||||||
public enum DiscountReceiveSource {
|
|
||||||
|
|
||||||
SOURCE_1("1", "VIP奖励"),
|
|
||||||
SOURCE_2("2", "返水"),
|
|
||||||
SOURCE_3("3", "任务奖励"),
|
|
||||||
SOURCE_4("4", "活动奖励");
|
|
||||||
|
|
||||||
private final String source;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 优惠领取状态
|
|
||||||
*
|
|
||||||
* @author liukang
|
|
||||||
* @date 2024/12/21
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
@AllArgsConstructor
|
|
||||||
public enum DiscountReceiveStatus {
|
|
||||||
|
|
||||||
STATUS_0("0", "待领取"),
|
|
||||||
STATUS_1("1", "已领取"),
|
|
||||||
STATUS_2("2", "系统已派发"),
|
|
||||||
// 会员降级作废、任务层级去除也需作废等
|
|
||||||
STATUS_3("3", "已作废"),
|
|
||||||
STATUS_4("4", "已过期"),
|
|
||||||
STATUS_5("-1", "所有已领取"),
|
|
||||||
STATUS_6("6", "手动已派发"),
|
|
||||||
STATUS_7("7", "已取消"),
|
|
||||||
STATUS_8("-2", "所有已放弃");
|
|
||||||
private final String status;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
public enum DnsRecordType {
|
|
||||||
A(1, "A"),
|
|
||||||
AAAA(2, "AAAA"),
|
|
||||||
CNAME(3, "CNAME"),
|
|
||||||
TXT(4, "TXT"),
|
|
||||||
MX(5, "MX"),
|
|
||||||
SRV(6, "SRV"),
|
|
||||||
NS(7, "NS");
|
|
||||||
|
|
||||||
private final Integer value;
|
|
||||||
private final String name;
|
|
||||||
|
|
||||||
DnsRecordType(Integer value, String name) {
|
|
||||||
this.value = value;
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 按值获取名称
|
|
||||||
*
|
|
||||||
* @param value 价值
|
|
||||||
* @return {@link String }
|
|
||||||
*/
|
|
||||||
public static String getNameByValue(Integer value) {
|
|
||||||
for (DnsRecordType type : DnsRecordType.values()) {
|
|
||||||
if (type.getValue().equals(value)) {
|
|
||||||
return type.getName();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Cloudfare 状态类型
|
|
||||||
*
|
|
||||||
* @author shi
|
|
||||||
* @date 2025/01/20
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum DomainCloudfareStatus {
|
|
||||||
INITIALIZING("initializing", "初始化中"),
|
|
||||||
PENDING("pending", "待处理"),
|
|
||||||
ACTIVE("active", "激活状态");
|
|
||||||
|
|
||||||
private final String value;
|
|
||||||
private final String description;
|
|
||||||
|
|
||||||
DomainCloudfareStatus(String value, String description) {
|
|
||||||
this.value = value;
|
|
||||||
this.description = description;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 域子类型
|
|
||||||
*
|
|
||||||
* @author shi
|
|
||||||
* @date 2025/01/03
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum DomainSonType {
|
|
||||||
WEB_HALL(1, "Web大厅"),
|
|
||||||
BACKEND_ACCELERATION(2, "后端加速域名"),
|
|
||||||
APP_HALL(3, "App大厅"),
|
|
||||||
OSS_DOMAIN(4, "OSS域名"),
|
|
||||||
DOWNLOAD_SITE(5, "下载站域名"),
|
|
||||||
PAYMENT_DOMAIN(6, "支付域名");
|
|
||||||
|
|
||||||
private final Integer value;
|
|
||||||
private final String description;
|
|
||||||
|
|
||||||
DomainSonType(Integer value, String description) {
|
|
||||||
this.value = value;
|
|
||||||
this.description = description;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 域子使用状态
|
|
||||||
*
|
|
||||||
* @author shi
|
|
||||||
* @date 2025/01/21
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum DomainSonUsageStatus {
|
|
||||||
PENDING(1, "待启用"),
|
|
||||||
ENABLE_IN_PROGRESS(2, "启用中"),
|
|
||||||
SWITCH_IN_PROGRESS(3, "切换中"),
|
|
||||||
ENABLED(4, "启用成功"),
|
|
||||||
DISABLE_IN_PROGRESS(5, "停用中");
|
|
||||||
|
|
||||||
private final Integer value;
|
|
||||||
private final String description;
|
|
||||||
|
|
||||||
DomainSonUsageStatus(Integer value, String description) {
|
|
||||||
this.value = value;
|
|
||||||
this.description = description;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 域状态
|
|
||||||
*
|
|
||||||
* @author shi
|
|
||||||
* @date 2025/01/02
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum DomainStatus {
|
|
||||||
PENDING_VERIFICATION(1, "待验证"),
|
|
||||||
NORMAL(2, "正常"),
|
|
||||||
EXPIRED(3, "已过期"),
|
|
||||||
PENDING_RECOVERY(4, "待找回");
|
|
||||||
|
|
||||||
|
|
||||||
private final int value;
|
|
||||||
private final String description;
|
|
||||||
|
|
||||||
DomainStatus(int value, String description) {
|
|
||||||
this.value = value;
|
|
||||||
this.description = description;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 下载类型
|
|
||||||
*
|
|
||||||
* @author shi
|
|
||||||
* @date 2025/01/11
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum DownloadType {
|
|
||||||
WEB_HALL(1, "Web大厅"),
|
|
||||||
DOWNLOAD_SITE(2, "下载站");
|
|
||||||
|
|
||||||
private final Integer value;
|
|
||||||
private final String description;
|
|
||||||
|
|
||||||
DownloadType(Integer value, String description) {
|
|
||||||
this.value = value;
|
|
||||||
this.description = description;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 领取奖励方式
|
|
||||||
*
|
|
||||||
* @author shang
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum DrawType {
|
|
||||||
DrawType_1("1", "一键领取"),
|
|
||||||
DrawType_2("2", "单笔领取");
|
|
||||||
|
|
||||||
private final String code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
DrawType(String code, String info){
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 启用状态
|
|
||||||
*
|
|
||||||
* @author shang
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum EnableStatus {
|
|
||||||
OFF(0, "关闭"),
|
|
||||||
ON(1, "开启");
|
|
||||||
|
|
||||||
private final Integer code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
EnableStatus(Integer code, String info)
|
|
||||||
{
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 事项类型
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum EventType {
|
|
||||||
EventType_1(1, "充值"),
|
|
||||||
EventType_2(2, "投注");
|
|
||||||
|
|
||||||
private final Integer code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
EventType(Integer code, String info)
|
|
||||||
{
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 反馈状态
|
|
||||||
*
|
|
||||||
* @author shi
|
|
||||||
* @date 2024/12/10
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum FeedbackStatus {
|
|
||||||
PENDING(1, "待处理"),
|
|
||||||
ACCEPTED(2, "已采纳"),
|
|
||||||
IGNORED(3, "已忽略");
|
|
||||||
|
|
||||||
private final Integer code;
|
|
||||||
private final String description;
|
|
||||||
|
|
||||||
FeedbackStatus(Integer code, String description) {
|
|
||||||
this.code = code;
|
|
||||||
this.description = description;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 弹框状态
|
|
||||||
*
|
|
||||||
* @author shi
|
|
||||||
* @date 2024/11/25
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum FrameStatus {
|
|
||||||
PENDING_REVIEW(0, "待审核"),
|
|
||||||
PENDING_EFFECT(1, "待生效"),
|
|
||||||
ACTIVE(2, "生效中"),
|
|
||||||
EXPIRED(3, "已过期"),
|
|
||||||
CANCELLED(4, "已取消");
|
|
||||||
private final Integer code;
|
|
||||||
private final String description;
|
|
||||||
|
|
||||||
FrameStatus(Integer code, String description) {
|
|
||||||
this.code = code;
|
|
||||||
this.description = description;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,44 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
import java.util.Optional;
|
|
||||||
import java.util.stream.Stream;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* fypay支付状态
|
|
||||||
*
|
|
||||||
* @author liukang
|
|
||||||
* @date 2024/10/22
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
@AllArgsConstructor
|
|
||||||
public enum FyPayStatus {
|
|
||||||
|
|
||||||
PROCESSING(0, "PROCESSING", "待支付"),
|
|
||||||
SUCCESS(1, "SUCCESS", "支付成功"),
|
|
||||||
FAIL(2, "FAIL", "支付失败"),
|
|
||||||
TIMEOUT(2, "TIMEOUT", "超时关闭"),
|
|
||||||
EXCEPTION(2, "EXCEPTION", "发起支付异常"),
|
|
||||||
CLOSE(2, "CLOSE", "手动关闭");
|
|
||||||
|
|
||||||
private final Integer status;
|
|
||||||
private final String code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 按code查找状态
|
|
||||||
*
|
|
||||||
* @param code 代码
|
|
||||||
* @return {@link String }
|
|
||||||
*/
|
|
||||||
public static Integer findStatusByCode(String code) {
|
|
||||||
Optional<Integer> system = Stream.of(FyPayStatus.values())
|
|
||||||
.filter(fyPayStatus -> fyPayStatus.getCode().equals(code))
|
|
||||||
.map(FyPayStatus::getStatus)
|
|
||||||
.findFirst();
|
|
||||||
return system.orElse(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 游戏收藏状态
|
|
||||||
*
|
|
||||||
* @author shi
|
|
||||||
* @date 2024/11/04
|
|
||||||
*/
|
|
||||||
public enum GameCollectionStatus {
|
|
||||||
COMPLETE(1, " 收藏中"),
|
|
||||||
NOT(2, "未收藏");
|
|
||||||
|
|
||||||
private final Integer code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
GameCollectionStatus(Integer code, String info) {
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getCode() {
|
|
||||||
return code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getInfo() {
|
|
||||||
return info;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 游戏事件
|
|
||||||
*
|
|
||||||
* @author shi
|
|
||||||
* @date 2024/12/10
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum GameEventEnum {
|
|
||||||
FETCH_BETTING_RECORD(1, "投注记录拉取");
|
|
||||||
|
|
||||||
private final Integer code;
|
|
||||||
private final String description;
|
|
||||||
|
|
||||||
GameEventEnum(Integer code, String description) {
|
|
||||||
this.code = code;
|
|
||||||
this.description = description;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 游戏热门状态
|
|
||||||
*
|
|
||||||
* @author shi
|
|
||||||
* @date 2024/11/01
|
|
||||||
*/
|
|
||||||
public enum GameHotStatus {
|
|
||||||
CLOSE("1", " 关闭"),
|
|
||||||
OPEN("2", "开启");
|
|
||||||
|
|
||||||
private final String code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
GameHotStatus(String code, String info) {
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCode() {
|
|
||||||
return code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getInfo() {
|
|
||||||
return info;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 游戏状态
|
|
||||||
*
|
|
||||||
* @author shi
|
|
||||||
* @date 2024/10/23
|
|
||||||
*/
|
|
||||||
public enum GameOpenStatus {
|
|
||||||
OPEN(1, " 开启"),
|
|
||||||
CLOSE(2, "关闭");
|
|
||||||
|
|
||||||
private final Integer code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
GameOpenStatus(Integer code, String info) {
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getCode() {
|
|
||||||
return code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getInfo() {
|
|
||||||
return info;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 游戏状态
|
|
||||||
*
|
|
||||||
* @author shi
|
|
||||||
* @date 2024/10/31
|
|
||||||
*/
|
|
||||||
public enum GamePlayStatus {
|
|
||||||
ACTIVE(1, "在线"),
|
|
||||||
OFFLINE(2, "脱机"),
|
|
||||||
EXIST(3, "账号不存在")
|
|
||||||
;
|
|
||||||
|
|
||||||
private final Integer code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
GamePlayStatus(Integer code, String info) {
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getCode() {
|
|
||||||
return code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getInfo() {
|
|
||||||
return info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 游戏流行
|
|
||||||
*
|
|
||||||
* @author shi
|
|
||||||
* @date 2024/10/29
|
|
||||||
*/
|
|
||||||
public enum GamePopularCategory {
|
|
||||||
PLATFORM(1, "平台"),
|
|
||||||
GAME(2, "子游戏");
|
|
||||||
|
|
||||||
private final Integer code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
GamePopularCategory(Integer code, String info) {
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getCode() {
|
|
||||||
return code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getInfo() {
|
|
||||||
return info;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 游戏流行
|
|
||||||
*
|
|
||||||
* @author shi
|
|
||||||
* @date 2024/10/29
|
|
||||||
*/
|
|
||||||
public enum GamePopularStatus {
|
|
||||||
POPULAR(1, "热门"),
|
|
||||||
NOT_POPULAR(2, "非热门");
|
|
||||||
|
|
||||||
private final Integer code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
GamePopularStatus(Integer code, String info) {
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getCode() {
|
|
||||||
return code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getInfo() {
|
|
||||||
return info;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 游戏流行
|
|
||||||
*
|
|
||||||
* @author shi
|
|
||||||
* @date 2024/10/29
|
|
||||||
*/
|
|
||||||
public enum GamePopularType {
|
|
||||||
POPULAR_ONE(1, "热门一"),
|
|
||||||
POPULAR_TWO(2, "热门二");
|
|
||||||
|
|
||||||
private final Integer code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
GamePopularType(Integer code, String info) {
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getCode() {
|
|
||||||
return code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getInfo() {
|
|
||||||
return info;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 发起类型
|
|
||||||
*/
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
public enum InitiatingType {
|
|
||||||
InitiatingType_1(1, "手动发起"),
|
|
||||||
InitiatingType_2(2, "定时任务");
|
|
||||||
|
|
||||||
private final Integer code;
|
|
||||||
private final String info;
|
|
||||||
|
|
||||||
InitiatingType(Integer code, String info)
|
|
||||||
{
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -14,9 +14,9 @@ public enum JILIGameType {
|
||||||
|
|
||||||
ELECTRON(1, 1L,"电子"),
|
ELECTRON(1, 1L,"电子"),
|
||||||
CHESS(2, 2L,"棋牌"),
|
CHESS(2, 2L,"棋牌"),
|
||||||
GAME_HALL(3, 0L,"游戏大厅"),
|
GAME_HALL(3, 3L,"游戏大厅"),
|
||||||
CATCH_FISH(5, 4L,"捕鱼"),
|
CATCH_FISH(5, 4L,"捕鱼"),
|
||||||
MACHINE(8, 2L,"棋牌")
|
MACHINE(8, 5L,"押分机 (含宾果)")
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* lang类型
|
|
||||||
*
|
|
||||||
* @author shi
|
|
||||||
* @date 2024/12/31
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum LangType {
|
|
||||||
APP(1, "app"),
|
|
||||||
BACKEND_SYSTEM(2, "后台管理系统");
|
|
||||||
|
|
||||||
private final int value;
|
|
||||||
private final String description;
|
|
||||||
|
|
||||||
LangType(int value, String description) {
|
|
||||||
this.value = value;
|
|
||||||
this.description = description;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
package com.ff.base.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 布局登录类型
|
|
||||||
*
|
|
||||||
* @author shi
|
|
||||||
* @date 2025/01/20
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum LayoutLoginType {
|
|
||||||
BEFORE(1, "前"),
|
|
||||||
AFTER(2, "后");
|
|
||||||
|
|
||||||
private final Integer value;
|
|
||||||
private final String description;
|
|
||||||
|
|
||||||
LayoutLoginType(Integer value, String description) {
|
|
||||||
this.value = value;
|
|
||||||
this.description = description;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue