refactor(ff-game): 重构游戏相关服务和接口
- 修改了多个控制器和实现类中的方法调用,使用新的Biz接口替代旧的Service接口 - 删除了IGameService接口及其实现类GameServiceImpl - 新增了ITenantAgentInviteBiz接口 - 优化了多个类的依赖注入,使用更具体的Biz接口替代泛型Service接口main-pp
parent
9e6cfe177b
commit
180d454907
|
@ -21,8 +21,9 @@ import com.ff.base.utils.bean.BeanUtils;
|
||||||
import com.ff.base.utils.ip.IpUtils;
|
import com.ff.base.utils.ip.IpUtils;
|
||||||
import com.ff.common.domain.TenantAgentPlatform;
|
import com.ff.common.domain.TenantAgentPlatform;
|
||||||
import com.ff.common.dto.BalanceChangesDTO;
|
import com.ff.common.dto.BalanceChangesDTO;
|
||||||
import com.ff.common.service.ITenantAgentPlatformService;
|
import com.ff.tenant.service.ITenantAgentPlatformService;
|
||||||
import com.ff.common.service.ITenantGameQuotaService;
|
import com.ff.tenant.service.ITenantGameQuotaBiz;
|
||||||
|
import com.ff.tenant.service.ITenantGameQuotaService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
@ -51,6 +52,9 @@ public class AgentController extends BaseController {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ITenantGameQuotaService tenantGameQuotaService;
|
private ITenantGameQuotaService tenantGameQuotaService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ITenantGameQuotaBiz tenantGameQuotaBiz;
|
||||||
@Resource
|
@Resource
|
||||||
private ITenantPlatformService tenantPlatformService;
|
private ITenantPlatformService tenantPlatformService;
|
||||||
|
|
||||||
|
@ -127,7 +131,7 @@ public class AgentController extends BaseController {
|
||||||
if (tenant > 0) {
|
if (tenant > 0) {
|
||||||
//信誉额度
|
//信誉额度
|
||||||
if (!ObjectUtils.isEmpty(agentCreateTenantDTO.getRealBalance())) {
|
if (!ObjectUtils.isEmpty(agentCreateTenantDTO.getRealBalance())) {
|
||||||
tenantGameQuotaService.balanceChanges(BalanceChangesDTO.builder()
|
tenantGameQuotaBiz.balanceChanges(BalanceChangesDTO.builder()
|
||||||
.isOut(Boolean.TRUE)
|
.isOut(Boolean.TRUE)
|
||||||
.currencyCode(Constants.USDT)
|
.currencyCode(Constants.USDT)
|
||||||
.tenantKey(agentCreateTenantDTO.getAccount())
|
.tenantKey(agentCreateTenantDTO.getAccount())
|
||||||
|
|
|
@ -1,36 +1,28 @@
|
||||||
package com.ff.agent.controller;
|
package com.ff.agent.controller;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import com.ff.agent.domain.TenantAgentInvite;
|
||||||
import java.util.List;
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
import com.ff.agent.domain.TenantAgentInvitePlatform;
|
import com.ff.agent.domain.TenantAgentInvitePlatform;
|
||||||
import com.ff.agent.dto.TenantAgentInviteDTO;
|
import com.ff.agent.dto.TenantAgentInviteDTO;
|
||||||
|
import com.ff.agent.service.ITenantAgentInviteBiz;
|
||||||
import com.ff.agent.service.ITenantAgentInvitePlatformService;
|
import com.ff.agent.service.ITenantAgentInvitePlatformService;
|
||||||
|
import com.ff.agent.service.ITenantAgentInviteService;
|
||||||
import com.ff.base.annotation.Anonymous;
|
import com.ff.base.annotation.Anonymous;
|
||||||
import com.ff.base.constant.ConfigConstants;
|
|
||||||
import com.ff.base.enums.InviteType;
|
|
||||||
import com.ff.base.system.domain.TenantPlatform;
|
|
||||||
import com.ff.base.system.service.ISysConfigService;
|
|
||||||
import com.ff.base.utils.bean.BeanUtils;
|
|
||||||
import com.ff.common.domain.TenantAgentPlatform;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
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.annotation.Log;
|
||||||
|
import com.ff.base.constant.ConfigConstants;
|
||||||
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.BusinessType;
|
|
||||||
import com.ff.agent.domain.TenantAgentInvite;
|
|
||||||
import com.ff.agent.service.ITenantAgentInviteService;
|
|
||||||
import com.ff.base.core.page.TableDataInfo;
|
import com.ff.base.core.page.TableDataInfo;
|
||||||
|
import com.ff.base.enums.BusinessType;
|
||||||
|
import com.ff.base.enums.InviteType;
|
||||||
|
import com.ff.base.system.service.ISysConfigService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 代理邀请链接Controller
|
* 代理邀请链接Controller
|
||||||
|
@ -43,6 +35,8 @@ import com.ff.base.core.page.TableDataInfo;
|
||||||
public class TenantAgentInviteController extends BaseController {
|
public class TenantAgentInviteController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private ITenantAgentInviteService tenantAgentInviteService;
|
private ITenantAgentInviteService tenantAgentInviteService;
|
||||||
|
@Autowired
|
||||||
|
private ITenantAgentInviteBiz tenantAgentInviteBiz;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ISysConfigService sysConfigService;
|
private ISysConfigService sysConfigService;
|
||||||
|
@ -93,7 +87,7 @@ public class TenantAgentInviteController extends BaseController {
|
||||||
public AjaxResult add(@Validated @RequestBody TenantAgentInviteDTO tenantAgentInvite) {
|
public AjaxResult add(@Validated @RequestBody TenantAgentInviteDTO tenantAgentInvite) {
|
||||||
tenantAgentInvite.setAgentId(getUserId());
|
tenantAgentInvite.setAgentId(getUserId());
|
||||||
String inviteUrl = sysConfigService.selectConfigByKey(ConfigConstants.INVITE_URL);
|
String inviteUrl = sysConfigService.selectConfigByKey(ConfigConstants.INVITE_URL);
|
||||||
tenantAgentInvite.setInviteCode(tenantAgentInviteService.getInviteCode());
|
tenantAgentInvite.setInviteCode(tenantAgentInviteBiz.getInviteCode());
|
||||||
tenantAgentInvite.setInviteUrl(inviteUrl + "?code=" + tenantAgentInvite.getInviteCode());
|
tenantAgentInvite.setInviteUrl(inviteUrl + "?code=" + tenantAgentInvite.getInviteCode());
|
||||||
tenantAgentInvite.setCreateBy(getUsername());
|
tenantAgentInvite.setCreateBy(getUsername());
|
||||||
int result = tenantAgentInviteService.insertTenantAgentInvite(tenantAgentInvite);
|
int result = tenantAgentInviteService.insertTenantAgentInvite(tenantAgentInvite);
|
||||||
|
|
|
@ -1,11 +1,5 @@
|
||||||
package com.ff.agent.controller;
|
package com.ff.agent.controller;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import cn.hutool.core.util.IdUtil;
|
import cn.hutool.core.util.IdUtil;
|
||||||
import com.ff.agent.domain.TenantAgentCommission;
|
import com.ff.agent.domain.TenantAgentCommission;
|
||||||
import com.ff.agent.domain.TenantAgentInvite;
|
import com.ff.agent.domain.TenantAgentInvite;
|
||||||
|
@ -13,48 +7,38 @@ import com.ff.agent.domain.TenantAgentInvitePlatform;
|
||||||
import com.ff.agent.domain.TenantAgentInviteRegister;
|
import com.ff.agent.domain.TenantAgentInviteRegister;
|
||||||
import com.ff.agent.dto.TenantAgentInviteRegisterAddDTO;
|
import com.ff.agent.dto.TenantAgentInviteRegisterAddDTO;
|
||||||
import com.ff.agent.dto.TenantAgentInviteRegisterDTO;
|
import com.ff.agent.dto.TenantAgentInviteRegisterDTO;
|
||||||
import com.ff.agent.service.ITenantAgentCommissionService;
|
import com.ff.agent.service.*;
|
||||||
import com.ff.agent.service.ITenantAgentInvitePlatformService;
|
|
||||||
import com.ff.agent.service.ITenantAgentInviteRegisterService;
|
|
||||||
import com.ff.agent.service.ITenantAgentInviteService;
|
|
||||||
import com.ff.base.annotation.Anonymous;
|
import com.ff.base.annotation.Anonymous;
|
||||||
import com.ff.base.annotation.Excel;
|
|
||||||
import com.ff.base.constant.Constants;
|
import com.ff.base.constant.Constants;
|
||||||
|
import com.ff.base.core.controller.BaseController;
|
||||||
|
import com.ff.base.core.domain.AjaxResult;
|
||||||
|
import com.ff.base.core.page.TableDataInfo;
|
||||||
import com.ff.base.enums.*;
|
import com.ff.base.enums.*;
|
||||||
import com.ff.base.system.domain.TenantAgent;
|
import com.ff.base.system.domain.TenantAgent;
|
||||||
import com.ff.base.system.domain.TenantPlatform;
|
import com.ff.base.system.domain.TenantPlatform;
|
||||||
import com.ff.base.system.domain.TenantSecretKey;
|
import com.ff.base.system.domain.TenantSecretKey;
|
||||||
import com.ff.base.system.dto.CreateTenantDTO;
|
import com.ff.base.system.dto.CreateTenantDTO;
|
||||||
import com.ff.base.system.dto.TenantSecretKeyDTO;
|
|
||||||
import com.ff.base.system.service.ITenantAgentService;
|
import com.ff.base.system.service.ITenantAgentService;
|
||||||
import com.ff.base.system.service.ITenantSecretKeyService;
|
import com.ff.base.system.service.ITenantSecretKeyService;
|
||||||
import com.ff.base.utils.DateUtils;
|
import com.ff.base.utils.DateUtils;
|
||||||
import com.ff.base.utils.MessageUtils;
|
import com.ff.base.utils.MessageUtils;
|
||||||
import com.ff.base.utils.SecurityUtils;
|
|
||||||
import com.ff.base.utils.bean.BeanUtils;
|
import com.ff.base.utils.bean.BeanUtils;
|
||||||
import com.ff.base.utils.ip.IpUtils;
|
import com.ff.base.utils.ip.IpUtils;
|
||||||
import com.ff.base.utils.uuid.IdUtils;
|
|
||||||
import com.ff.common.dto.BalanceChangesDTO;
|
import com.ff.common.dto.BalanceChangesDTO;
|
||||||
import com.ff.common.service.ITenantGameQuotaService;
|
import com.ff.tenant.service.ITenantGameQuotaBiz;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import com.ff.tenant.service.ITenantGameQuotaService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.util.Assert;
|
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;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PutMapping;
|
import javax.annotation.Resource;
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
import java.math.BigDecimal;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import java.util.ArrayList;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import java.util.List;
|
||||||
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.utils.poi.ExcelUtil;
|
|
||||||
import com.ff.base.core.page.TableDataInfo;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 代理邀请注册Controller
|
* 代理邀请注册Controller
|
||||||
|
@ -67,6 +51,8 @@ import com.ff.base.core.page.TableDataInfo;
|
||||||
public class TenantAgentInviteRegisterController extends BaseController {
|
public class TenantAgentInviteRegisterController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private ITenantAgentInviteRegisterService tenantAgentInviteRegisterService;
|
private ITenantAgentInviteRegisterService tenantAgentInviteRegisterService;
|
||||||
|
@Autowired
|
||||||
|
private ITenantAgentInviteRegisterBiz tenantAgentInviteRegisterBiz;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ITenantAgentInviteService tenantAgentInviteService;
|
private ITenantAgentInviteService tenantAgentInviteService;
|
||||||
|
@ -76,6 +62,8 @@ public class TenantAgentInviteRegisterController extends BaseController {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ITenantGameQuotaService tenantGameQuotaService;
|
private ITenantGameQuotaService tenantGameQuotaService;
|
||||||
|
@Resource
|
||||||
|
private ITenantGameQuotaBiz tenantGameQuotaBiz;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ITenantAgentCommissionService tenantAgentCommissionService;
|
private ITenantAgentCommissionService tenantAgentCommissionService;
|
||||||
|
@ -94,7 +82,7 @@ public class TenantAgentInviteRegisterController extends BaseController {
|
||||||
public TableDataInfo list(TenantAgentInviteRegisterDTO tenantAgentInviteRegisterDTO) {
|
public TableDataInfo list(TenantAgentInviteRegisterDTO tenantAgentInviteRegisterDTO) {
|
||||||
startPage();
|
startPage();
|
||||||
tenantAgentInviteRegisterDTO.setAgentId(getUserId());
|
tenantAgentInviteRegisterDTO.setAgentId(getUserId());
|
||||||
List<TenantAgentInviteRegisterDTO> list = tenantAgentInviteRegisterService.selectTenantAgentInviteRegisterListDTO(tenantAgentInviteRegisterDTO);
|
List<TenantAgentInviteRegisterDTO> list = tenantAgentInviteRegisterBiz.selectTenantAgentInviteRegisterListDTO(tenantAgentInviteRegisterDTO);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -185,7 +173,7 @@ public class TenantAgentInviteRegisterController extends BaseController {
|
||||||
.build());
|
.build());
|
||||||
//信誉额度
|
//信誉额度
|
||||||
if (result > 0 & !ObjectUtils.isEmpty(tenantAgentInvite.getRealBalance())) {
|
if (result > 0 & !ObjectUtils.isEmpty(tenantAgentInvite.getRealBalance())) {
|
||||||
tenantGameQuotaService.balanceChanges(BalanceChangesDTO.builder()
|
tenantGameQuotaBiz.balanceChanges(BalanceChangesDTO.builder()
|
||||||
.isOut(Boolean.TRUE)
|
.isOut(Boolean.TRUE)
|
||||||
.currencyCode(Constants.USDT)
|
.currencyCode(Constants.USDT)
|
||||||
.tenantKey(tenantAgentInviteRegister.getAccount())
|
.tenantKey(tenantAgentInviteRegister.getAccount())
|
||||||
|
|
|
@ -1,19 +1,16 @@
|
||||||
package com.ff.agent.controller;
|
package com.ff.agent.controller;
|
||||||
|
|
||||||
import java.util.List;
|
import com.ff.base.core.controller.BaseController;
|
||||||
|
import com.ff.base.core.domain.AjaxResult;
|
||||||
import com.ff.base.core.page.PageDomain;
|
|
||||||
import com.ff.common.domain.TenantAgentPlatform;
|
import com.ff.common.domain.TenantAgentPlatform;
|
||||||
import com.ff.common.service.ITenantAgentPlatformService;
|
import com.ff.tenant.service.ITenantAgentPlatformService;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
import com.ff.base.core.controller.BaseController;
|
|
||||||
import com.ff.base.core.domain.AjaxResult;
|
import java.util.List;
|
||||||
import com.ff.agent.domain.TenantAgentInvitePlatform;
|
|
||||||
import com.ff.agent.service.ITenantAgentInvitePlatformService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 平台邀请注册成本管理Controller
|
* 平台邀请注册成本管理Controller
|
||||||
|
@ -23,8 +20,7 @@ import com.ff.agent.service.ITenantAgentInvitePlatformService;
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/agent/platform")
|
@RequestMapping("/agent/platform")
|
||||||
public class TenantAgentPlatformController extends BaseController
|
public class TenantAgentPlatformController extends BaseController {
|
||||||
{
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ITenantAgentPlatformService tenantAgentPlatformService;
|
private ITenantAgentPlatformService tenantAgentPlatformService;
|
||||||
|
|
||||||
|
@ -32,8 +28,7 @@ public class TenantAgentPlatformController extends BaseController
|
||||||
* 查询平台邀请注册成本管理列表
|
* 查询平台邀请注册成本管理列表
|
||||||
*/
|
*/
|
||||||
@GetMapping("/select")
|
@GetMapping("/select")
|
||||||
public AjaxResult select( )
|
public AjaxResult select() {
|
||||||
{
|
|
||||||
PageHelper.orderBy("platform_code desc,currency_code desc");
|
PageHelper.orderBy("platform_code desc,currency_code desc");
|
||||||
List<TenantAgentPlatform> list = tenantAgentPlatformService.selectTenantAgentPlatformList(TenantAgentPlatform.builder().build());
|
List<TenantAgentPlatform> list = tenantAgentPlatformService.selectTenantAgentPlatformList(TenantAgentPlatform.builder().build());
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(list);
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
package com.ff.agent.service;
|
||||||
|
|
||||||
|
import com.ff.agent.dto.TenantAgentInviteRegisterDTO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 代理邀请注册Service接口
|
||||||
|
*
|
||||||
|
* @author shi
|
||||||
|
* @date 2025-02-25
|
||||||
|
*/
|
||||||
|
public interface ITenantAgentInviteBiz {
|
||||||
|
/**
|
||||||
|
* 获取邀请码
|
||||||
|
*
|
||||||
|
* @return {@link String }
|
||||||
|
*/
|
||||||
|
String getInviteCode();
|
||||||
|
}
|
|
@ -19,5 +19,4 @@ public interface ITenantAgentInviteRegisterBiz {
|
||||||
*/
|
*/
|
||||||
List<TenantAgentInviteRegisterDTO> selectTenantAgentInviteRegisterListDTO(TenantAgentInviteRegisterDTO tenantAgentInviteRegisterDTO);
|
List<TenantAgentInviteRegisterDTO> selectTenantAgentInviteRegisterListDTO(TenantAgentInviteRegisterDTO tenantAgentInviteRegisterDTO);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
package com.ff.agent.service.impl;
|
||||||
|
|
||||||
|
import com.ff.agent.domain.TenantAgentInvite;
|
||||||
|
import com.ff.agent.mapper.TenantAgentInviteMapper;
|
||||||
|
import com.ff.agent.service.ITenantAgentInviteBiz;
|
||||||
|
import com.ff.base.utils.NumberUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 代理邀请注册Service接口
|
||||||
|
*
|
||||||
|
* @author shi
|
||||||
|
* @date 2025-02-25
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class TenantAgentInviteBizImpl implements ITenantAgentInviteBiz {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private TenantAgentInviteMapper tenantAgentInviteMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取邀请码
|
||||||
|
*
|
||||||
|
* @return {@link String }
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public synchronized String getInviteCode() {
|
||||||
|
String inviteCode = NumberUtils.generateRandomCode(12);
|
||||||
|
while (!CollectionUtils.isEmpty(tenantAgentInviteMapper.selectTenantAgentInviteList(TenantAgentInvite.builder()
|
||||||
|
.inviteCode(inviteCode)
|
||||||
|
.build()))) {
|
||||||
|
inviteCode = NumberUtils.generateRandomCode(12);
|
||||||
|
}
|
||||||
|
return inviteCode;
|
||||||
|
}
|
||||||
|
}
|
|
@ -15,8 +15,6 @@ import com.ff.base.system.domain.TenantSecretKey;
|
||||||
import com.ff.base.utils.StringUtils;
|
import com.ff.base.utils.StringUtils;
|
||||||
import com.ff.base.utils.bean.BeanUtils;
|
import com.ff.base.utils.bean.BeanUtils;
|
||||||
import com.ff.common.dto.GameBalanceExchange;
|
import com.ff.common.dto.GameBalanceExchange;
|
||||||
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.*;
|
import com.ff.game.api.request.*;
|
||||||
|
@ -25,6 +23,8 @@ import com.ff.game.dto.GameBettingDetailsDTO;
|
||||||
import com.ff.game.service.*;
|
import com.ff.game.service.*;
|
||||||
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 com.ff.tenant.service.ITenantGameQuotaBiz;
|
||||||
|
import com.ff.tenant.service.ITenantGameQuotaService;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
@ -65,6 +65,8 @@ public class ApiGameController extends BaseController {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IGameService gameService;
|
private IGameService gameService;
|
||||||
|
@Resource
|
||||||
|
private IGameBiz gameBiz;
|
||||||
|
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
|
@ -75,6 +77,8 @@ public class ApiGameController extends BaseController {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ITenantGameQuotaService tenantGameQuotaService;
|
private ITenantGameQuotaService tenantGameQuotaService;
|
||||||
|
@Resource
|
||||||
|
private ITenantGameQuotaBiz tenantGameQuotaBiz;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IGameBettingDetailsService gameBettingDetailsService;
|
private IGameBettingDetailsService gameBettingDetailsService;
|
||||||
|
@ -88,6 +92,9 @@ public class ApiGameController extends BaseController {
|
||||||
@Qualifier("threadPoolTaskExecutor")
|
@Qualifier("threadPoolTaskExecutor")
|
||||||
private ThreadPoolTaskExecutor threadPoolTaskExecutor;
|
private ThreadPoolTaskExecutor threadPoolTaskExecutor;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IPlatformBiz platformBiz;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IPlatformService platformService;
|
private IPlatformService platformService;
|
||||||
|
|
||||||
|
@ -98,9 +105,9 @@ public class ApiGameController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@PostMapping("/list")
|
@PostMapping("/list")
|
||||||
public AjaxResult list() {
|
public AjaxResult list() {
|
||||||
List<GameResponse> gameResponses = gameService.selectGameResponseList();
|
List<GameResponse> gameResponses = gameBiz.selectGameResponseList();
|
||||||
for (GameResponse gameResponse : gameResponses) {
|
for (GameResponse gameResponse : gameResponses) {
|
||||||
Platform platform = platformService.get(gameResponse.getPlatformCode());
|
Platform platform = platformBiz.get(gameResponse.getPlatformCode());
|
||||||
if (null == platform) {
|
if (null == platform) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -125,7 +132,7 @@ public class ApiGameController extends BaseController {
|
||||||
Game game = gameService.selectGameByGameId(loginRequest.getGameId());
|
Game game = gameService.selectGameByGameId(loginRequest.getGameId());
|
||||||
ApiException.notNull(game, ErrorCode.GAME_NOT_EXIST.getCode());
|
ApiException.notNull(game, ErrorCode.GAME_NOT_EXIST.getCode());
|
||||||
|
|
||||||
Platform platform = platformService.get(game.getPlatformCode());
|
Platform platform = platformBiz.get(game.getPlatformCode());
|
||||||
ApiException.notNull(platform, ErrorCode.PLATFORM_NOT_EXIST.getCode());
|
ApiException.notNull(platform, ErrorCode.PLATFORM_NOT_EXIST.getCode());
|
||||||
IGamesService iGamesService = gamesService.get(platform.getPlatformCode() + Constants.SERVICE);
|
IGamesService iGamesService = gamesService.get(platform.getPlatformCode() + Constants.SERVICE);
|
||||||
ApiException.notNull(iGamesService, ErrorCode.PLATFORM_NOT_EXIST.getCode());
|
ApiException.notNull(iGamesService, ErrorCode.PLATFORM_NOT_EXIST.getCode());
|
||||||
|
@ -191,7 +198,7 @@ public class ApiGameController extends BaseController {
|
||||||
TenantSecretKey tenantSecretKey = keyConfig.get();
|
TenantSecretKey tenantSecretKey = keyConfig.get();
|
||||||
|
|
||||||
|
|
||||||
Platform platform = platformService.get(gameExchangeBalanceRequest.getPlatformCode());
|
Platform platform = platformBiz.get(gameExchangeBalanceRequest.getPlatformCode());
|
||||||
ApiException.notNull(platform, ErrorCode.PLATFORM_NOT_EXIST.getCode());
|
ApiException.notNull(platform, ErrorCode.PLATFORM_NOT_EXIST.getCode());
|
||||||
|
|
||||||
String targetCurrency = platform.getCurrencyInfo().get(gameExchangeBalanceRequest.getCurrencyCode());
|
String targetCurrency = platform.getCurrencyInfo().get(gameExchangeBalanceRequest.getCurrencyCode());
|
||||||
|
@ -210,7 +217,7 @@ public class ApiGameController extends BaseController {
|
||||||
BigDecimal quota = BigDecimal.ZERO;
|
BigDecimal quota = BigDecimal.ZERO;
|
||||||
//如果是扣钱提前扣
|
//如果是扣钱提前扣
|
||||||
if (TransferType.GAMES.getCode().equals(gameExchangeBalanceRequest.getTransferType())) {
|
if (TransferType.GAMES.getCode().equals(gameExchangeBalanceRequest.getTransferType())) {
|
||||||
quota = tenantGameQuotaService.gameBalanceExchange(GameBalanceExchange.builder()
|
quota = tenantGameQuotaBiz.gameBalanceExchange(GameBalanceExchange.builder()
|
||||||
.platformCode(gameExchangeBalanceRequest.getPlatformCode())
|
.platformCode(gameExchangeBalanceRequest.getPlatformCode())
|
||||||
.sourceId(gameExchangeBalanceRequest.getOrderId())
|
.sourceId(gameExchangeBalanceRequest.getOrderId())
|
||||||
.currencyCode(gameExchangeBalanceRequest.getCurrencyCode())
|
.currencyCode(gameExchangeBalanceRequest.getCurrencyCode())
|
||||||
|
@ -296,7 +303,7 @@ public class ApiGameController extends BaseController {
|
||||||
// .platformCode(gameCreateFreeSpinRequest.getPlatformCode())
|
// .platformCode(gameCreateFreeSpinRequest.getPlatformCode())
|
||||||
// .systemCurrency(gameCreateFreeSpinRequest.getCurrencyCode()).build());
|
// .systemCurrency(gameCreateFreeSpinRequest.getCurrencyCode()).build());
|
||||||
// ApiException.notNull(gameSecretKey, ErrorCode.CURRENCY_NOT_EXIST.getCode());
|
// ApiException.notNull(gameSecretKey, ErrorCode.CURRENCY_NOT_EXIST.getCode());
|
||||||
Platform platform = platformService.get(gameCreateFreeSpinRequest.getPlatformCode());
|
Platform platform = platformBiz.get(gameCreateFreeSpinRequest.getPlatformCode());
|
||||||
ApiException.notNull(platform, ErrorCode.PLATFORM_NOT_EXIST.getCode());
|
ApiException.notNull(platform, ErrorCode.PLATFORM_NOT_EXIST.getCode());
|
||||||
|
|
||||||
String targetCurrency = platform.getCurrencyInfo().get(gameCreateFreeSpinRequest.getCurrencyCode());
|
String targetCurrency = platform.getCurrencyInfo().get(gameCreateFreeSpinRequest.getCurrencyCode());
|
||||||
|
@ -383,7 +390,7 @@ public class ApiGameController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@PostMapping("/get/detail")
|
@PostMapping("/get/detail")
|
||||||
public AjaxResult getDetail(@Validated @RequestBody GameGetDetailRequest gameGetDetailRequest) {
|
public AjaxResult getDetail(@Validated @RequestBody GameGetDetailRequest gameGetDetailRequest) {
|
||||||
Platform platform = platformService.get(gameGetDetailRequest.getPlatformCode());
|
Platform platform = platformBiz.get(gameGetDetailRequest.getPlatformCode());
|
||||||
ApiException.notNull(platform, ErrorCode.PLATFORM_NOT_EXIST.getCode());
|
ApiException.notNull(platform, ErrorCode.PLATFORM_NOT_EXIST.getCode());
|
||||||
|
|
||||||
String targetCurrency = platform.getCurrencyInfo().get(gameGetDetailRequest.getCurrencyCode());
|
String targetCurrency = platform.getCurrencyInfo().get(gameGetDetailRequest.getCurrencyCode());
|
||||||
|
@ -447,7 +454,7 @@ public class ApiGameController extends BaseController {
|
||||||
// .systemCurrency(gameKickMemeberRequest.getCurrencyCode()).build());
|
// .systemCurrency(gameKickMemeberRequest.getCurrencyCode()).build());
|
||||||
// ApiException.notNull(gameSecretKey, ErrorCode.CURRENCY_NOT_EXIST.getCode());
|
// ApiException.notNull(gameSecretKey, ErrorCode.CURRENCY_NOT_EXIST.getCode());
|
||||||
|
|
||||||
Platform platform = platformService.get(gameKickMemeberRequest.getPlatformCode());
|
Platform platform = platformBiz.get(gameKickMemeberRequest.getPlatformCode());
|
||||||
ApiException.notNull(platform, ErrorCode.PLATFORM_NOT_EXIST.getCode());
|
ApiException.notNull(platform, ErrorCode.PLATFORM_NOT_EXIST.getCode());
|
||||||
|
|
||||||
String targetCurrency = platform.getCurrencyInfo().get(gameKickMemeberRequest.getCurrencyCode());
|
String targetCurrency = platform.getCurrencyInfo().get(gameKickMemeberRequest.getCurrencyCode());
|
||||||
|
@ -490,7 +497,7 @@ public class ApiGameController extends BaseController {
|
||||||
// .systemCurrency(gameKickMemeberAllRequest.getCurrencyCode()).build());
|
// .systemCurrency(gameKickMemeberAllRequest.getCurrencyCode()).build());
|
||||||
//
|
//
|
||||||
// ApiException.notNull(gameSecretKey, ErrorCode.CURRENCY_NOT_EXIST.getCode());
|
// ApiException.notNull(gameSecretKey, ErrorCode.CURRENCY_NOT_EXIST.getCode());
|
||||||
Platform platform = platformService.get(gameKickMemeberAllRequest.getPlatformCode());
|
Platform platform = platformBiz.get(gameKickMemeberAllRequest.getPlatformCode());
|
||||||
ApiException.notNull(platform, ErrorCode.PLATFORM_NOT_EXIST.getCode());
|
ApiException.notNull(platform, ErrorCode.PLATFORM_NOT_EXIST.getCode());
|
||||||
|
|
||||||
String targetCurrency = platform.getCurrencyInfo().get(gameKickMemeberAllRequest.getCurrencyCode());
|
String targetCurrency = platform.getCurrencyInfo().get(gameKickMemeberAllRequest.getCurrencyCode());
|
||||||
|
@ -576,7 +583,7 @@ public class ApiGameController extends BaseController {
|
||||||
// .systemCurrency(gameGetFreeSpinDashflowRequest.getCurrencyCode()).build());
|
// .systemCurrency(gameGetFreeSpinDashflowRequest.getCurrencyCode()).build());
|
||||||
// ApiException.notNull(gameSecretKey, ErrorCode.CURRENCY_NOT_EXIST.getCode());
|
// ApiException.notNull(gameSecretKey, ErrorCode.CURRENCY_NOT_EXIST.getCode());
|
||||||
|
|
||||||
Platform platform = platformService.get(request.getPlatformCode());
|
Platform platform = platformBiz.get(request.getPlatformCode());
|
||||||
ApiException.notNull(platform, ErrorCode.PLATFORM_NOT_EXIST.getCode());
|
ApiException.notNull(platform, ErrorCode.PLATFORM_NOT_EXIST.getCode());
|
||||||
|
|
||||||
String targetCurrency = platform.getCurrencyInfo().get(request.getCurrencyCode());
|
String targetCurrency = platform.getCurrencyInfo().get(request.getCurrencyCode());
|
||||||
|
@ -756,7 +763,7 @@ public class ApiGameController extends BaseController {
|
||||||
//GamePlatform gamePlatform = gamePlatformService.selectGamePlatformById(game.getPlatformId());
|
//GamePlatform gamePlatform = gamePlatformService.selectGamePlatformById(game.getPlatformId());
|
||||||
//ApiException.notNull(gamePlatform, ErrorCode.PLATFORM_NOT_EXIST.getCode());
|
//ApiException.notNull(gamePlatform, ErrorCode.PLATFORM_NOT_EXIST.getCode());
|
||||||
|
|
||||||
Platform platform = platformService.get(game.getPlatformCode());
|
Platform platform = platformBiz.get(game.getPlatformCode());
|
||||||
ApiException.notNull(platform, ErrorCode.PLATFORM_NOT_EXIST.getCode());
|
ApiException.notNull(platform, ErrorCode.PLATFORM_NOT_EXIST.getCode());
|
||||||
|
|
||||||
IGamesService iGamesService = gamesService.get(platform.getPlatformCode() + Constants.SERVICE);
|
IGamesService iGamesService = gamesService.get(platform.getPlatformCode() + Constants.SERVICE);
|
||||||
|
|
|
@ -23,8 +23,10 @@ import com.ff.game.api.request.MemberInfoRequestDTO;
|
||||||
import com.ff.game.api.request.MemberInfoResponseDTO;
|
import com.ff.game.api.request.MemberInfoResponseDTO;
|
||||||
import com.ff.game.domain.KeyInfo;
|
import com.ff.game.domain.KeyInfo;
|
||||||
import com.ff.game.domain.Platform;
|
import com.ff.game.domain.Platform;
|
||||||
|
import com.ff.game.service.IPlatformBiz;
|
||||||
import com.ff.game.service.IPlatformService;
|
import com.ff.game.service.IPlatformService;
|
||||||
import com.ff.member.domain.Member;
|
import com.ff.member.domain.Member;
|
||||||
|
import com.ff.member.service.IMemberBiz;
|
||||||
import com.ff.member.service.IMemberService;
|
import com.ff.member.service.IMemberService;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
@ -77,6 +79,10 @@ public class ApiMemberController extends BaseController {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IPlatformService platformService;
|
private IPlatformService platformService;
|
||||||
|
@Autowired
|
||||||
|
private IPlatformBiz platformBiz;
|
||||||
|
@Autowired
|
||||||
|
private IMemberBiz memberBiz;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建成员
|
* 创建成员
|
||||||
|
@ -93,7 +99,7 @@ public class ApiMemberController extends BaseController {
|
||||||
|
|
||||||
TenantSecretKey tenantSecretKey = keyConfig.get();
|
TenantSecretKey tenantSecretKey = keyConfig.get();
|
||||||
|
|
||||||
Platform platform = platformService.get(memberCreateApiRequest.getPlatformCode());
|
Platform platform = platformBiz.get(memberCreateApiRequest.getPlatformCode());
|
||||||
ApiException.notNull(platform, ErrorCode.CURRENCY_NOT_EXIST.getCode());
|
ApiException.notNull(platform, ErrorCode.CURRENCY_NOT_EXIST.getCode());
|
||||||
String targetCurrency = platform.getCurrencyInfo().get(memberCreateApiRequest.getCurrencyCode());
|
String targetCurrency = platform.getCurrencyInfo().get(memberCreateApiRequest.getCurrencyCode());
|
||||||
ApiException.notNull(targetCurrency, ErrorCode.CURRENCY_NOT_EXIST.getCode());
|
ApiException.notNull(targetCurrency, ErrorCode.CURRENCY_NOT_EXIST.getCode());
|
||||||
|
@ -109,7 +115,7 @@ public class ApiMemberController extends BaseController {
|
||||||
}
|
}
|
||||||
ApiException.notNull(keyInfo, ErrorCode.CURRENCY_NOT_EXIST.getCode());
|
ApiException.notNull(keyInfo, ErrorCode.CURRENCY_NOT_EXIST.getCode());
|
||||||
|
|
||||||
String gameAccount =memberService.getMemberGameAccount(memberCreateApiRequest.getPlatformCode(), tenantSecretKey.getTenantSn());
|
String gameAccount = memberBiz.getMemberGameAccount(memberCreateApiRequest.getPlatformCode(), tenantSecretKey.getTenantSn());
|
||||||
|
|
||||||
|
|
||||||
// 获取用户信息
|
// 获取用户信息
|
||||||
|
@ -146,8 +152,6 @@ public class ApiMemberController extends BaseController {
|
||||||
Assert.isTrue(result, "建立游戏账号失败");
|
Assert.isTrue(result, "建立游戏账号失败");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return toAjax(Boolean.TRUE);
|
return toAjax(Boolean.TRUE);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -165,7 +169,7 @@ public class ApiMemberController extends BaseController {
|
||||||
ApiException.notNull(iGamesService, ErrorCode.PLATFORM_NOT_EXIST.getCode());
|
ApiException.notNull(iGamesService, ErrorCode.PLATFORM_NOT_EXIST.getCode());
|
||||||
|
|
||||||
|
|
||||||
Platform platform = platformService.get(request.getPlatformCode());
|
Platform platform = platformBiz.get(request.getPlatformCode());
|
||||||
ApiException.notNull(platform, ErrorCode.PLATFORM_NOT_EXIST.getCode());
|
ApiException.notNull(platform, ErrorCode.PLATFORM_NOT_EXIST.getCode());
|
||||||
|
|
||||||
String targetCurrency = platform.getCurrencyInfo().get(request.getCurrencyCode());
|
String targetCurrency = platform.getCurrencyInfo().get(request.getCurrencyCode());
|
||||||
|
@ -220,7 +224,7 @@ public class ApiMemberController extends BaseController {
|
||||||
List<Key> keys = new ArrayList<>();
|
List<Key> keys = new ArrayList<>();
|
||||||
for (GamePlatforms platformEnum : GamePlatforms.values()) {
|
for (GamePlatforms platformEnum : GamePlatforms.values()) {
|
||||||
|
|
||||||
Platform platform = platformService.get(platformEnum.getCode());
|
Platform platform = platformBiz.get(platformEnum.getCode());
|
||||||
String targetCurrency = platform.getCurrencyInfo().get(memberInfoAllApiRequest.getCurrencyCode());
|
String targetCurrency = platform.getCurrencyInfo().get(memberInfoAllApiRequest.getCurrencyCode());
|
||||||
if (StringUtils.isEmpty(targetCurrency)) {
|
if (StringUtils.isEmpty(targetCurrency)) {
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -6,11 +6,11 @@ import com.ff.api.response.TenantInfoResponse;
|
||||||
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.QuotaType;
|
import com.ff.base.enums.QuotaType;
|
||||||
|
import com.ff.base.system.domain.TenantSecretKey;
|
||||||
import com.ff.base.utils.bean.BeanUtils;
|
import com.ff.base.utils.bean.BeanUtils;
|
||||||
import com.ff.common.domain.TenantGameQuota;
|
import com.ff.common.domain.TenantGameQuota;
|
||||||
import com.ff.base.system.domain.TenantSecretKey;
|
|
||||||
import com.ff.common.service.ITenantGameQuotaService;
|
|
||||||
import com.ff.config.KeyConfig;
|
import com.ff.config.KeyConfig;
|
||||||
|
import com.ff.tenant.service.ITenantGameQuotaService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
@ -30,7 +30,6 @@ import javax.annotation.Resource;
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class ApiTenantController extends BaseController {
|
public class ApiTenantController extends BaseController {
|
||||||
|
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ITenantGameQuotaService tenantGameQuotaService;
|
private ITenantGameQuotaService tenantGameQuotaService;
|
||||||
@Resource
|
@Resource
|
||||||
|
@ -45,8 +44,8 @@ public class ApiTenantController extends BaseController {
|
||||||
public AjaxResult info() {
|
public AjaxResult info() {
|
||||||
TenantSecretKey tenantSecretKey = keyConfig.get();
|
TenantSecretKey tenantSecretKey = keyConfig.get();
|
||||||
TenantGameQuota tenantGameQuota = tenantGameQuotaService.selectTenantGameQuotaByTenantKey(tenantSecretKey.getTenantKey(), QuotaType.BALANCE.getCode());
|
TenantGameQuota tenantGameQuota = tenantGameQuotaService.selectTenantGameQuotaByTenantKey(tenantSecretKey.getTenantKey(), QuotaType.BALANCE.getCode());
|
||||||
TenantInfoResponse tenantInfoResponse= new TenantInfoResponse();
|
TenantInfoResponse tenantInfoResponse = new TenantInfoResponse();
|
||||||
BeanUtils.copyProperties(tenantGameQuota,tenantInfoResponse);
|
BeanUtils.copyProperties(tenantGameQuota, tenantInfoResponse);
|
||||||
return AjaxResult.success(tenantInfoResponse);
|
return AjaxResult.success(tenantInfoResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,25 +1,19 @@
|
||||||
package com.ff.common.controller;
|
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.annotation.Log;
|
||||||
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.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;
|
import com.ff.base.core.page.TableDataInfo;
|
||||||
|
import com.ff.base.enums.BusinessType;
|
||||||
|
import com.ff.base.utils.poi.ExcelUtil;
|
||||||
|
import com.ff.common.domain.TenantGameQuota;
|
||||||
|
import com.ff.tenant.service.ITenantGameQuotaService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 租户游戏配额Controller
|
* 租户游戏配额Controller
|
||||||
|
@ -29,8 +23,7 @@ import com.ff.base.core.page.TableDataInfo;
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/common/quota")
|
@RequestMapping("/common/quota")
|
||||||
public class TenantGameQuotaController extends BaseController
|
public class TenantGameQuotaController extends BaseController {
|
||||||
{
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ITenantGameQuotaService tenantGameQuotaService;
|
private ITenantGameQuotaService tenantGameQuotaService;
|
||||||
|
|
||||||
|
@ -39,8 +32,7 @@ public class TenantGameQuotaController extends BaseController
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('common:quota:list')")
|
@PreAuthorize("@ss.hasPermi('common:quota:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(TenantGameQuota tenantGameQuota)
|
public TableDataInfo list(TenantGameQuota tenantGameQuota) {
|
||||||
{
|
|
||||||
startPage();
|
startPage();
|
||||||
List<TenantGameQuota> list = tenantGameQuotaService.selectTenantGameQuotaList(tenantGameQuota);
|
List<TenantGameQuota> list = tenantGameQuotaService.selectTenantGameQuotaList(tenantGameQuota);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
|
@ -52,8 +44,7 @@ public class TenantGameQuotaController extends BaseController
|
||||||
@PreAuthorize("@ss.hasPermi('common:quota:export')")
|
@PreAuthorize("@ss.hasPermi('common:quota:export')")
|
||||||
@Log(title = "租户游戏配额", businessType = BusinessType.EXPORT)
|
@Log(title = "租户游戏配额", businessType = BusinessType.EXPORT)
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, TenantGameQuota tenantGameQuota)
|
public void export(HttpServletResponse response, TenantGameQuota tenantGameQuota) {
|
||||||
{
|
|
||||||
List<TenantGameQuota> list = tenantGameQuotaService.selectTenantGameQuotaList(tenantGameQuota);
|
List<TenantGameQuota> list = tenantGameQuotaService.selectTenantGameQuotaList(tenantGameQuota);
|
||||||
ExcelUtil<TenantGameQuota> util = new ExcelUtil<TenantGameQuota>(TenantGameQuota.class);
|
ExcelUtil<TenantGameQuota> util = new ExcelUtil<TenantGameQuota>(TenantGameQuota.class);
|
||||||
util.exportExcel(response, list, "租户游戏配额数据");
|
util.exportExcel(response, list, "租户游戏配额数据");
|
||||||
|
@ -64,8 +55,7 @@ public class TenantGameQuotaController extends BaseController
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('common:quota:query')")
|
@PreAuthorize("@ss.hasPermi('common:quota:query')")
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||||
{
|
|
||||||
return success(tenantGameQuotaService.selectTenantGameQuotaById(id));
|
return success(tenantGameQuotaService.selectTenantGameQuotaById(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,8 +65,7 @@ public class TenantGameQuotaController extends BaseController
|
||||||
@PreAuthorize("@ss.hasPermi('common:quota:add')")
|
@PreAuthorize("@ss.hasPermi('common:quota:add')")
|
||||||
@Log(title = "租户游戏配额", businessType = BusinessType.INSERT)
|
@Log(title = "租户游戏配额", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody TenantGameQuota tenantGameQuota)
|
public AjaxResult add(@RequestBody TenantGameQuota tenantGameQuota) {
|
||||||
{
|
|
||||||
return toAjax(tenantGameQuotaService.insertTenantGameQuota(tenantGameQuota));
|
return toAjax(tenantGameQuotaService.insertTenantGameQuota(tenantGameQuota));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,8 +75,7 @@ public class TenantGameQuotaController extends BaseController
|
||||||
@PreAuthorize("@ss.hasPermi('common:quota:edit')")
|
@PreAuthorize("@ss.hasPermi('common:quota:edit')")
|
||||||
@Log(title = "租户游戏配额", businessType = BusinessType.UPDATE)
|
@Log(title = "租户游戏配额", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody TenantGameQuota tenantGameQuota)
|
public AjaxResult edit(@RequestBody TenantGameQuota tenantGameQuota) {
|
||||||
{
|
|
||||||
return toAjax(tenantGameQuotaService.updateTenantGameQuota(tenantGameQuota));
|
return toAjax(tenantGameQuotaService.updateTenantGameQuota(tenantGameQuota));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,8 +85,7 @@ public class TenantGameQuotaController extends BaseController
|
||||||
@PreAuthorize("@ss.hasPermi('common:quota:remove')")
|
@PreAuthorize("@ss.hasPermi('common:quota:remove')")
|
||||||
@Log(title = "租户游戏配额", businessType = BusinessType.DELETE)
|
@Log(title = "租户游戏配额", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public AjaxResult remove(@PathVariable Long[] ids)
|
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||||
{
|
|
||||||
return toAjax(tenantGameQuotaService.deleteTenantGameQuotaByIds(ids));
|
return toAjax(tenantGameQuotaService.deleteTenantGameQuotaByIds(ids));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,25 +1,19 @@
|
||||||
package com.ff.common.controller;
|
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.annotation.Log;
|
||||||
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.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;
|
import com.ff.base.core.page.TableDataInfo;
|
||||||
|
import com.ff.base.enums.BusinessType;
|
||||||
|
import com.ff.base.utils.poi.ExcelUtil;
|
||||||
|
import com.ff.common.domain.TenantGameQuotaFlow;
|
||||||
|
import com.ff.tenant.service.ITenantGameQuotaFlowService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 租户游戏额度流水Controller
|
* 租户游戏额度流水Controller
|
||||||
|
@ -29,8 +23,7 @@ import com.ff.base.core.page.TableDataInfo;
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/common/flow")
|
@RequestMapping("/common/flow")
|
||||||
public class TenantGameQuotaFlowController extends BaseController
|
public class TenantGameQuotaFlowController extends BaseController {
|
||||||
{
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ITenantGameQuotaFlowService tenantGameQuotaFlowService;
|
private ITenantGameQuotaFlowService tenantGameQuotaFlowService;
|
||||||
|
|
||||||
|
@ -39,8 +32,7 @@ public class TenantGameQuotaFlowController extends BaseController
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('common:flow:list')")
|
@PreAuthorize("@ss.hasPermi('common:flow:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(TenantGameQuotaFlow tenantGameQuotaFlow)
|
public TableDataInfo list(TenantGameQuotaFlow tenantGameQuotaFlow) {
|
||||||
{
|
|
||||||
startPage();
|
startPage();
|
||||||
List<TenantGameQuotaFlow> list = tenantGameQuotaFlowService.selectTenantGameQuotaFlowList(tenantGameQuotaFlow);
|
List<TenantGameQuotaFlow> list = tenantGameQuotaFlowService.selectTenantGameQuotaFlowList(tenantGameQuotaFlow);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
|
@ -52,8 +44,7 @@ public class TenantGameQuotaFlowController extends BaseController
|
||||||
@PreAuthorize("@ss.hasPermi('common:flow:export')")
|
@PreAuthorize("@ss.hasPermi('common:flow:export')")
|
||||||
@Log(title = "租户游戏额度流水", businessType = BusinessType.EXPORT)
|
@Log(title = "租户游戏额度流水", businessType = BusinessType.EXPORT)
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, TenantGameQuotaFlow tenantGameQuotaFlow)
|
public void export(HttpServletResponse response, TenantGameQuotaFlow tenantGameQuotaFlow) {
|
||||||
{
|
|
||||||
List<TenantGameQuotaFlow> list = tenantGameQuotaFlowService.selectTenantGameQuotaFlowList(tenantGameQuotaFlow);
|
List<TenantGameQuotaFlow> list = tenantGameQuotaFlowService.selectTenantGameQuotaFlowList(tenantGameQuotaFlow);
|
||||||
ExcelUtil<TenantGameQuotaFlow> util = new ExcelUtil<TenantGameQuotaFlow>(TenantGameQuotaFlow.class);
|
ExcelUtil<TenantGameQuotaFlow> util = new ExcelUtil<TenantGameQuotaFlow>(TenantGameQuotaFlow.class);
|
||||||
util.exportExcel(response, list, "租户游戏额度流水数据");
|
util.exportExcel(response, list, "租户游戏额度流水数据");
|
||||||
|
@ -64,8 +55,7 @@ public class TenantGameQuotaFlowController extends BaseController
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('common:flow:query')")
|
@PreAuthorize("@ss.hasPermi('common:flow:query')")
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||||
{
|
|
||||||
return success(tenantGameQuotaFlowService.selectTenantGameQuotaFlowById(id));
|
return success(tenantGameQuotaFlowService.selectTenantGameQuotaFlowById(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,8 +65,7 @@ public class TenantGameQuotaFlowController extends BaseController
|
||||||
@PreAuthorize("@ss.hasPermi('common:flow:add')")
|
@PreAuthorize("@ss.hasPermi('common:flow:add')")
|
||||||
@Log(title = "租户游戏额度流水", businessType = BusinessType.INSERT)
|
@Log(title = "租户游戏额度流水", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody TenantGameQuotaFlow tenantGameQuotaFlow)
|
public AjaxResult add(@RequestBody TenantGameQuotaFlow tenantGameQuotaFlow) {
|
||||||
{
|
|
||||||
return toAjax(tenantGameQuotaFlowService.insertTenantGameQuotaFlow(tenantGameQuotaFlow));
|
return toAjax(tenantGameQuotaFlowService.insertTenantGameQuotaFlow(tenantGameQuotaFlow));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,8 +75,7 @@ public class TenantGameQuotaFlowController extends BaseController
|
||||||
@PreAuthorize("@ss.hasPermi('common:flow:edit')")
|
@PreAuthorize("@ss.hasPermi('common:flow:edit')")
|
||||||
@Log(title = "租户游戏额度流水", businessType = BusinessType.UPDATE)
|
@Log(title = "租户游戏额度流水", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody TenantGameQuotaFlow tenantGameQuotaFlow)
|
public AjaxResult edit(@RequestBody TenantGameQuotaFlow tenantGameQuotaFlow) {
|
||||||
{
|
|
||||||
return toAjax(tenantGameQuotaFlowService.updateTenantGameQuotaFlow(tenantGameQuotaFlow));
|
return toAjax(tenantGameQuotaFlowService.updateTenantGameQuotaFlow(tenantGameQuotaFlow));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,8 +85,7 @@ public class TenantGameQuotaFlowController extends BaseController
|
||||||
@PreAuthorize("@ss.hasPermi('common:flow:remove')")
|
@PreAuthorize("@ss.hasPermi('common:flow:remove')")
|
||||||
@Log(title = "租户游戏额度流水", businessType = BusinessType.DELETE)
|
@Log(title = "租户游戏额度流水", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public AjaxResult remove(@PathVariable Long[] ids)
|
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||||
{
|
|
||||||
return toAjax(tenantGameQuotaFlowService.deleteTenantGameQuotaFlowByIds(ids));
|
return toAjax(tenantGameQuotaFlowService.deleteTenantGameQuotaFlowByIds(ids));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,25 +1,19 @@
|
||||||
package com.ff.common.controller;
|
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.annotation.Log;
|
||||||
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.BusinessType;
|
|
||||||
import com.ff.common.domain.TenantQuotaExchange;
|
|
||||||
import com.ff.common.service.ITenantQuotaExchangeService;
|
|
||||||
import com.ff.base.utils.poi.ExcelUtil;
|
|
||||||
import com.ff.base.core.page.TableDataInfo;
|
import com.ff.base.core.page.TableDataInfo;
|
||||||
|
import com.ff.base.enums.BusinessType;
|
||||||
|
import com.ff.base.utils.poi.ExcelUtil;
|
||||||
|
import com.ff.common.domain.TenantQuotaExchange;
|
||||||
|
import com.ff.tenant.service.ITenantQuotaExchangeService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 币种汇率Controller
|
* 币种汇率Controller
|
||||||
|
@ -29,8 +23,7 @@ import com.ff.base.core.page.TableDataInfo;
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/common/exchange")
|
@RequestMapping("/common/exchange")
|
||||||
public class TenantQuotaExchangeController extends BaseController
|
public class TenantQuotaExchangeController extends BaseController {
|
||||||
{
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ITenantQuotaExchangeService tenantQuotaExchangeService;
|
private ITenantQuotaExchangeService tenantQuotaExchangeService;
|
||||||
|
|
||||||
|
@ -39,8 +32,7 @@ public class TenantQuotaExchangeController extends BaseController
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('common:exchange:list')")
|
@PreAuthorize("@ss.hasPermi('common:exchange:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(TenantQuotaExchange tenantQuotaExchange)
|
public TableDataInfo list(TenantQuotaExchange tenantQuotaExchange) {
|
||||||
{
|
|
||||||
startPage();
|
startPage();
|
||||||
List<TenantQuotaExchange> list = tenantQuotaExchangeService.selectTenantQuotaExchangeList(tenantQuotaExchange);
|
List<TenantQuotaExchange> list = tenantQuotaExchangeService.selectTenantQuotaExchangeList(tenantQuotaExchange);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
|
@ -52,8 +44,7 @@ public class TenantQuotaExchangeController extends BaseController
|
||||||
@PreAuthorize("@ss.hasPermi('common:exchange:export')")
|
@PreAuthorize("@ss.hasPermi('common:exchange:export')")
|
||||||
@Log(title = "币种汇率", businessType = BusinessType.EXPORT)
|
@Log(title = "币种汇率", businessType = BusinessType.EXPORT)
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, TenantQuotaExchange tenantQuotaExchange)
|
public void export(HttpServletResponse response, TenantQuotaExchange tenantQuotaExchange) {
|
||||||
{
|
|
||||||
List<TenantQuotaExchange> list = tenantQuotaExchangeService.selectTenantQuotaExchangeList(tenantQuotaExchange);
|
List<TenantQuotaExchange> list = tenantQuotaExchangeService.selectTenantQuotaExchangeList(tenantQuotaExchange);
|
||||||
ExcelUtil<TenantQuotaExchange> util = new ExcelUtil<TenantQuotaExchange>(TenantQuotaExchange.class);
|
ExcelUtil<TenantQuotaExchange> util = new ExcelUtil<TenantQuotaExchange>(TenantQuotaExchange.class);
|
||||||
util.exportExcel(response, list, "币种汇率数据");
|
util.exportExcel(response, list, "币种汇率数据");
|
||||||
|
@ -64,8 +55,7 @@ public class TenantQuotaExchangeController extends BaseController
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('common:exchange:query')")
|
@PreAuthorize("@ss.hasPermi('common:exchange:query')")
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||||
{
|
|
||||||
return success(tenantQuotaExchangeService.selectTenantQuotaExchangeById(id));
|
return success(tenantQuotaExchangeService.selectTenantQuotaExchangeById(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,8 +65,7 @@ public class TenantQuotaExchangeController extends BaseController
|
||||||
@PreAuthorize("@ss.hasPermi('common:exchange:add')")
|
@PreAuthorize("@ss.hasPermi('common:exchange:add')")
|
||||||
@Log(title = "币种汇率", businessType = BusinessType.INSERT)
|
@Log(title = "币种汇率", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody TenantQuotaExchange tenantQuotaExchange)
|
public AjaxResult add(@RequestBody TenantQuotaExchange tenantQuotaExchange) {
|
||||||
{
|
|
||||||
return toAjax(tenantQuotaExchangeService.insertTenantQuotaExchange(tenantQuotaExchange));
|
return toAjax(tenantQuotaExchangeService.insertTenantQuotaExchange(tenantQuotaExchange));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,8 +75,7 @@ public class TenantQuotaExchangeController extends BaseController
|
||||||
@PreAuthorize("@ss.hasPermi('common:exchange:edit')")
|
@PreAuthorize("@ss.hasPermi('common:exchange:edit')")
|
||||||
@Log(title = "币种汇率", businessType = BusinessType.UPDATE)
|
@Log(title = "币种汇率", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody TenantQuotaExchange tenantQuotaExchange)
|
public AjaxResult edit(@RequestBody TenantQuotaExchange tenantQuotaExchange) {
|
||||||
{
|
|
||||||
return toAjax(tenantQuotaExchangeService.updateTenantQuotaExchange(tenantQuotaExchange));
|
return toAjax(tenantQuotaExchangeService.updateTenantQuotaExchange(tenantQuotaExchange));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,8 +85,7 @@ public class TenantQuotaExchangeController extends BaseController
|
||||||
@PreAuthorize("@ss.hasPermi('common:exchange:remove')")
|
@PreAuthorize("@ss.hasPermi('common:exchange:remove')")
|
||||||
@Log(title = "币种汇率", businessType = BusinessType.DELETE)
|
@Log(title = "币种汇率", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public AjaxResult remove(@PathVariable Long[] ids)
|
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||||
{
|
|
||||||
return toAjax(tenantQuotaExchangeService.deleteTenantQuotaExchangeByIds(ids));
|
return toAjax(tenantQuotaExchangeService.deleteTenantQuotaExchangeByIds(ids));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@ import com.ff.base.system.domain.SysDatasource;
|
||||||
import com.ff.base.system.mapper.SysDatasourceMapper;
|
import com.ff.base.system.mapper.SysDatasourceMapper;
|
||||||
import com.ff.base.system.service.ISysConfigService;
|
import com.ff.base.system.service.ISysConfigService;
|
||||||
import com.ff.base.system.service.ISysDictTypeService;
|
import com.ff.base.system.service.ISysDictTypeService;
|
||||||
|
import com.ff.game.service.IPlatformBiz;
|
||||||
import com.ff.game.service.IPlatformService;
|
import com.ff.game.service.IPlatformService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
@ -38,6 +39,10 @@ public class ContentRefreshedEventListener implements ApplicationListener<Contex
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IPlatformService platformService;
|
private IPlatformService platformService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IPlatformBiz platformBiz;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项目加载时运行
|
* 项目加载时运行
|
||||||
*
|
*
|
||||||
|
@ -55,6 +60,6 @@ public class ContentRefreshedEventListener implements ApplicationListener<Contex
|
||||||
sysConfigService.loadingConfigCache();
|
sysConfigService.loadingConfigCache();
|
||||||
sysDictTypeService.loadingDictCache();
|
sysDictTypeService.loadingDictCache();
|
||||||
|
|
||||||
platformService.loadToCache();
|
platformBiz.loadToCache();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ import com.dtflys.forest.callback.AddressSource;
|
||||||
import com.dtflys.forest.http.ForestAddress;
|
import com.dtflys.forest.http.ForestAddress;
|
||||||
import com.dtflys.forest.http.ForestRequest;
|
import com.dtflys.forest.http.ForestRequest;
|
||||||
import com.ff.base.enums.GamePlatforms;
|
import com.ff.base.enums.GamePlatforms;
|
||||||
import com.ff.game.service.IPlatformService;
|
import com.ff.game.service.IPlatformBiz;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
@ -20,11 +20,11 @@ import javax.annotation.Resource;
|
||||||
public class MyAEAddressSource implements AddressSource {
|
public class MyAEAddressSource implements AddressSource {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IPlatformService platformService;
|
private IPlatformBiz platformBiz;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ForestAddress getAddress(ForestRequest request) {
|
public ForestAddress getAddress(ForestRequest request) {
|
||||||
String apiBaseUrl = platformService.get(GamePlatforms.AE.getCode())
|
String apiBaseUrl = platformBiz.get(GamePlatforms.AE.getCode())
|
||||||
.getUrlInfo().getUrl();
|
.getUrlInfo().getUrl();
|
||||||
return new ForestAddress("https", apiBaseUrl, 443, "");
|
return new ForestAddress("https", apiBaseUrl, 443, "");
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,8 +13,6 @@ import com.ff.base.utils.DateUtils;
|
||||||
import com.ff.base.utils.JsonUtil;
|
import com.ff.base.utils.JsonUtil;
|
||||||
import com.ff.base.utils.StringUtils;
|
import com.ff.base.utils.StringUtils;
|
||||||
import com.ff.base.utils.uuid.IdUtils;
|
import com.ff.base.utils.uuid.IdUtils;
|
||||||
import com.ff.common.dto.GameBalanceExchange;
|
|
||||||
import com.ff.common.service.ITenantGameQuotaService;
|
|
||||||
import com.ff.config.KeyConfig;
|
import com.ff.config.KeyConfig;
|
||||||
import com.ff.delay.DelayService;
|
import com.ff.delay.DelayService;
|
||||||
import com.ff.delay.DelayTask;
|
import com.ff.delay.DelayTask;
|
||||||
|
@ -22,7 +20,6 @@ import com.ff.game.api.IGamesService;
|
||||||
import com.ff.game.api.ae.client.AEClient;
|
import com.ff.game.api.ae.client.AEClient;
|
||||||
import com.ff.game.api.ae.dto.*;
|
import com.ff.game.api.ae.dto.*;
|
||||||
import com.ff.game.api.request.*;
|
import com.ff.game.api.request.*;
|
||||||
import com.ff.game.api.sv388.impl.SV388GamesServiceImpl;
|
|
||||||
import com.ff.game.api.xk.dto.XKKickMemberDTO;
|
import com.ff.game.api.xk.dto.XKKickMemberDTO;
|
||||||
import com.ff.game.domain.*;
|
import com.ff.game.domain.*;
|
||||||
import com.ff.game.service.IGameBettingDetailsService;
|
import com.ff.game.service.IGameBettingDetailsService;
|
||||||
|
@ -30,6 +27,7 @@ import com.ff.game.service.IGameExchangeMoneyService;
|
||||||
import com.ff.game.service.IGameService;
|
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 com.ff.tenant.service.ITenantGameQuotaService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
@ -280,7 +278,7 @@ public class GamesAEServiceImpl implements IGamesService {
|
||||||
params.put("withdrawType", 1);
|
params.put("withdrawType", 1);
|
||||||
deposit = AEClient.withdraw(params);
|
deposit = AEClient.withdraw(params);
|
||||||
}
|
}
|
||||||
}finally {
|
} finally {
|
||||||
BigDecimal coinBefore;
|
BigDecimal coinBefore;
|
||||||
if (TransferType.GAMES.getCode().equals(exchangeTransferMoneyRequestDTO.getTransferType())) {
|
if (TransferType.GAMES.getCode().equals(exchangeTransferMoneyRequestDTO.getTransferType())) {
|
||||||
coinBefore = NumberUtil.sub(deposit.getCurrentBalance(), deposit.getAmount());
|
coinBefore = NumberUtil.sub(deposit.getCurrentBalance(), deposit.getAmount());
|
||||||
|
@ -342,7 +340,6 @@ public class GamesAEServiceImpl implements IGamesService {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return ExchangeTransferStatusResponseDTO.builder()
|
return ExchangeTransferStatusResponseDTO.builder()
|
||||||
.statusType(status)
|
.statusType(status)
|
||||||
.balance(exchangeTransferStatusResponse.getTransferAmount())
|
.balance(exchangeTransferStatusResponse.getTransferAmount())
|
||||||
|
|
|
@ -4,6 +4,7 @@ import com.dtflys.forest.callback.AddressSource;
|
||||||
import com.dtflys.forest.http.ForestAddress;
|
import com.dtflys.forest.http.ForestAddress;
|
||||||
import com.dtflys.forest.http.ForestRequest;
|
import com.dtflys.forest.http.ForestRequest;
|
||||||
import com.ff.base.enums.GamePlatforms;
|
import com.ff.base.enums.GamePlatforms;
|
||||||
|
import com.ff.game.service.IPlatformBiz;
|
||||||
import com.ff.game.service.IPlatformService;
|
import com.ff.game.service.IPlatformService;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@ -20,11 +21,11 @@ import javax.annotation.Resource;
|
||||||
public class MyDGAddressSource implements AddressSource {
|
public class MyDGAddressSource implements AddressSource {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IPlatformService platformService;
|
private IPlatformBiz platformBiz;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ForestAddress getAddress(ForestRequest request) {
|
public ForestAddress getAddress(ForestRequest request) {
|
||||||
String apiBaseUrl = platformService.get(GamePlatforms.DG.getCode())
|
String apiBaseUrl = platformBiz.get(GamePlatforms.DG.getCode())
|
||||||
.getUrlInfo().getUrl();
|
.getUrlInfo().getUrl();
|
||||||
return new ForestAddress("http", apiBaseUrl, 80, "");
|
return new ForestAddress("http", apiBaseUrl, 80, "");
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import com.dtflys.forest.callback.AddressSource;
|
||||||
import com.dtflys.forest.http.ForestAddress;
|
import com.dtflys.forest.http.ForestAddress;
|
||||||
import com.dtflys.forest.http.ForestRequest;
|
import com.dtflys.forest.http.ForestRequest;
|
||||||
import com.ff.base.enums.GamePlatforms;
|
import com.ff.base.enums.GamePlatforms;
|
||||||
|
import com.ff.game.service.IPlatformBiz;
|
||||||
import com.ff.game.service.IPlatformService;
|
import com.ff.game.service.IPlatformService;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@ -13,7 +14,7 @@ import javax.annotation.Resource;
|
||||||
public class MyFCAddressSource implements AddressSource {
|
public class MyFCAddressSource implements AddressSource {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IPlatformService platformService;
|
private IPlatformBiz platformService;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -19,10 +19,7 @@ import com.ff.game.api.fc.client.FCClient;
|
||||||
import com.ff.game.api.fc.dto.*;
|
import com.ff.game.api.fc.dto.*;
|
||||||
import com.ff.game.api.request.*;
|
import com.ff.game.api.request.*;
|
||||||
import com.ff.game.domain.*;
|
import com.ff.game.domain.*;
|
||||||
import com.ff.game.service.IGameBettingDetailsService;
|
import com.ff.game.service.*;
|
||||||
import com.ff.game.service.IGameExchangeMoneyService;
|
|
||||||
import com.ff.game.service.IGameService;
|
|
||||||
import com.ff.game.service.IPlatformService;
|
|
||||||
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 lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
@ -60,6 +57,8 @@ public class GamesFCServiceImpl implements IGamesService {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IGameExchangeMoneyService gameExchangeMoneyService;
|
private IGameExchangeMoneyService gameExchangeMoneyService;
|
||||||
|
@Resource
|
||||||
|
private IGameExchangeMoneyBiz gameExchangeMoneyBiz;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IGameService gameService;
|
private IGameService gameService;
|
||||||
|
@ -314,7 +313,7 @@ public class GamesFCServiceImpl implements IGamesService {
|
||||||
|
|
||||||
|
|
||||||
Member member = memberService.selectMemberByGameAccount(exchangeTransferMoneyRequestDTO.getAccount());
|
Member member = memberService.selectMemberByGameAccount(exchangeTransferMoneyRequestDTO.getAccount());
|
||||||
String transactionId = gameExchangeMoneyService.getTransactionId(GamePlatforms.FC.getInfo(), 30);
|
String transactionId = gameExchangeMoneyBiz.getTransactionId(GamePlatforms.FC.getInfo(), 30);
|
||||||
List<GameExchangeMoney> gameExchangeMonies = gameExchangeMoneyService.selectGameExchangeMoneyList(
|
List<GameExchangeMoney> gameExchangeMonies = gameExchangeMoneyService.selectGameExchangeMoneyList(
|
||||||
GameExchangeMoney.builder()
|
GameExchangeMoney.builder()
|
||||||
.tenantKey(exchangeTransferMoneyRequestDTO.getTenantKey())
|
.tenantKey(exchangeTransferMoneyRequestDTO.getTenantKey())
|
||||||
|
|
|
@ -4,6 +4,7 @@ import com.dtflys.forest.callback.AddressSource;
|
||||||
import com.dtflys.forest.http.ForestAddress;
|
import com.dtflys.forest.http.ForestAddress;
|
||||||
import com.dtflys.forest.http.ForestRequest;
|
import com.dtflys.forest.http.ForestRequest;
|
||||||
import com.ff.base.enums.GamePlatforms;
|
import com.ff.base.enums.GamePlatforms;
|
||||||
|
import com.ff.game.service.IPlatformBiz;
|
||||||
import com.ff.game.service.IPlatformService;
|
import com.ff.game.service.IPlatformService;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@ -20,7 +21,7 @@ import javax.annotation.Resource;
|
||||||
public class MyJILIAddressSource implements AddressSource {
|
public class MyJILIAddressSource implements AddressSource {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IPlatformService platformService;
|
private IPlatformBiz platformService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ForestAddress getAddress(ForestRequest request) {
|
public ForestAddress getAddress(ForestRequest request) {
|
||||||
|
|
|
@ -15,15 +15,11 @@ import com.ff.base.utils.sign.Md5Utils;
|
||||||
import com.ff.base.utils.uuid.IdUtils;
|
import com.ff.base.utils.uuid.IdUtils;
|
||||||
import com.ff.config.KeyConfig;
|
import com.ff.config.KeyConfig;
|
||||||
import com.ff.game.api.IGamesService;
|
import com.ff.game.api.IGamesService;
|
||||||
import com.ff.game.api.fc.dto.ApiCFBalanceTransferStatusResponseDTO;
|
|
||||||
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.*;
|
||||||
import com.ff.game.api.request.*;
|
import com.ff.game.api.request.*;
|
||||||
import com.ff.game.domain.*;
|
import com.ff.game.domain.*;
|
||||||
import com.ff.game.service.IGameBettingDetailsService;
|
import com.ff.game.service.*;
|
||||||
import com.ff.game.service.IGameExchangeMoneyService;
|
|
||||||
import com.ff.game.service.IGameFreeRecordService;
|
|
||||||
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 lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
@ -63,6 +59,8 @@ public class GamesJILIServiceImpl implements IGamesService {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IGameService gameService;
|
private IGameService gameService;
|
||||||
|
@Resource
|
||||||
|
private IGameBiz gameBiz;
|
||||||
|
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
|
@ -503,7 +501,7 @@ public class GamesJILIServiceImpl implements IGamesService {
|
||||||
List<Long> gameIds = createFreeSpinRequest.getGameIds();
|
List<Long> gameIds = createFreeSpinRequest.getGameIds();
|
||||||
GameUniqueDTO gameUniqueDTO = new GameUniqueDTO();
|
GameUniqueDTO gameUniqueDTO = new GameUniqueDTO();
|
||||||
gameUniqueDTO.setGameIds(gameIds);
|
gameUniqueDTO.setGameIds(gameIds);
|
||||||
List<Game> gameList = gameService.selectGameUniqueList(gameUniqueDTO);
|
List<Game> gameList = gameBiz.selectGameUniqueList(gameUniqueDTO);
|
||||||
String gameCodes = gameList.stream()
|
String gameCodes = gameList.stream()
|
||||||
.map(Game::getGameCode)
|
.map(Game::getGameCode)
|
||||||
.map(String::valueOf)
|
.map(String::valueOf)
|
||||||
|
|
|
@ -4,6 +4,7 @@ import com.dtflys.forest.callback.AddressSource;
|
||||||
import com.dtflys.forest.http.ForestAddress;
|
import com.dtflys.forest.http.ForestAddress;
|
||||||
import com.dtflys.forest.http.ForestRequest;
|
import com.dtflys.forest.http.ForestRequest;
|
||||||
import com.ff.base.enums.GamePlatforms;
|
import com.ff.base.enums.GamePlatforms;
|
||||||
|
import com.ff.game.service.IPlatformBiz;
|
||||||
import com.ff.game.service.IPlatformService;
|
import com.ff.game.service.IPlatformService;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@ -20,7 +21,7 @@ import javax.annotation.Resource;
|
||||||
public class MyKMAddressSource implements AddressSource {
|
public class MyKMAddressSource implements AddressSource {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IPlatformService platformService;
|
private IPlatformBiz platformService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ForestAddress getAddress(ForestRequest request) {
|
public ForestAddress getAddress(ForestRequest request) {
|
||||||
|
|
|
@ -22,10 +22,7 @@ import com.ff.game.api.km.dto.*;
|
||||||
import com.ff.game.api.request.*;
|
import com.ff.game.api.request.*;
|
||||||
import com.ff.game.api.xk.dto.XKGamesDTO;
|
import com.ff.game.api.xk.dto.XKGamesDTO;
|
||||||
import com.ff.game.domain.*;
|
import com.ff.game.domain.*;
|
||||||
import com.ff.game.service.IGameBettingDetailsService;
|
import com.ff.game.service.*;
|
||||||
import com.ff.game.service.IGameExchangeMoneyService;
|
|
||||||
import com.ff.game.service.IGameService;
|
|
||||||
import com.ff.game.service.IPlatformService;
|
|
||||||
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 lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
@ -55,6 +52,8 @@ public class GamesKMServiceImpl implements IGamesService {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IPlatformService platformService;
|
private IPlatformService platformService;
|
||||||
|
@Resource
|
||||||
|
private IPlatformBiz platformBiz;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private RedisCache redisCache;
|
private RedisCache redisCache;
|
||||||
|
@ -191,7 +190,7 @@ public class GamesKMServiceImpl implements IGamesService {
|
||||||
kmUserToken = redisCache.getCacheObject(CacheConstants.KM_USER_TOKEN + gamesLogin.getAccount());
|
kmUserToken = redisCache.getCacheObject(CacheConstants.KM_USER_TOKEN + gamesLogin.getAccount());
|
||||||
}
|
}
|
||||||
|
|
||||||
String loginUrl = platformService.get(GamePlatforms.KM.getCode()).getUrlInfo().getLoginUrl();
|
String loginUrl = platformBiz.get(GamePlatforms.KM.getCode()).getUrlInfo().getLoginUrl();
|
||||||
|
|
||||||
return loginUrl + "/gamelauncher?gpcode=" + gamesLogin.getGameType()
|
return loginUrl + "/gamelauncher?gpcode=" + gamesLogin.getGameType()
|
||||||
+ "&gcode=" + gamesLogin.getGameId()
|
+ "&gcode=" + gamesLogin.getGameId()
|
||||||
|
@ -595,7 +594,7 @@ public class GamesKMServiceImpl implements IGamesService {
|
||||||
log.info("GamesKMServiceImpl [gameDemoLogin] 请求参数 {}", gameDemoLoginRequestDTO);
|
log.info("GamesKMServiceImpl [gameDemoLogin] 请求参数 {}", gameDemoLoginRequestDTO);
|
||||||
Map<String, Object> params = new LinkedHashMap<>();
|
Map<String, Object> params = new LinkedHashMap<>();
|
||||||
params.put("lang", gameDemoLoginRequestDTO.getLang());
|
params.put("lang", gameDemoLoginRequestDTO.getLang());
|
||||||
String loginUrl = platformService.get(GamePlatforms.KM.getCode()).getUrlInfo().getLoginUrl();
|
String loginUrl = platformBiz.get(GamePlatforms.KM.getCode()).getUrlInfo().getLoginUrl();
|
||||||
//String selectConfigByKey = configService.selectConfigByKey(Constants.KM_API_BASE_LOGIN_URL);
|
//String selectConfigByKey = configService.selectConfigByKey(Constants.KM_API_BASE_LOGIN_URL);
|
||||||
return GameDemoLoginResponseDTO.builder()
|
return GameDemoLoginResponseDTO.builder()
|
||||||
.url(loginUrl + "/demolauncher?gpcode=" + gameDemoLoginRequestDTO.getGameType()
|
.url(loginUrl + "/demolauncher?gpcode=" + gameDemoLoginRequestDTO.getGameType()
|
||||||
|
|
|
@ -4,7 +4,7 @@ import com.dtflys.forest.callback.AddressSource;
|
||||||
import com.dtflys.forest.http.ForestAddress;
|
import com.dtflys.forest.http.ForestAddress;
|
||||||
import com.dtflys.forest.http.ForestRequest;
|
import com.dtflys.forest.http.ForestRequest;
|
||||||
import com.ff.base.enums.GamePlatforms;
|
import com.ff.base.enums.GamePlatforms;
|
||||||
import com.ff.game.service.IPlatformService;
|
import com.ff.game.service.IPlatformBiz;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
@ -18,7 +18,7 @@ import javax.annotation.Resource;
|
||||||
public class MeiTianAddressSource implements AddressSource {
|
public class MeiTianAddressSource implements AddressSource {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IPlatformService platformService;
|
private IPlatformBiz platformService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ForestAddress getAddress(ForestRequest request) {
|
public ForestAddress getAddress(ForestRequest request) {
|
||||||
|
|
|
@ -4,7 +4,7 @@ import com.dtflys.forest.callback.AddressSource;
|
||||||
import com.dtflys.forest.http.ForestAddress;
|
import com.dtflys.forest.http.ForestAddress;
|
||||||
import com.dtflys.forest.http.ForestRequest;
|
import com.dtflys.forest.http.ForestRequest;
|
||||||
import com.ff.base.enums.GamePlatforms;
|
import com.ff.base.enums.GamePlatforms;
|
||||||
import com.ff.game.service.IPlatformService;
|
import com.ff.game.service.IPlatformBiz;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
@ -13,7 +13,7 @@ import javax.annotation.Resource;
|
||||||
public class MyNGAddressSource implements AddressSource {
|
public class MyNGAddressSource implements AddressSource {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IPlatformService platformService;
|
private IPlatformBiz platformService;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -21,9 +21,7 @@ import com.ff.game.api.request.*;
|
||||||
import com.ff.game.domain.*;
|
import com.ff.game.domain.*;
|
||||||
import com.ff.game.dto.GameBettingDetailsDTO;
|
import com.ff.game.dto.GameBettingDetailsDTO;
|
||||||
import com.ff.game.dto.GameDTO;
|
import com.ff.game.dto.GameDTO;
|
||||||
import com.ff.game.service.IGameBettingDetailsService;
|
import com.ff.game.service.*;
|
||||||
import com.ff.game.service.IGameExchangeMoneyService;
|
|
||||||
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 lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
@ -67,9 +65,13 @@ public class GamesPGServiceImpl implements IGamesService {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IGameExchangeMoneyService gameExchangeMoneyService;
|
private IGameExchangeMoneyService gameExchangeMoneyService;
|
||||||
|
@Resource
|
||||||
|
private IGameExchangeMoneyBiz gameExchangeMoneyBiz;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IGameService gameService;
|
private IGameService gameService;
|
||||||
|
@Resource
|
||||||
|
private IGameBiz gameBiz;
|
||||||
|
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
|
@ -286,7 +288,7 @@ public class GamesPGServiceImpl implements IGamesService {
|
||||||
|
|
||||||
|
|
||||||
Member member = memberService.selectMemberByGameAccount(exchangeTransferMoneyRequestDTO.getAccount());
|
Member member = memberService.selectMemberByGameAccount(exchangeTransferMoneyRequestDTO.getAccount());
|
||||||
String transactionId = gameExchangeMoneyService.getTransactionId(GamePlatforms.PG.getCode(), 32);
|
String transactionId = gameExchangeMoneyBiz.getTransactionId(GamePlatforms.PG.getCode(), 32);
|
||||||
List<GameExchangeMoney> gameExchangeMonies = gameExchangeMoneyService.selectGameExchangeMoneyList(
|
List<GameExchangeMoney> gameExchangeMonies = gameExchangeMoneyService.selectGameExchangeMoneyList(
|
||||||
GameExchangeMoney.builder()
|
GameExchangeMoney.builder()
|
||||||
.tenantKey(exchangeTransferMoneyRequestDTO.getTenantKey())
|
.tenantKey(exchangeTransferMoneyRequestDTO.getTenantKey())
|
||||||
|
@ -679,7 +681,7 @@ public class GamesPGServiceImpl implements IGamesService {
|
||||||
}
|
}
|
||||||
|
|
||||||
String platform = ngPlatforms.getPlatform();
|
String platform = ngPlatforms.getPlatform();
|
||||||
List<Game> games = gameService.selectGameDTOList(GameDTO.builder()
|
List<Game> games = gameBiz.selectGameDTOList(GameDTO.builder()
|
||||||
.gameName(resultBean.getGameName())
|
.gameName(resultBean.getGameName())
|
||||||
.platformCode(platform)
|
.platformCode(platform)
|
||||||
.build());
|
.build());
|
||||||
|
|
|
@ -3,10 +3,8 @@ package com.ff.game.api.pgt.address;
|
||||||
import com.dtflys.forest.callback.AddressSource;
|
import com.dtflys.forest.callback.AddressSource;
|
||||||
import com.dtflys.forest.http.ForestAddress;
|
import com.dtflys.forest.http.ForestAddress;
|
||||||
import com.dtflys.forest.http.ForestRequest;
|
import com.dtflys.forest.http.ForestRequest;
|
||||||
import com.ff.base.constant.Constants;
|
|
||||||
import com.ff.base.enums.GamePlatforms;
|
import com.ff.base.enums.GamePlatforms;
|
||||||
import com.ff.base.system.service.ISysConfigService;
|
import com.ff.game.service.IPlatformBiz;
|
||||||
import com.ff.game.service.IPlatformService;
|
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
@ -21,15 +19,12 @@ import javax.annotation.Resource;
|
||||||
@Component
|
@Component
|
||||||
public class MyPGTAddressSource implements AddressSource {
|
public class MyPGTAddressSource implements AddressSource {
|
||||||
@Resource
|
@Resource
|
||||||
private IPlatformService platformService;
|
private IPlatformBiz platformService;
|
||||||
@Resource
|
|
||||||
private ISysConfigService configService;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ForestAddress getAddress(ForestRequest request) {
|
public ForestAddress getAddress(ForestRequest request) {
|
||||||
String apiBaseUrl = platformService.get(GamePlatforms.PGT.getCode())
|
String apiBaseUrl = platformService.get(GamePlatforms.PGT.getCode())
|
||||||
.getUrlInfo().getUrl();
|
.getUrlInfo().getUrl();
|
||||||
return new ForestAddress("https",apiBaseUrl, 443,"");
|
return new ForestAddress("https", apiBaseUrl, 443, "");
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -66,6 +66,8 @@ public class GamesPGTServiceImpl implements IGamesService {
|
||||||
@Resource
|
@Resource
|
||||||
private IGameExchangeMoneyService gameExchangeMoneyService;
|
private IGameExchangeMoneyService gameExchangeMoneyService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IGameExchangeMoneyBiz gameExchangeMoneyBiz;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IGameService gameService;
|
private IGameService gameService;
|
||||||
|
@ -272,7 +274,7 @@ public class GamesPGTServiceImpl implements IGamesService {
|
||||||
|
|
||||||
|
|
||||||
Member member = memberService.selectMemberByGameAccount(exchangeTransferMoneyRequestDTO.getAccount());
|
Member member = memberService.selectMemberByGameAccount(exchangeTransferMoneyRequestDTO.getAccount());
|
||||||
String transactionId = gameExchangeMoneyService.getTransactionId(GamePlatforms.PGX.getInfo(), 17);
|
String transactionId = gameExchangeMoneyBiz.getTransactionId(GamePlatforms.PGX.getInfo(), 17);
|
||||||
List<GameExchangeMoney> gameExchangeMonies = gameExchangeMoneyService.selectGameExchangeMoneyList(
|
List<GameExchangeMoney> gameExchangeMonies = gameExchangeMoneyService.selectGameExchangeMoneyList(
|
||||||
GameExchangeMoney.builder()
|
GameExchangeMoney.builder()
|
||||||
.tenantKey(exchangeTransferMoneyRequestDTO.getTenantKey())
|
.tenantKey(exchangeTransferMoneyRequestDTO.getTenantKey())
|
||||||
|
|
|
@ -4,6 +4,7 @@ import com.dtflys.forest.callback.AddressSource;
|
||||||
import com.dtflys.forest.http.ForestAddress;
|
import com.dtflys.forest.http.ForestAddress;
|
||||||
import com.dtflys.forest.http.ForestRequest;
|
import com.dtflys.forest.http.ForestRequest;
|
||||||
import com.ff.base.enums.GamePlatforms;
|
import com.ff.base.enums.GamePlatforms;
|
||||||
|
import com.ff.game.service.IPlatformBiz;
|
||||||
import com.ff.game.service.IPlatformService;
|
import com.ff.game.service.IPlatformService;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@ -20,7 +21,7 @@ import javax.annotation.Resource;
|
||||||
public class MyPGXAddressSource implements AddressSource {
|
public class MyPGXAddressSource implements AddressSource {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IPlatformService platformService;
|
private IPlatformBiz platformService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ForestAddress getAddress(ForestRequest request) {
|
public ForestAddress getAddress(ForestRequest request) {
|
||||||
|
|
|
@ -21,6 +21,7 @@ import com.ff.game.api.pgx.dto.*;
|
||||||
import com.ff.game.api.request.*;
|
import com.ff.game.api.request.*;
|
||||||
import com.ff.game.domain.*;
|
import com.ff.game.domain.*;
|
||||||
import com.ff.game.service.IGameBettingDetailsService;
|
import com.ff.game.service.IGameBettingDetailsService;
|
||||||
|
import com.ff.game.service.IGameExchangeMoneyBiz;
|
||||||
import com.ff.game.service.IGameExchangeMoneyService;
|
import com.ff.game.service.IGameExchangeMoneyService;
|
||||||
import com.ff.game.service.IGameService;
|
import com.ff.game.service.IGameService;
|
||||||
import com.ff.member.domain.Member;
|
import com.ff.member.domain.Member;
|
||||||
|
@ -62,6 +63,8 @@ public class GamesPGXServiceImpl implements IGamesService {
|
||||||
@Resource
|
@Resource
|
||||||
private IGameExchangeMoneyService gameExchangeMoneyService;
|
private IGameExchangeMoneyService gameExchangeMoneyService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IGameExchangeMoneyBiz gameExchangeMoneyBiz;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IGameService gameService;
|
private IGameService gameService;
|
||||||
|
@ -279,7 +282,7 @@ public class GamesPGXServiceImpl implements IGamesService {
|
||||||
|
|
||||||
|
|
||||||
Member member = memberService.selectMemberByGameAccount(exchangeTransferMoneyRequestDTO.getAccount());
|
Member member = memberService.selectMemberByGameAccount(exchangeTransferMoneyRequestDTO.getAccount());
|
||||||
String transactionId = gameExchangeMoneyService.getTransactionId(GamePlatforms.PGX.getInfo(), 17);
|
String transactionId = gameExchangeMoneyBiz.getTransactionId(GamePlatforms.PGX.getInfo(), 17);
|
||||||
List<GameExchangeMoney> gameExchangeMonies = gameExchangeMoneyService.selectGameExchangeMoneyList(
|
List<GameExchangeMoney> gameExchangeMonies = gameExchangeMoneyService.selectGameExchangeMoneyList(
|
||||||
GameExchangeMoney.builder()
|
GameExchangeMoney.builder()
|
||||||
.tenantKey(exchangeTransferMoneyRequestDTO.getTenantKey())
|
.tenantKey(exchangeTransferMoneyRequestDTO.getTenantKey())
|
||||||
|
|
|
@ -4,6 +4,7 @@ import com.dtflys.forest.callback.AddressSource;
|
||||||
import com.dtflys.forest.http.ForestAddress;
|
import com.dtflys.forest.http.ForestAddress;
|
||||||
import com.dtflys.forest.http.ForestRequest;
|
import com.dtflys.forest.http.ForestRequest;
|
||||||
import com.ff.base.enums.GamePlatforms;
|
import com.ff.base.enums.GamePlatforms;
|
||||||
|
import com.ff.game.service.IPlatformBiz;
|
||||||
import com.ff.game.service.IPlatformService;
|
import com.ff.game.service.IPlatformService;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@ -20,7 +21,7 @@ import javax.annotation.Resource;
|
||||||
public class MySAAddressSource implements AddressSource {
|
public class MySAAddressSource implements AddressSource {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IPlatformService platformService;
|
private IPlatformBiz platformService;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -4,6 +4,7 @@ import com.dtflys.forest.callback.AddressSource;
|
||||||
import com.dtflys.forest.http.ForestAddress;
|
import com.dtflys.forest.http.ForestAddress;
|
||||||
import com.dtflys.forest.http.ForestRequest;
|
import com.dtflys.forest.http.ForestRequest;
|
||||||
import com.ff.base.enums.GamePlatforms;
|
import com.ff.base.enums.GamePlatforms;
|
||||||
|
import com.ff.game.service.IPlatformBiz;
|
||||||
import com.ff.game.service.IPlatformService;
|
import com.ff.game.service.IPlatformService;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@ -20,7 +21,7 @@ import javax.annotation.Resource;
|
||||||
public class SV388Adrress implements AddressSource {
|
public class SV388Adrress implements AddressSource {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IPlatformService platformService;
|
private IPlatformBiz platformService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ForestAddress getAddress(ForestRequest request) {
|
public ForestAddress getAddress(ForestRequest request) {
|
||||||
|
|
|
@ -4,6 +4,7 @@ import com.dtflys.forest.callback.AddressSource;
|
||||||
import com.dtflys.forest.http.ForestAddress;
|
import com.dtflys.forest.http.ForestAddress;
|
||||||
import com.dtflys.forest.http.ForestRequest;
|
import com.dtflys.forest.http.ForestRequest;
|
||||||
import com.ff.base.enums.GamePlatforms;
|
import com.ff.base.enums.GamePlatforms;
|
||||||
|
import com.ff.game.service.IPlatformBiz;
|
||||||
import com.ff.game.service.IPlatformService;
|
import com.ff.game.service.IPlatformService;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@ -20,7 +21,7 @@ import javax.annotation.Resource;
|
||||||
public class MyXKAddressSource implements AddressSource {
|
public class MyXKAddressSource implements AddressSource {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IPlatformService platformService;
|
private IPlatformBiz platformService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ForestAddress getAddress(ForestRequest request) {
|
public ForestAddress getAddress(ForestRequest request) {
|
||||||
|
|
|
@ -1,106 +0,0 @@
|
||||||
package com.ff.game.service;
|
|
||||||
|
|
||||||
import com.ff.api.response.GameResponse;
|
|
||||||
import com.ff.game.api.request.GameUniqueDTO;
|
|
||||||
import com.ff.game.domain.Game;
|
|
||||||
import com.ff.game.dto.GameDTO;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 平台子游戏管理Service接口
|
|
||||||
*
|
|
||||||
* @author shi
|
|
||||||
* @date 2025-02-10
|
|
||||||
*/
|
|
||||||
public interface IGameService {
|
|
||||||
/**
|
|
||||||
* 查询平台子游戏管理
|
|
||||||
*
|
|
||||||
* @param id 平台子游戏管理主键
|
|
||||||
* @return 平台子游戏管理
|
|
||||||
*/
|
|
||||||
Game selectGameById(Long id);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 按游戏id选择游戏
|
|
||||||
*
|
|
||||||
* @param gameId 游戏id
|
|
||||||
* @return {@link Game }
|
|
||||||
*/
|
|
||||||
Game selectGameByGameId(String gameId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询平台子游戏管理列表
|
|
||||||
*
|
|
||||||
* @param game 平台子游戏管理
|
|
||||||
* @return 平台子游戏管理集合
|
|
||||||
*/
|
|
||||||
List<Game> selectGameList(Game game);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 选择游戏数据列表
|
|
||||||
*
|
|
||||||
* @param gameDTO 游戏dto
|
|
||||||
* @return {@link List }<{@link Game }>
|
|
||||||
*/
|
|
||||||
List<Game> selectGameDTOList(GameDTO gameDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增平台子游戏管理
|
|
||||||
*
|
|
||||||
* @param game 平台子游戏管理
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
int insertGame(Game game);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改平台子游戏管理
|
|
||||||
*
|
|
||||||
* @param game 平台子游戏管理
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
int updateGame(Game game);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除平台子游戏管理
|
|
||||||
*
|
|
||||||
* @param ids 需要删除的平台子游戏管理主键集合
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
int deleteGameByIds(Long[] ids);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除平台子游戏管理信息
|
|
||||||
*
|
|
||||||
* @param id 平台子游戏管理主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
int deleteGameById(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 按平台id选择最大排序号
|
|
||||||
*
|
|
||||||
* @return {@link Integer }
|
|
||||||
*/
|
|
||||||
Integer selectMaxSortNo(Integer platformType, String platformCode);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 选择游戏唯一列表
|
|
||||||
*
|
|
||||||
* @param gameUniqueDTO 游戏独有dto
|
|
||||||
* @return {@link List }<{@link Game }>
|
|
||||||
*/
|
|
||||||
List<Game> selectGameUniqueList(GameUniqueDTO gameUniqueDTO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 选择游戏响应列表
|
|
||||||
*
|
|
||||||
* @return {@link List }<{@link GameResponse }>
|
|
||||||
*/
|
|
||||||
List<GameResponse> selectGameResponseList();
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,153 +0,0 @@
|
||||||
package com.ff.game.service.impl;
|
|
||||||
|
|
||||||
import cn.hutool.core.util.IdUtil;
|
|
||||||
import com.ff.api.response.GameResponse;
|
|
||||||
import com.ff.base.utils.DateUtils;
|
|
||||||
import com.ff.game.api.IGamesService;
|
|
||||||
import com.ff.game.api.request.GameUniqueDTO;
|
|
||||||
import com.ff.game.domain.Game;
|
|
||||||
import com.ff.game.dto.GameDTO;
|
|
||||||
import com.ff.game.mapper.GameMapper;
|
|
||||||
import com.ff.game.service.IGameService;
|
|
||||||
import com.ff.member.service.IMemberService;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 平台子游戏管理Service业务层处理
|
|
||||||
*
|
|
||||||
* @author shi
|
|
||||||
* @date 2025-02-10
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
@Slf4j
|
|
||||||
public class GameServiceImpl implements IGameService {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private GameMapper gameMapper;
|
|
||||||
/**
|
|
||||||
* 查询平台子游戏管理
|
|
||||||
*
|
|
||||||
* @param id 平台子游戏管理主键
|
|
||||||
* @return 平台子游戏管理
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Game selectGameById(Long id) {
|
|
||||||
return gameMapper.selectGameById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 按游戏id选择游戏
|
|
||||||
*
|
|
||||||
* @param gameId 游戏id
|
|
||||||
* @return {@link Game }
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Game selectGameByGameId(String gameId) {
|
|
||||||
return gameMapper.selectGameByGameId(gameId);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询平台子游戏管理列表
|
|
||||||
*
|
|
||||||
* @param game 平台子游戏管理
|
|
||||||
* @return 平台子游戏管理
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<Game> selectGameList(Game game) {
|
|
||||||
return gameMapper.selectGameList(game);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 选择游戏数据列表
|
|
||||||
*
|
|
||||||
* @param gameDTO 游戏dto
|
|
||||||
* @return {@link List }<{@link Game }>
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<Game> selectGameDTOList(GameDTO gameDTO) {
|
|
||||||
return gameMapper.selectGameDTOList(gameDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增平台子游戏管理
|
|
||||||
*
|
|
||||||
* @param game 平台子游戏管理
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int insertGame(Game game) {
|
|
||||||
if (game.getId() == null) {
|
|
||||||
game.setId(IdUtil.getSnowflakeNextId());
|
|
||||||
}
|
|
||||||
game.setCreateTime(DateUtils.getNowDate());
|
|
||||||
return gameMapper.insertGame(game);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改平台子游戏管理
|
|
||||||
*
|
|
||||||
* @param game 平台子游戏管理
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int updateGame(Game game) {
|
|
||||||
game.setUpdateTime(DateUtils.getNowDate());
|
|
||||||
return gameMapper.updateGame(game);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除平台子游戏管理
|
|
||||||
*
|
|
||||||
* @param ids 需要删除的平台子游戏管理主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int deleteGameByIds(Long[] ids) {
|
|
||||||
return gameMapper.deleteGameByIds(ids);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除平台子游戏管理信息
|
|
||||||
*
|
|
||||||
* @param id 平台子游戏管理主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int deleteGameById(Long id) {
|
|
||||||
return gameMapper.deleteGameById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 选择游戏唯一列表
|
|
||||||
*
|
|
||||||
* @param gameUniqueDTO 游戏独有dto
|
|
||||||
* @return {@link List }<{@link Game }>
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<Game> selectGameUniqueList(GameUniqueDTO gameUniqueDTO) {
|
|
||||||
return gameMapper.selectGameUniqueList(gameUniqueDTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 选择游戏响应列表
|
|
||||||
*
|
|
||||||
* @return {@link List }<{@link GameResponse }>
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<GameResponse> selectGameResponseList() {
|
|
||||||
return gameMapper.selectGameResponseList();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Integer selectMaxSortNo(Integer platformType, String platformCode) {
|
|
||||||
return gameMapper.selectMaxSortNoBy(platformType, platformCode);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -6,7 +6,6 @@ import com.ff.base.datasource.DynamicDataSourceContextHolder;
|
||||||
import com.ff.game.domain.Platform;
|
import com.ff.game.domain.Platform;
|
||||||
import com.ff.game.mapper.PlatformMapper;
|
import com.ff.game.mapper.PlatformMapper;
|
||||||
import com.ff.game.service.IPlatformBiz;
|
import com.ff.game.service.IPlatformBiz;
|
||||||
import com.ff.game.service.IPlatformService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@ -32,7 +31,7 @@ public class PlatformBizImpl implements IPlatformBiz {
|
||||||
Object key = entry.getKey();
|
Object key = entry.getKey();
|
||||||
// 设置数据源类型
|
// 设置数据源类型
|
||||||
DynamicDataSourceContextHolder.setDataSourceType(key.toString());
|
DynamicDataSourceContextHolder.setDataSourceType(key.toString());
|
||||||
List<Platform> list = selectList(new Platform());
|
List<Platform> list = platformMapper.selectList(new Platform());
|
||||||
for (Platform pp : list) {
|
for (Platform pp : list) {
|
||||||
redisCache.setCacheObject(getCacheKey(pp.getPlatformCode()), pp);
|
redisCache.setCacheObject(getCacheKey(pp.getPlatformCode()), pp);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import com.dtflys.forest.callback.AddressSource;
|
||||||
import com.dtflys.forest.http.ForestAddress;
|
import com.dtflys.forest.http.ForestAddress;
|
||||||
import com.dtflys.forest.http.ForestRequest;
|
import com.dtflys.forest.http.ForestRequest;
|
||||||
import com.ff.base.enums.GamePlatforms;
|
import com.ff.base.enums.GamePlatforms;
|
||||||
|
import com.ff.game.service.IPlatformBiz;
|
||||||
import com.ff.game.service.IPlatformService;
|
import com.ff.game.service.IPlatformService;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@ -21,7 +22,7 @@ import javax.annotation.Resource;
|
||||||
public class DBSportsAddress implements AddressSource {
|
public class DBSportsAddress implements AddressSource {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IPlatformService platformService;
|
private IPlatformBiz platformService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ForestAddress getAddress(ForestRequest request) {
|
public ForestAddress getAddress(ForestRequest request) {
|
||||||
|
|
|
@ -4,6 +4,7 @@ import com.dtflys.forest.callback.AddressSource;
|
||||||
import com.dtflys.forest.http.ForestAddress;
|
import com.dtflys.forest.http.ForestAddress;
|
||||||
import com.dtflys.forest.http.ForestRequest;
|
import com.dtflys.forest.http.ForestRequest;
|
||||||
import com.ff.base.enums.GamePlatforms;
|
import com.ff.base.enums.GamePlatforms;
|
||||||
|
import com.ff.game.service.IPlatformBiz;
|
||||||
import com.ff.game.service.IPlatformService;
|
import com.ff.game.service.IPlatformService;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@ -19,7 +20,7 @@ import javax.annotation.Resource;
|
||||||
public class FBSportsAddress implements AddressSource {
|
public class FBSportsAddress implements AddressSource {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IPlatformService platformService;
|
private IPlatformBiz platformService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ForestAddress getAddress(ForestRequest request) {
|
public ForestAddress getAddress(ForestRequest request) {
|
||||||
|
|
|
@ -1,19 +1,10 @@
|
||||||
package com.ff.tenant.controller;
|
package com.ff.tenant.controller;
|
||||||
|
|
||||||
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.page.TableDataInfo;
|
import com.ff.base.core.page.TableDataInfo;
|
||||||
import com.ff.base.system.domain.TenantPlatform;
|
|
||||||
import com.ff.base.system.domain.TenantSecretKey;
|
|
||||||
import com.ff.base.system.service.ITenantPlatformService;
|
|
||||||
import com.ff.base.system.service.ITenantSecretKeyService;
|
|
||||||
import com.ff.common.domain.TenantGameQuota;
|
|
||||||
import com.ff.common.service.ITenantGameQuotaService;
|
|
||||||
import com.ff.game.domain.GameBettingDetails;
|
import com.ff.game.domain.GameBettingDetails;
|
||||||
import com.ff.game.dto.GameBettingDetailsDTO;
|
import com.ff.game.dto.GameBettingDetailsDTO;
|
||||||
import com.ff.game.service.IGameBettingDetailsService;
|
import com.ff.game.service.IGameBettingDetailsService;
|
||||||
import com.ff.tenant.dto.TenantDTO;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
@ -46,8 +37,7 @@ public class TenantBettingDetailsController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('tenant:betting:list')")
|
@PreAuthorize("@ss.hasPermi('tenant:betting:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(GameBettingDetailsDTO gameBettingDetails)
|
public TableDataInfo list(GameBettingDetailsDTO gameBettingDetails) {
|
||||||
{
|
|
||||||
gameBettingDetails.setTenantKey(getUsername());
|
gameBettingDetails.setTenantKey(getUsername());
|
||||||
startPage();
|
startPage();
|
||||||
List<GameBettingDetails> gameBettingDetailsList = gameBettingDetailsService.selectGameBettingDetailsList(gameBettingDetails);
|
List<GameBettingDetails> gameBettingDetailsList = gameBettingDetailsService.selectGameBettingDetailsList(gameBettingDetails);
|
||||||
|
|
|
@ -4,15 +4,16 @@ 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.system.domain.TenantPlatform;
|
import com.ff.base.system.domain.TenantPlatform;
|
||||||
import com.ff.base.system.domain.TenantSecretKey;
|
import com.ff.base.system.domain.TenantSecretKey;
|
||||||
import com.ff.base.system.service.ITenantAgentService;
|
|
||||||
import com.ff.base.system.service.ITenantPlatformService;
|
import com.ff.base.system.service.ITenantPlatformService;
|
||||||
import com.ff.base.system.service.ITenantSecretKeyService;
|
import com.ff.base.system.service.ITenantSecretKeyService;
|
||||||
import com.ff.common.domain.TenantGameQuota;
|
import com.ff.common.domain.TenantGameQuota;
|
||||||
import com.ff.common.service.ITenantGameQuotaService;
|
|
||||||
import com.ff.tenant.dto.TenantDTO;
|
import com.ff.tenant.dto.TenantDTO;
|
||||||
|
import com.ff.tenant.service.ITenantGameQuotaService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@ import com.ff.game.domain.GameBettingDetails;
|
||||||
import com.ff.game.domain.GameExchangeMoney;
|
import com.ff.game.domain.GameExchangeMoney;
|
||||||
import com.ff.game.dto.GameExchangeMoneyDTO;
|
import com.ff.game.dto.GameExchangeMoneyDTO;
|
||||||
import com.ff.game.service.IGameBettingDetailsService;
|
import com.ff.game.service.IGameBettingDetailsService;
|
||||||
|
import com.ff.game.service.IGameExchangeMoneyBiz;
|
||||||
import com.ff.game.service.IGameExchangeMoneyService;
|
import com.ff.game.service.IGameExchangeMoneyService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
@ -31,6 +32,8 @@ public class TenantExchangeController extends BaseController {
|
||||||
@Resource
|
@Resource
|
||||||
private IGameExchangeMoneyService gameExchangeMoneyService;
|
private IGameExchangeMoneyService gameExchangeMoneyService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IGameExchangeMoneyBiz gameExchangeMoneyBiz;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表
|
* 列表
|
||||||
|
@ -43,7 +46,7 @@ public class TenantExchangeController extends BaseController {
|
||||||
public TableDataInfo list(GameExchangeMoneyDTO gameExchangeMoneyDTO) {
|
public TableDataInfo list(GameExchangeMoneyDTO gameExchangeMoneyDTO) {
|
||||||
gameExchangeMoneyDTO.setTenantKey(getUsername());
|
gameExchangeMoneyDTO.setTenantKey(getUsername());
|
||||||
startPage();
|
startPage();
|
||||||
List<GameExchangeMoneyDTO> gameExchangeMoneyDTOS = gameExchangeMoneyService.selectGameExchangeMoneyDTOList(gameExchangeMoneyDTO);
|
List<GameExchangeMoneyDTO> gameExchangeMoneyDTOS = gameExchangeMoneyBiz.selectGameExchangeMoneyDTOList(gameExchangeMoneyDTO);
|
||||||
return getDataTable(gameExchangeMoneyDTOS);
|
return getDataTable(gameExchangeMoneyDTOS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,10 +3,7 @@ package com.ff.tenant.controller;
|
||||||
import com.ff.base.core.controller.BaseController;
|
import com.ff.base.core.controller.BaseController;
|
||||||
import com.ff.base.core.page.TableDataInfo;
|
import com.ff.base.core.page.TableDataInfo;
|
||||||
import com.ff.common.domain.TenantGameQuotaFlow;
|
import com.ff.common.domain.TenantGameQuotaFlow;
|
||||||
import com.ff.common.service.ITenantGameQuotaFlowService;
|
import com.ff.tenant.service.ITenantGameQuotaFlowService;
|
||||||
import com.ff.game.domain.GameBettingDetails;
|
|
||||||
import com.ff.game.service.IGameBettingDetailsService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
@ -27,7 +24,6 @@ import java.util.List;
|
||||||
public class TenantQuotaFlowController extends BaseController {
|
public class TenantQuotaFlowController extends BaseController {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ITenantGameQuotaFlowService tenantGameQuotaFlowService;
|
private ITenantGameQuotaFlowService tenantGameQuotaFlowService;
|
||||||
|
|
||||||
|
@ -40,8 +36,7 @@ public class TenantQuotaFlowController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('tenant:quota:flow:list')")
|
@PreAuthorize("@ss.hasPermi('tenant:quota:flow:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(TenantGameQuotaFlow tenantGameQuotaFlow)
|
public TableDataInfo list(TenantGameQuotaFlow tenantGameQuotaFlow) {
|
||||||
{
|
|
||||||
tenantGameQuotaFlow.setTenantKey(getUsername());
|
tenantGameQuotaFlow.setTenantKey(getUsername());
|
||||||
startPage();
|
startPage();
|
||||||
List<TenantGameQuotaFlow> tenantGameQuotaFlows = tenantGameQuotaFlowService.selectTenantGameQuotaFlowList(tenantGameQuotaFlow);
|
List<TenantGameQuotaFlow> tenantGameQuotaFlows = tenantGameQuotaFlowService.selectTenantGameQuotaFlowList(tenantGameQuotaFlow);
|
||||||
|
|
|
@ -24,7 +24,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
<resultMap id="GameResponseResultMap" type="com.ff.api.response.GameResponse">
|
||||||
|
<result property="id" column="game_id"/>
|
||||||
|
<result property="gameName" column="game_name"/>
|
||||||
|
<result property="freeSpin" column="freespin"/>
|
||||||
|
<result property="demoStatus" column="demo_status"/>
|
||||||
|
<result property="platformType" column="platform_type"/>
|
||||||
|
<result property="platformCode" column="platform_code"/>
|
||||||
|
<result property="ingress" column="ingress"/>
|
||||||
|
<result property="nameInfo" column="name_info" typeHandler="com.ff.base.handler.JsonHandler" javaType="com.ff.game.domain.NameInfo"/>
|
||||||
|
|
||||||
|
</resultMap>
|
||||||
<select id="selectGameDTOList" parameterType="com.ff.game.dto.GameDTO" resultMap="GameResult">
|
<select id="selectGameDTOList" parameterType="com.ff.game.dto.GameDTO" resultMap="GameResult">
|
||||||
select g.id,
|
select g.id,
|
||||||
g.sort_no,
|
g.sort_no,
|
||||||
|
@ -53,7 +63,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="platformCode != null and platformCode != ''"> and g.platform_code = #{platformCode}</if>
|
<if test="platformCode != null and platformCode != ''"> and g.platform_code = #{platformCode}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
<sql id="selectGameVo">
|
||||||
|
select * from ff_game
|
||||||
|
</sql>
|
||||||
<select id="selectGameResponseList" resultMap="GameResponseResultMap">
|
<select id="selectGameResponseList" resultMap="GameResponseResultMap">
|
||||||
select
|
select
|
||||||
g.game_id,
|
g.game_id,
|
||||||
|
|
Loading…
Reference in New Issue