refactor(ff-game): 重构游戏相关服务和接口

- 修改了多个控制器和实现类中的方法调用,使用新的Biz接口替代旧的Service接口
- 删除了IGameService接口及其实现类GameServiceImpl
- 新增了ITenantAgentInviteBiz接口
- 优化了多个类的依赖注入,使用更具体的Biz接口替代泛型Service接口
main-pp
liaoyong 2025-04-12 14:35:41 +08:00
parent 9e6cfe177b
commit 180d454907
43 changed files with 291 additions and 531 deletions

View File

@ -21,8 +21,9 @@ import com.ff.base.utils.bean.BeanUtils;
import com.ff.base.utils.ip.IpUtils;
import com.ff.common.domain.TenantAgentPlatform;
import com.ff.common.dto.BalanceChangesDTO;
import com.ff.common.service.ITenantAgentPlatformService;
import com.ff.common.service.ITenantGameQuotaService;
import com.ff.tenant.service.ITenantAgentPlatformService;
import com.ff.tenant.service.ITenantGameQuotaBiz;
import com.ff.tenant.service.ITenantGameQuotaService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.transaction.annotation.Transactional;
@ -51,6 +52,9 @@ public class AgentController extends BaseController {
@Resource
private ITenantGameQuotaService tenantGameQuotaService;
@Resource
private ITenantGameQuotaBiz tenantGameQuotaBiz;
@Resource
private ITenantPlatformService tenantPlatformService;
@ -127,7 +131,7 @@ public class AgentController extends BaseController {
if (tenant > 0) {
//信誉额度
if (!ObjectUtils.isEmpty(agentCreateTenantDTO.getRealBalance())) {
tenantGameQuotaService.balanceChanges(BalanceChangesDTO.builder()
tenantGameQuotaBiz.balanceChanges(BalanceChangesDTO.builder()
.isOut(Boolean.TRUE)
.currencyCode(Constants.USDT)
.tenantKey(agentCreateTenantDTO.getAccount())

View File

@ -1,36 +1,28 @@
package com.ff.agent.controller;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Resource;
import com.ff.agent.domain.TenantAgentInvite;
import com.ff.agent.domain.TenantAgentInvitePlatform;
import com.ff.agent.dto.TenantAgentInviteDTO;
import com.ff.agent.service.ITenantAgentInviteBiz;
import com.ff.agent.service.ITenantAgentInvitePlatformService;
import com.ff.agent.service.ITenantAgentInviteService;
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.constant.ConfigConstants;
import com.ff.base.core.controller.BaseController;
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.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
@ -43,6 +35,8 @@ import com.ff.base.core.page.TableDataInfo;
public class TenantAgentInviteController extends BaseController {
@Autowired
private ITenantAgentInviteService tenantAgentInviteService;
@Autowired
private ITenantAgentInviteBiz tenantAgentInviteBiz;
@Resource
private ISysConfigService sysConfigService;
@ -93,7 +87,7 @@ public class TenantAgentInviteController extends BaseController {
public AjaxResult add(@Validated @RequestBody TenantAgentInviteDTO tenantAgentInvite) {
tenantAgentInvite.setAgentId(getUserId());
String inviteUrl = sysConfigService.selectConfigByKey(ConfigConstants.INVITE_URL);
tenantAgentInvite.setInviteCode(tenantAgentInviteService.getInviteCode());
tenantAgentInvite.setInviteCode(tenantAgentInviteBiz.getInviteCode());
tenantAgentInvite.setInviteUrl(inviteUrl + "?code=" + tenantAgentInvite.getInviteCode());
tenantAgentInvite.setCreateBy(getUsername());
int result = tenantAgentInviteService.insertTenantAgentInvite(tenantAgentInvite);

View File

@ -1,11 +1,5 @@
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 com.ff.agent.domain.TenantAgentCommission;
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.dto.TenantAgentInviteRegisterAddDTO;
import com.ff.agent.dto.TenantAgentInviteRegisterDTO;
import com.ff.agent.service.ITenantAgentCommissionService;
import com.ff.agent.service.ITenantAgentInvitePlatformService;
import com.ff.agent.service.ITenantAgentInviteRegisterService;
import com.ff.agent.service.ITenantAgentInviteService;
import com.ff.agent.service.*;
import com.ff.base.annotation.Anonymous;
import com.ff.base.annotation.Excel;
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.system.domain.TenantAgent;
import com.ff.base.system.domain.TenantPlatform;
import com.ff.base.system.domain.TenantSecretKey;
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.ITenantSecretKeyService;
import com.ff.base.utils.DateUtils;
import com.ff.base.utils.MessageUtils;
import com.ff.base.utils.SecurityUtils;
import com.ff.base.utils.bean.BeanUtils;
import com.ff.base.utils.ip.IpUtils;
import com.ff.base.utils.uuid.IdUtils;
import com.ff.common.dto.BalanceChangesDTO;
import com.ff.common.service.ITenantGameQuotaService;
import org.springframework.security.access.prepost.PreAuthorize;
import com.ff.tenant.service.ITenantGameQuotaBiz;
import com.ff.tenant.service.ITenantGameQuotaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ff.base.annotation.Log;
import com.ff.base.core.controller.BaseController;
import com.ff.base.core.domain.AjaxResult;
import com.ff.base.utils.poi.ExcelUtil;
import com.ff.base.core.page.TableDataInfo;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
/**
* Controller
@ -67,6 +51,8 @@ import com.ff.base.core.page.TableDataInfo;
public class TenantAgentInviteRegisterController extends BaseController {
@Autowired
private ITenantAgentInviteRegisterService tenantAgentInviteRegisterService;
@Autowired
private ITenantAgentInviteRegisterBiz tenantAgentInviteRegisterBiz;
@Resource
private ITenantAgentInviteService tenantAgentInviteService;
@ -76,6 +62,8 @@ public class TenantAgentInviteRegisterController extends BaseController {
@Resource
private ITenantGameQuotaService tenantGameQuotaService;
@Resource
private ITenantGameQuotaBiz tenantGameQuotaBiz;
@Resource
private ITenantAgentCommissionService tenantAgentCommissionService;
@ -94,7 +82,7 @@ public class TenantAgentInviteRegisterController extends BaseController {
public TableDataInfo list(TenantAgentInviteRegisterDTO tenantAgentInviteRegisterDTO) {
startPage();
tenantAgentInviteRegisterDTO.setAgentId(getUserId());
List<TenantAgentInviteRegisterDTO> list = tenantAgentInviteRegisterService.selectTenantAgentInviteRegisterListDTO(tenantAgentInviteRegisterDTO);
List<TenantAgentInviteRegisterDTO> list = tenantAgentInviteRegisterBiz.selectTenantAgentInviteRegisterListDTO(tenantAgentInviteRegisterDTO);
return getDataTable(list);
}
@ -185,7 +173,7 @@ public class TenantAgentInviteRegisterController extends BaseController {
.build());
//信誉额度
if (result > 0 & !ObjectUtils.isEmpty(tenantAgentInvite.getRealBalance())) {
tenantGameQuotaService.balanceChanges(BalanceChangesDTO.builder()
tenantGameQuotaBiz.balanceChanges(BalanceChangesDTO.builder()
.isOut(Boolean.TRUE)
.currencyCode(Constants.USDT)
.tenantKey(tenantAgentInviteRegister.getAccount())

View File

@ -1,19 +1,16 @@
package com.ff.agent.controller;
import java.util.List;
import com.ff.base.core.page.PageDomain;
import com.ff.base.core.controller.BaseController;
import com.ff.base.core.domain.AjaxResult;
import com.ff.common.domain.TenantAgentPlatform;
import com.ff.common.service.ITenantAgentPlatformService;
import com.ff.tenant.service.ITenantAgentPlatformService;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ff.base.core.controller.BaseController;
import com.ff.base.core.domain.AjaxResult;
import com.ff.agent.domain.TenantAgentInvitePlatform;
import com.ff.agent.service.ITenantAgentInvitePlatformService;
import java.util.List;
/**
* Controller
@ -23,8 +20,7 @@ import com.ff.agent.service.ITenantAgentInvitePlatformService;
*/
@RestController
@RequestMapping("/agent/platform")
public class TenantAgentPlatformController extends BaseController
{
public class TenantAgentPlatformController extends BaseController {
@Autowired
private ITenantAgentPlatformService tenantAgentPlatformService;
@ -32,8 +28,7 @@ public class TenantAgentPlatformController extends BaseController
*
*/
@GetMapping("/select")
public AjaxResult select( )
{
public AjaxResult select() {
PageHelper.orderBy("platform_code desc,currency_code desc");
List<TenantAgentPlatform> list = tenantAgentPlatformService.selectTenantAgentPlatformList(TenantAgentPlatform.builder().build());
return AjaxResult.success(list);

View File

@ -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();
}

View File

@ -19,5 +19,4 @@ public interface ITenantAgentInviteRegisterBiz {
*/
List<TenantAgentInviteRegisterDTO> selectTenantAgentInviteRegisterListDTO(TenantAgentInviteRegisterDTO tenantAgentInviteRegisterDTO);
}

View File

@ -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;
}
}

View File

@ -15,8 +15,6 @@ import com.ff.base.system.domain.TenantSecretKey;
import com.ff.base.utils.StringUtils;
import com.ff.base.utils.bean.BeanUtils;
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.game.api.IGamesService;
import com.ff.game.api.request.*;
@ -25,6 +23,8 @@ import com.ff.game.dto.GameBettingDetailsDTO;
import com.ff.game.service.*;
import com.ff.member.domain.Member;
import com.ff.member.service.IMemberService;
import com.ff.tenant.service.ITenantGameQuotaBiz;
import com.ff.tenant.service.ITenantGameQuotaService;
import com.github.pagehelper.PageHelper;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
@ -65,6 +65,8 @@ public class ApiGameController extends BaseController {
@Resource
private IGameService gameService;
@Resource
private IGameBiz gameBiz;
@Resource
@ -75,6 +77,8 @@ public class ApiGameController extends BaseController {
@Resource
private ITenantGameQuotaService tenantGameQuotaService;
@Resource
private ITenantGameQuotaBiz tenantGameQuotaBiz;
@Resource
private IGameBettingDetailsService gameBettingDetailsService;
@ -88,6 +92,9 @@ public class ApiGameController extends BaseController {
@Qualifier("threadPoolTaskExecutor")
private ThreadPoolTaskExecutor threadPoolTaskExecutor;
@Resource
private IPlatformBiz platformBiz;
@Resource
private IPlatformService platformService;
@ -98,9 +105,9 @@ public class ApiGameController extends BaseController {
*/
@PostMapping("/list")
public AjaxResult list() {
List<GameResponse> gameResponses = gameService.selectGameResponseList();
List<GameResponse> gameResponses = gameBiz.selectGameResponseList();
for (GameResponse gameResponse : gameResponses) {
Platform platform = platformService.get(gameResponse.getPlatformCode());
Platform platform = platformBiz.get(gameResponse.getPlatformCode());
if (null == platform) {
continue;
}
@ -125,7 +132,7 @@ public class ApiGameController extends BaseController {
Game game = gameService.selectGameByGameId(loginRequest.getGameId());
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());
IGamesService iGamesService = gamesService.get(platform.getPlatformCode() + Constants.SERVICE);
ApiException.notNull(iGamesService, ErrorCode.PLATFORM_NOT_EXIST.getCode());
@ -191,7 +198,7 @@ public class ApiGameController extends BaseController {
TenantSecretKey tenantSecretKey = keyConfig.get();
Platform platform = platformService.get(gameExchangeBalanceRequest.getPlatformCode());
Platform platform = platformBiz.get(gameExchangeBalanceRequest.getPlatformCode());
ApiException.notNull(platform, ErrorCode.PLATFORM_NOT_EXIST.getCode());
String targetCurrency = platform.getCurrencyInfo().get(gameExchangeBalanceRequest.getCurrencyCode());
@ -210,7 +217,7 @@ public class ApiGameController extends BaseController {
BigDecimal quota = BigDecimal.ZERO;
//如果是扣钱提前扣
if (TransferType.GAMES.getCode().equals(gameExchangeBalanceRequest.getTransferType())) {
quota = tenantGameQuotaService.gameBalanceExchange(GameBalanceExchange.builder()
quota = tenantGameQuotaBiz.gameBalanceExchange(GameBalanceExchange.builder()
.platformCode(gameExchangeBalanceRequest.getPlatformCode())
.sourceId(gameExchangeBalanceRequest.getOrderId())
.currencyCode(gameExchangeBalanceRequest.getCurrencyCode())
@ -296,7 +303,7 @@ public class ApiGameController extends BaseController {
// .platformCode(gameCreateFreeSpinRequest.getPlatformCode())
// .systemCurrency(gameCreateFreeSpinRequest.getCurrencyCode()).build());
// 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());
String targetCurrency = platform.getCurrencyInfo().get(gameCreateFreeSpinRequest.getCurrencyCode());
@ -383,7 +390,7 @@ public class ApiGameController extends BaseController {
*/
@PostMapping("/get/detail")
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());
String targetCurrency = platform.getCurrencyInfo().get(gameGetDetailRequest.getCurrencyCode());
@ -447,7 +454,7 @@ public class ApiGameController extends BaseController {
// .systemCurrency(gameKickMemeberRequest.getCurrencyCode()).build());
// 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());
String targetCurrency = platform.getCurrencyInfo().get(gameKickMemeberRequest.getCurrencyCode());
@ -490,7 +497,7 @@ public class ApiGameController extends BaseController {
// .systemCurrency(gameKickMemeberAllRequest.getCurrencyCode()).build());
//
// 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());
String targetCurrency = platform.getCurrencyInfo().get(gameKickMemeberAllRequest.getCurrencyCode());
@ -576,7 +583,7 @@ public class ApiGameController extends BaseController {
// .systemCurrency(gameGetFreeSpinDashflowRequest.getCurrencyCode()).build());
// 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());
String targetCurrency = platform.getCurrencyInfo().get(request.getCurrencyCode());
@ -756,7 +763,7 @@ public class ApiGameController extends BaseController {
//GamePlatform gamePlatform = gamePlatformService.selectGamePlatformById(game.getPlatformId());
//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());
IGamesService iGamesService = gamesService.get(platform.getPlatformCode() + Constants.SERVICE);

View File

@ -23,8 +23,10 @@ import com.ff.game.api.request.MemberInfoRequestDTO;
import com.ff.game.api.request.MemberInfoResponseDTO;
import com.ff.game.domain.KeyInfo;
import com.ff.game.domain.Platform;
import com.ff.game.service.IPlatformBiz;
import com.ff.game.service.IPlatformService;
import com.ff.member.domain.Member;
import com.ff.member.service.IMemberBiz;
import com.ff.member.service.IMemberService;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
@ -77,6 +79,10 @@ public class ApiMemberController extends BaseController {
@Resource
private IPlatformService platformService;
@Autowired
private IPlatformBiz platformBiz;
@Autowired
private IMemberBiz memberBiz;
/**
*
@ -93,7 +99,7 @@ public class ApiMemberController extends BaseController {
TenantSecretKey tenantSecretKey = keyConfig.get();
Platform platform = platformService.get(memberCreateApiRequest.getPlatformCode());
Platform platform = platformBiz.get(memberCreateApiRequest.getPlatformCode());
ApiException.notNull(platform, ErrorCode.CURRENCY_NOT_EXIST.getCode());
String targetCurrency = platform.getCurrencyInfo().get(memberCreateApiRequest.getCurrencyCode());
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());
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, "建立游戏账号失败");
return toAjax(Boolean.TRUE);
}
@ -165,7 +169,7 @@ public class ApiMemberController extends BaseController {
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());
String targetCurrency = platform.getCurrencyInfo().get(request.getCurrencyCode());
@ -220,7 +224,7 @@ public class ApiMemberController extends BaseController {
List<Key> keys = new ArrayList<>();
for (GamePlatforms platformEnum : GamePlatforms.values()) {
Platform platform = platformService.get(platformEnum.getCode());
Platform platform = platformBiz.get(platformEnum.getCode());
String targetCurrency = platform.getCurrencyInfo().get(memberInfoAllApiRequest.getCurrencyCode());
if (StringUtils.isEmpty(targetCurrency)) {
continue;

View File

@ -6,11 +6,11 @@ import com.ff.api.response.TenantInfoResponse;
import com.ff.base.core.controller.BaseController;
import com.ff.base.core.domain.AjaxResult;
import com.ff.base.enums.QuotaType;
import com.ff.base.system.domain.TenantSecretKey;
import com.ff.base.utils.bean.BeanUtils;
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.tenant.service.ITenantGameQuotaService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@ -30,7 +30,6 @@ import javax.annotation.Resource;
@Slf4j
public class ApiTenantController extends BaseController {
@Resource
private ITenantGameQuotaService tenantGameQuotaService;
@Resource
@ -45,8 +44,8 @@ public class ApiTenantController extends BaseController {
public AjaxResult info() {
TenantSecretKey tenantSecretKey = keyConfig.get();
TenantGameQuota tenantGameQuota = tenantGameQuotaService.selectTenantGameQuotaByTenantKey(tenantSecretKey.getTenantKey(), QuotaType.BALANCE.getCode());
TenantInfoResponse tenantInfoResponse= new TenantInfoResponse();
BeanUtils.copyProperties(tenantGameQuota,tenantInfoResponse);
TenantInfoResponse tenantInfoResponse = new TenantInfoResponse();
BeanUtils.copyProperties(tenantGameQuota, tenantInfoResponse);
return AjaxResult.success(tenantInfoResponse);
}

View File

@ -1,25 +1,19 @@
package com.ff.common.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ff.base.annotation.Log;
import com.ff.base.core.controller.BaseController;
import com.ff.base.core.domain.AjaxResult;
import com.ff.base.enums.BusinessType;
import com.ff.common.domain.TenantGameQuota;
import com.ff.common.service.ITenantGameQuotaService;
import com.ff.base.utils.poi.ExcelUtil;
import com.ff.base.core.page.TableDataInfo;
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
@ -29,8 +23,7 @@ import com.ff.base.core.page.TableDataInfo;
*/
@RestController
@RequestMapping("/common/quota")
public class TenantGameQuotaController extends BaseController
{
public class TenantGameQuotaController extends BaseController {
@Autowired
private ITenantGameQuotaService tenantGameQuotaService;
@ -39,8 +32,7 @@ public class TenantGameQuotaController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('common:quota:list')")
@GetMapping("/list")
public TableDataInfo list(TenantGameQuota tenantGameQuota)
{
public TableDataInfo list(TenantGameQuota tenantGameQuota) {
startPage();
List<TenantGameQuota> list = tenantGameQuotaService.selectTenantGameQuotaList(tenantGameQuota);
return getDataTable(list);
@ -52,8 +44,7 @@ public class TenantGameQuotaController extends BaseController
@PreAuthorize("@ss.hasPermi('common:quota:export')")
@Log(title = "租户游戏配额", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, TenantGameQuota tenantGameQuota)
{
public void export(HttpServletResponse response, TenantGameQuota tenantGameQuota) {
List<TenantGameQuota> list = tenantGameQuotaService.selectTenantGameQuotaList(tenantGameQuota);
ExcelUtil<TenantGameQuota> util = new ExcelUtil<TenantGameQuota>(TenantGameQuota.class);
util.exportExcel(response, list, "租户游戏配额数据");
@ -64,8 +55,7 @@ public class TenantGameQuotaController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('common:quota:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(tenantGameQuotaService.selectTenantGameQuotaById(id));
}
@ -75,8 +65,7 @@ public class TenantGameQuotaController extends BaseController
@PreAuthorize("@ss.hasPermi('common:quota:add')")
@Log(title = "租户游戏配额", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TenantGameQuota tenantGameQuota)
{
public AjaxResult add(@RequestBody TenantGameQuota tenantGameQuota) {
return toAjax(tenantGameQuotaService.insertTenantGameQuota(tenantGameQuota));
}
@ -86,8 +75,7 @@ public class TenantGameQuotaController extends BaseController
@PreAuthorize("@ss.hasPermi('common:quota:edit')")
@Log(title = "租户游戏配额", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TenantGameQuota tenantGameQuota)
{
public AjaxResult edit(@RequestBody TenantGameQuota tenantGameQuota) {
return toAjax(tenantGameQuotaService.updateTenantGameQuota(tenantGameQuota));
}
@ -96,9 +84,8 @@ public class TenantGameQuotaController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('common:quota:remove')")
@Log(title = "租户游戏配额", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(tenantGameQuotaService.deleteTenantGameQuotaByIds(ids));
}
}

View File

@ -1,25 +1,19 @@
package com.ff.common.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ff.base.annotation.Log;
import com.ff.base.core.controller.BaseController;
import com.ff.base.core.domain.AjaxResult;
import com.ff.base.enums.BusinessType;
import com.ff.common.domain.TenantGameQuotaFlow;
import com.ff.common.service.ITenantGameQuotaFlowService;
import com.ff.base.utils.poi.ExcelUtil;
import com.ff.base.core.page.TableDataInfo;
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
@ -29,8 +23,7 @@ import com.ff.base.core.page.TableDataInfo;
*/
@RestController
@RequestMapping("/common/flow")
public class TenantGameQuotaFlowController extends BaseController
{
public class TenantGameQuotaFlowController extends BaseController {
@Autowired
private ITenantGameQuotaFlowService tenantGameQuotaFlowService;
@ -39,8 +32,7 @@ public class TenantGameQuotaFlowController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('common:flow:list')")
@GetMapping("/list")
public TableDataInfo list(TenantGameQuotaFlow tenantGameQuotaFlow)
{
public TableDataInfo list(TenantGameQuotaFlow tenantGameQuotaFlow) {
startPage();
List<TenantGameQuotaFlow> list = tenantGameQuotaFlowService.selectTenantGameQuotaFlowList(tenantGameQuotaFlow);
return getDataTable(list);
@ -52,8 +44,7 @@ public class TenantGameQuotaFlowController extends BaseController
@PreAuthorize("@ss.hasPermi('common:flow:export')")
@Log(title = "租户游戏额度流水", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, TenantGameQuotaFlow tenantGameQuotaFlow)
{
public void export(HttpServletResponse response, TenantGameQuotaFlow tenantGameQuotaFlow) {
List<TenantGameQuotaFlow> list = tenantGameQuotaFlowService.selectTenantGameQuotaFlowList(tenantGameQuotaFlow);
ExcelUtil<TenantGameQuotaFlow> util = new ExcelUtil<TenantGameQuotaFlow>(TenantGameQuotaFlow.class);
util.exportExcel(response, list, "租户游戏额度流水数据");
@ -64,8 +55,7 @@ public class TenantGameQuotaFlowController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('common:flow:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(tenantGameQuotaFlowService.selectTenantGameQuotaFlowById(id));
}
@ -75,8 +65,7 @@ public class TenantGameQuotaFlowController extends BaseController
@PreAuthorize("@ss.hasPermi('common:flow:add')")
@Log(title = "租户游戏额度流水", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TenantGameQuotaFlow tenantGameQuotaFlow)
{
public AjaxResult add(@RequestBody TenantGameQuotaFlow tenantGameQuotaFlow) {
return toAjax(tenantGameQuotaFlowService.insertTenantGameQuotaFlow(tenantGameQuotaFlow));
}
@ -86,8 +75,7 @@ public class TenantGameQuotaFlowController extends BaseController
@PreAuthorize("@ss.hasPermi('common:flow:edit')")
@Log(title = "租户游戏额度流水", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TenantGameQuotaFlow tenantGameQuotaFlow)
{
public AjaxResult edit(@RequestBody TenantGameQuotaFlow tenantGameQuotaFlow) {
return toAjax(tenantGameQuotaFlowService.updateTenantGameQuotaFlow(tenantGameQuotaFlow));
}
@ -96,9 +84,8 @@ public class TenantGameQuotaFlowController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('common:flow:remove')")
@Log(title = "租户游戏额度流水", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(tenantGameQuotaFlowService.deleteTenantGameQuotaFlowByIds(ids));
}
}

View File

@ -1,25 +1,19 @@
package com.ff.common.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ff.base.annotation.Log;
import com.ff.base.core.controller.BaseController;
import com.ff.base.core.domain.AjaxResult;
import com.ff.base.enums.BusinessType;
import com.ff.common.domain.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.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
@ -29,8 +23,7 @@ import com.ff.base.core.page.TableDataInfo;
*/
@RestController
@RequestMapping("/common/exchange")
public class TenantQuotaExchangeController extends BaseController
{
public class TenantQuotaExchangeController extends BaseController {
@Autowired
private ITenantQuotaExchangeService tenantQuotaExchangeService;
@ -39,8 +32,7 @@ public class TenantQuotaExchangeController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('common:exchange:list')")
@GetMapping("/list")
public TableDataInfo list(TenantQuotaExchange tenantQuotaExchange)
{
public TableDataInfo list(TenantQuotaExchange tenantQuotaExchange) {
startPage();
List<TenantQuotaExchange> list = tenantQuotaExchangeService.selectTenantQuotaExchangeList(tenantQuotaExchange);
return getDataTable(list);
@ -52,8 +44,7 @@ public class TenantQuotaExchangeController extends BaseController
@PreAuthorize("@ss.hasPermi('common:exchange:export')")
@Log(title = "币种汇率", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, TenantQuotaExchange tenantQuotaExchange)
{
public void export(HttpServletResponse response, TenantQuotaExchange tenantQuotaExchange) {
List<TenantQuotaExchange> list = tenantQuotaExchangeService.selectTenantQuotaExchangeList(tenantQuotaExchange);
ExcelUtil<TenantQuotaExchange> util = new ExcelUtil<TenantQuotaExchange>(TenantQuotaExchange.class);
util.exportExcel(response, list, "币种汇率数据");
@ -64,8 +55,7 @@ public class TenantQuotaExchangeController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('common:exchange:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(tenantQuotaExchangeService.selectTenantQuotaExchangeById(id));
}
@ -75,8 +65,7 @@ public class TenantQuotaExchangeController extends BaseController
@PreAuthorize("@ss.hasPermi('common:exchange:add')")
@Log(title = "币种汇率", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TenantQuotaExchange tenantQuotaExchange)
{
public AjaxResult add(@RequestBody TenantQuotaExchange tenantQuotaExchange) {
return toAjax(tenantQuotaExchangeService.insertTenantQuotaExchange(tenantQuotaExchange));
}
@ -86,8 +75,7 @@ public class TenantQuotaExchangeController extends BaseController
@PreAuthorize("@ss.hasPermi('common:exchange:edit')")
@Log(title = "币种汇率", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TenantQuotaExchange tenantQuotaExchange)
{
public AjaxResult edit(@RequestBody TenantQuotaExchange tenantQuotaExchange) {
return toAjax(tenantQuotaExchangeService.updateTenantQuotaExchange(tenantQuotaExchange));
}
@ -96,9 +84,8 @@ public class TenantQuotaExchangeController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('common:exchange:remove')")
@Log(title = "币种汇率", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(tenantQuotaExchangeService.deleteTenantQuotaExchangeByIds(ids));
}
}

View File

@ -5,6 +5,7 @@ import com.ff.base.system.domain.SysDatasource;
import com.ff.base.system.mapper.SysDatasourceMapper;
import com.ff.base.system.service.ISysConfigService;
import com.ff.base.system.service.ISysDictTypeService;
import com.ff.game.service.IPlatformBiz;
import com.ff.game.service.IPlatformService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
@ -38,6 +39,10 @@ public class ContentRefreshedEventListener implements ApplicationListener<Contex
@Resource
private IPlatformService platformService;
@Resource
private IPlatformBiz platformBiz;
/**
*
*
@ -55,6 +60,6 @@ public class ContentRefreshedEventListener implements ApplicationListener<Contex
sysConfigService.loadingConfigCache();
sysDictTypeService.loadingDictCache();
platformService.loadToCache();
platformBiz.loadToCache();
}
}

View File

@ -4,7 +4,7 @@ import com.dtflys.forest.callback.AddressSource;
import com.dtflys.forest.http.ForestAddress;
import com.dtflys.forest.http.ForestRequest;
import com.ff.base.enums.GamePlatforms;
import com.ff.game.service.IPlatformService;
import com.ff.game.service.IPlatformBiz;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
@ -20,11 +20,11 @@ import javax.annotation.Resource;
public class MyAEAddressSource implements AddressSource {
@Resource
private IPlatformService platformService;
private IPlatformBiz platformBiz;
@Override
public ForestAddress getAddress(ForestRequest request) {
String apiBaseUrl = platformService.get(GamePlatforms.AE.getCode())
String apiBaseUrl = platformBiz.get(GamePlatforms.AE.getCode())
.getUrlInfo().getUrl();
return new ForestAddress("https", apiBaseUrl, 443, "");
}

View File

@ -13,8 +13,6 @@ import com.ff.base.utils.DateUtils;
import com.ff.base.utils.JsonUtil;
import com.ff.base.utils.StringUtils;
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.delay.DelayService;
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.dto.*;
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.domain.*;
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.member.domain.Member;
import com.ff.member.service.IMemberService;
import com.ff.tenant.service.ITenantGameQuotaService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -280,7 +278,7 @@ public class GamesAEServiceImpl implements IGamesService {
params.put("withdrawType", 1);
deposit = AEClient.withdraw(params);
}
}finally {
} finally {
BigDecimal coinBefore;
if (TransferType.GAMES.getCode().equals(exchangeTransferMoneyRequestDTO.getTransferType())) {
coinBefore = NumberUtil.sub(deposit.getCurrentBalance(), deposit.getAmount());
@ -342,7 +340,6 @@ public class GamesAEServiceImpl implements IGamesService {
}
return ExchangeTransferStatusResponseDTO.builder()
.statusType(status)
.balance(exchangeTransferStatusResponse.getTransferAmount())

View File

@ -4,6 +4,7 @@ import com.dtflys.forest.callback.AddressSource;
import com.dtflys.forest.http.ForestAddress;
import com.dtflys.forest.http.ForestRequest;
import com.ff.base.enums.GamePlatforms;
import com.ff.game.service.IPlatformBiz;
import com.ff.game.service.IPlatformService;
import org.springframework.stereotype.Component;
@ -20,11 +21,11 @@ import javax.annotation.Resource;
public class MyDGAddressSource implements AddressSource {
@Resource
private IPlatformService platformService;
private IPlatformBiz platformBiz;
@Override
public ForestAddress getAddress(ForestRequest request) {
String apiBaseUrl = platformService.get(GamePlatforms.DG.getCode())
String apiBaseUrl = platformBiz.get(GamePlatforms.DG.getCode())
.getUrlInfo().getUrl();
return new ForestAddress("http", apiBaseUrl, 80, "");
}

View File

@ -4,6 +4,7 @@ import com.dtflys.forest.callback.AddressSource;
import com.dtflys.forest.http.ForestAddress;
import com.dtflys.forest.http.ForestRequest;
import com.ff.base.enums.GamePlatforms;
import com.ff.game.service.IPlatformBiz;
import com.ff.game.service.IPlatformService;
import org.springframework.stereotype.Component;
@ -13,7 +14,7 @@ import javax.annotation.Resource;
public class MyFCAddressSource implements AddressSource {
@Resource
private IPlatformService platformService;
private IPlatformBiz platformService;
@Override

View File

@ -19,10 +19,7 @@ import com.ff.game.api.fc.client.FCClient;
import com.ff.game.api.fc.dto.*;
import com.ff.game.api.request.*;
import com.ff.game.domain.*;
import com.ff.game.service.IGameBettingDetailsService;
import com.ff.game.service.IGameExchangeMoneyService;
import com.ff.game.service.IGameService;
import com.ff.game.service.IPlatformService;
import com.ff.game.service.*;
import com.ff.member.domain.Member;
import com.ff.member.service.IMemberService;
import lombok.extern.slf4j.Slf4j;
@ -60,6 +57,8 @@ public class GamesFCServiceImpl implements IGamesService {
@Resource
private IGameExchangeMoneyService gameExchangeMoneyService;
@Resource
private IGameExchangeMoneyBiz gameExchangeMoneyBiz;
@Resource
private IGameService gameService;
@ -314,7 +313,7 @@ public class GamesFCServiceImpl implements IGamesService {
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(
GameExchangeMoney.builder()
.tenantKey(exchangeTransferMoneyRequestDTO.getTenantKey())

View File

@ -4,6 +4,7 @@ import com.dtflys.forest.callback.AddressSource;
import com.dtflys.forest.http.ForestAddress;
import com.dtflys.forest.http.ForestRequest;
import com.ff.base.enums.GamePlatforms;
import com.ff.game.service.IPlatformBiz;
import com.ff.game.service.IPlatformService;
import org.springframework.stereotype.Component;
@ -20,7 +21,7 @@ import javax.annotation.Resource;
public class MyJILIAddressSource implements AddressSource {
@Resource
private IPlatformService platformService;
private IPlatformBiz platformService;
@Override
public ForestAddress getAddress(ForestRequest request) {

View File

@ -15,15 +15,11 @@ import com.ff.base.utils.sign.Md5Utils;
import com.ff.base.utils.uuid.IdUtils;
import com.ff.config.KeyConfig;
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.dto.*;
import com.ff.game.api.request.*;
import com.ff.game.domain.*;
import com.ff.game.service.IGameBettingDetailsService;
import com.ff.game.service.IGameExchangeMoneyService;
import com.ff.game.service.IGameFreeRecordService;
import com.ff.game.service.IGameService;
import com.ff.game.service.*;
import com.ff.member.domain.Member;
import com.ff.member.service.IMemberService;
import lombok.extern.slf4j.Slf4j;
@ -63,6 +59,8 @@ public class GamesJILIServiceImpl implements IGamesService {
@Resource
private IGameService gameService;
@Resource
private IGameBiz gameBiz;
@Resource
@ -503,7 +501,7 @@ public class GamesJILIServiceImpl implements IGamesService {
List<Long> gameIds = createFreeSpinRequest.getGameIds();
GameUniqueDTO gameUniqueDTO = new GameUniqueDTO();
gameUniqueDTO.setGameIds(gameIds);
List<Game> gameList = gameService.selectGameUniqueList(gameUniqueDTO);
List<Game> gameList = gameBiz.selectGameUniqueList(gameUniqueDTO);
String gameCodes = gameList.stream()
.map(Game::getGameCode)
.map(String::valueOf)

View File

@ -4,6 +4,7 @@ import com.dtflys.forest.callback.AddressSource;
import com.dtflys.forest.http.ForestAddress;
import com.dtflys.forest.http.ForestRequest;
import com.ff.base.enums.GamePlatforms;
import com.ff.game.service.IPlatformBiz;
import com.ff.game.service.IPlatformService;
import org.springframework.stereotype.Component;
@ -20,7 +21,7 @@ import javax.annotation.Resource;
public class MyKMAddressSource implements AddressSource {
@Resource
private IPlatformService platformService;
private IPlatformBiz platformService;
@Override
public ForestAddress getAddress(ForestRequest request) {

View File

@ -22,10 +22,7 @@ import com.ff.game.api.km.dto.*;
import com.ff.game.api.request.*;
import com.ff.game.api.xk.dto.XKGamesDTO;
import com.ff.game.domain.*;
import com.ff.game.service.IGameBettingDetailsService;
import com.ff.game.service.IGameExchangeMoneyService;
import com.ff.game.service.IGameService;
import com.ff.game.service.IPlatformService;
import com.ff.game.service.*;
import com.ff.member.domain.Member;
import com.ff.member.service.IMemberService;
import lombok.extern.slf4j.Slf4j;
@ -55,6 +52,8 @@ public class GamesKMServiceImpl implements IGamesService {
@Resource
private IPlatformService platformService;
@Resource
private IPlatformBiz platformBiz;
@Resource
private RedisCache redisCache;
@ -191,7 +190,7 @@ public class GamesKMServiceImpl implements IGamesService {
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()
+ "&gcode=" + gamesLogin.getGameId()
@ -595,7 +594,7 @@ public class GamesKMServiceImpl implements IGamesService {
log.info("GamesKMServiceImpl [gameDemoLogin] 请求参数 {}", gameDemoLoginRequestDTO);
Map<String, Object> params = new LinkedHashMap<>();
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);
return GameDemoLoginResponseDTO.builder()
.url(loginUrl + "/demolauncher?gpcode=" + gameDemoLoginRequestDTO.getGameType()

View File

@ -4,7 +4,7 @@ import com.dtflys.forest.callback.AddressSource;
import com.dtflys.forest.http.ForestAddress;
import com.dtflys.forest.http.ForestRequest;
import com.ff.base.enums.GamePlatforms;
import com.ff.game.service.IPlatformService;
import com.ff.game.service.IPlatformBiz;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
@ -18,7 +18,7 @@ import javax.annotation.Resource;
public class MeiTianAddressSource implements AddressSource {
@Resource
private IPlatformService platformService;
private IPlatformBiz platformService;
@Override
public ForestAddress getAddress(ForestRequest request) {

View File

@ -4,7 +4,7 @@ import com.dtflys.forest.callback.AddressSource;
import com.dtflys.forest.http.ForestAddress;
import com.dtflys.forest.http.ForestRequest;
import com.ff.base.enums.GamePlatforms;
import com.ff.game.service.IPlatformService;
import com.ff.game.service.IPlatformBiz;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
@ -13,7 +13,7 @@ import javax.annotation.Resource;
public class MyNGAddressSource implements AddressSource {
@Resource
private IPlatformService platformService;
private IPlatformBiz platformService;
@Override

View File

@ -21,9 +21,7 @@ import com.ff.game.api.request.*;
import com.ff.game.domain.*;
import com.ff.game.dto.GameBettingDetailsDTO;
import com.ff.game.dto.GameDTO;
import com.ff.game.service.IGameBettingDetailsService;
import com.ff.game.service.IGameExchangeMoneyService;
import com.ff.game.service.IGameService;
import com.ff.game.service.*;
import com.ff.member.domain.Member;
import com.ff.member.service.IMemberService;
import lombok.extern.slf4j.Slf4j;
@ -67,9 +65,13 @@ public class GamesPGServiceImpl implements IGamesService {
@Resource
private IGameExchangeMoneyService gameExchangeMoneyService;
@Resource
private IGameExchangeMoneyBiz gameExchangeMoneyBiz;
@Resource
private IGameService gameService;
@Resource
private IGameBiz gameBiz;
@Resource
@ -286,7 +288,7 @@ public class GamesPGServiceImpl implements IGamesService {
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(
GameExchangeMoney.builder()
.tenantKey(exchangeTransferMoneyRequestDTO.getTenantKey())
@ -679,7 +681,7 @@ public class GamesPGServiceImpl implements IGamesService {
}
String platform = ngPlatforms.getPlatform();
List<Game> games = gameService.selectGameDTOList(GameDTO.builder()
List<Game> games = gameBiz.selectGameDTOList(GameDTO.builder()
.gameName(resultBean.getGameName())
.platformCode(platform)
.build());

View File

@ -3,10 +3,8 @@ package com.ff.game.api.pgt.address;
import com.dtflys.forest.callback.AddressSource;
import com.dtflys.forest.http.ForestAddress;
import com.dtflys.forest.http.ForestRequest;
import com.ff.base.constant.Constants;
import com.ff.base.enums.GamePlatforms;
import com.ff.base.system.service.ISysConfigService;
import com.ff.game.service.IPlatformService;
import com.ff.game.service.IPlatformBiz;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
@ -21,15 +19,12 @@ import javax.annotation.Resource;
@Component
public class MyPGTAddressSource implements AddressSource {
@Resource
private IPlatformService platformService;
@Resource
private ISysConfigService configService;
private IPlatformBiz platformService;
@Override
public ForestAddress getAddress(ForestRequest request) {
String apiBaseUrl = platformService.get(GamePlatforms.PGT.getCode())
.getUrlInfo().getUrl();
return new ForestAddress("https",apiBaseUrl, 443,"");
return new ForestAddress("https", apiBaseUrl, 443, "");
}
}

View File

@ -66,6 +66,8 @@ public class GamesPGTServiceImpl implements IGamesService {
@Resource
private IGameExchangeMoneyService gameExchangeMoneyService;
@Resource
private IGameExchangeMoneyBiz gameExchangeMoneyBiz;
@Resource
private IGameService gameService;
@ -272,7 +274,7 @@ public class GamesPGTServiceImpl implements IGamesService {
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(
GameExchangeMoney.builder()
.tenantKey(exchangeTransferMoneyRequestDTO.getTenantKey())

View File

@ -4,6 +4,7 @@ import com.dtflys.forest.callback.AddressSource;
import com.dtflys.forest.http.ForestAddress;
import com.dtflys.forest.http.ForestRequest;
import com.ff.base.enums.GamePlatforms;
import com.ff.game.service.IPlatformBiz;
import com.ff.game.service.IPlatformService;
import org.springframework.stereotype.Component;
@ -20,7 +21,7 @@ import javax.annotation.Resource;
public class MyPGXAddressSource implements AddressSource {
@Resource
private IPlatformService platformService;
private IPlatformBiz platformService;
@Override
public ForestAddress getAddress(ForestRequest request) {

View File

@ -21,6 +21,7 @@ import com.ff.game.api.pgx.dto.*;
import com.ff.game.api.request.*;
import com.ff.game.domain.*;
import com.ff.game.service.IGameBettingDetailsService;
import com.ff.game.service.IGameExchangeMoneyBiz;
import com.ff.game.service.IGameExchangeMoneyService;
import com.ff.game.service.IGameService;
import com.ff.member.domain.Member;
@ -62,6 +63,8 @@ public class GamesPGXServiceImpl implements IGamesService {
@Resource
private IGameExchangeMoneyService gameExchangeMoneyService;
@Resource
private IGameExchangeMoneyBiz gameExchangeMoneyBiz;
@Resource
private IGameService gameService;
@ -279,7 +282,7 @@ public class GamesPGXServiceImpl implements IGamesService {
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(
GameExchangeMoney.builder()
.tenantKey(exchangeTransferMoneyRequestDTO.getTenantKey())

View File

@ -4,6 +4,7 @@ import com.dtflys.forest.callback.AddressSource;
import com.dtflys.forest.http.ForestAddress;
import com.dtflys.forest.http.ForestRequest;
import com.ff.base.enums.GamePlatforms;
import com.ff.game.service.IPlatformBiz;
import com.ff.game.service.IPlatformService;
import org.springframework.stereotype.Component;
@ -20,7 +21,7 @@ import javax.annotation.Resource;
public class MySAAddressSource implements AddressSource {
@Resource
private IPlatformService platformService;
private IPlatformBiz platformService;
@Override

View File

@ -4,6 +4,7 @@ import com.dtflys.forest.callback.AddressSource;
import com.dtflys.forest.http.ForestAddress;
import com.dtflys.forest.http.ForestRequest;
import com.ff.base.enums.GamePlatforms;
import com.ff.game.service.IPlatformBiz;
import com.ff.game.service.IPlatformService;
import org.springframework.stereotype.Component;
@ -20,7 +21,7 @@ import javax.annotation.Resource;
public class SV388Adrress implements AddressSource {
@Resource
private IPlatformService platformService;
private IPlatformBiz platformService;
@Override
public ForestAddress getAddress(ForestRequest request) {

View File

@ -4,6 +4,7 @@ import com.dtflys.forest.callback.AddressSource;
import com.dtflys.forest.http.ForestAddress;
import com.dtflys.forest.http.ForestRequest;
import com.ff.base.enums.GamePlatforms;
import com.ff.game.service.IPlatformBiz;
import com.ff.game.service.IPlatformService;
import org.springframework.stereotype.Component;
@ -20,7 +21,7 @@ import javax.annotation.Resource;
public class MyXKAddressSource implements AddressSource {
@Resource
private IPlatformService platformService;
private IPlatformBiz platformService;
@Override
public ForestAddress getAddress(ForestRequest request) {

View File

@ -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();
}

View File

@ -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);
}
}

View File

@ -6,7 +6,6 @@ import com.ff.base.datasource.DynamicDataSourceContextHolder;
import com.ff.game.domain.Platform;
import com.ff.game.mapper.PlatformMapper;
import com.ff.game.service.IPlatformBiz;
import com.ff.game.service.IPlatformService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -32,7 +31,7 @@ public class PlatformBizImpl implements IPlatformBiz {
Object key = entry.getKey();
// 设置数据源类型
DynamicDataSourceContextHolder.setDataSourceType(key.toString());
List<Platform> list = selectList(new Platform());
List<Platform> list = platformMapper.selectList(new Platform());
for (Platform pp : list) {
redisCache.setCacheObject(getCacheKey(pp.getPlatformCode()), pp);
}

View File

@ -4,6 +4,7 @@ import com.dtflys.forest.callback.AddressSource;
import com.dtflys.forest.http.ForestAddress;
import com.dtflys.forest.http.ForestRequest;
import com.ff.base.enums.GamePlatforms;
import com.ff.game.service.IPlatformBiz;
import com.ff.game.service.IPlatformService;
import org.springframework.stereotype.Component;
@ -21,7 +22,7 @@ import javax.annotation.Resource;
public class DBSportsAddress implements AddressSource {
@Resource
private IPlatformService platformService;
private IPlatformBiz platformService;
@Override
public ForestAddress getAddress(ForestRequest request) {

View File

@ -4,6 +4,7 @@ import com.dtflys.forest.callback.AddressSource;
import com.dtflys.forest.http.ForestAddress;
import com.dtflys.forest.http.ForestRequest;
import com.ff.base.enums.GamePlatforms;
import com.ff.game.service.IPlatformBiz;
import com.ff.game.service.IPlatformService;
import org.springframework.stereotype.Component;
@ -19,7 +20,7 @@ import javax.annotation.Resource;
public class FBSportsAddress implements AddressSource {
@Resource
private IPlatformService platformService;
private IPlatformBiz platformService;
@Override
public ForestAddress getAddress(ForestRequest request) {

View File

@ -1,19 +1,10 @@
package com.ff.tenant.controller;
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.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.dto.GameBettingDetailsDTO;
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.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@ -46,8 +37,7 @@ public class TenantBettingDetailsController extends BaseController {
*/
@PreAuthorize("@ss.hasPermi('tenant:betting:list')")
@GetMapping("/list")
public TableDataInfo list(GameBettingDetailsDTO gameBettingDetails)
{
public TableDataInfo list(GameBettingDetailsDTO gameBettingDetails) {
gameBettingDetails.setTenantKey(getUsername());
startPage();
List<GameBettingDetails> gameBettingDetailsList = gameBettingDetailsService.selectGameBettingDetailsList(gameBettingDetails);

View File

@ -4,15 +4,16 @@ import com.ff.base.core.controller.BaseController;
import com.ff.base.core.domain.AjaxResult;
import com.ff.base.system.domain.TenantPlatform;
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.ITenantSecretKeyService;
import com.ff.common.domain.TenantGameQuota;
import com.ff.common.service.ITenantGameQuotaService;
import com.ff.tenant.dto.TenantDTO;
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 org.springframework.web.bind.annotation.GetMapping;
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;
@ -57,8 +58,8 @@ public class TenantController extends BaseController {
@GetMapping("/platforms/{currencyCode}")
public AjaxResult getTenantPlatformsInfo(@PathVariable("currencyCode") String currencyCode) {
return success(tenantPlatformService.selectTenantPlatformList(TenantPlatform.builder()
.currencyCode(currencyCode)
.tenantId(getUserId())
.currencyCode(currencyCode)
.tenantId(getUserId())
.build()));
}

View File

@ -6,6 +6,7 @@ import com.ff.game.domain.GameBettingDetails;
import com.ff.game.domain.GameExchangeMoney;
import com.ff.game.dto.GameExchangeMoneyDTO;
import com.ff.game.service.IGameBettingDetailsService;
import com.ff.game.service.IGameExchangeMoneyBiz;
import com.ff.game.service.IGameExchangeMoneyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
@ -31,6 +32,8 @@ public class TenantExchangeController extends BaseController {
@Resource
private IGameExchangeMoneyService gameExchangeMoneyService;
@Resource
private IGameExchangeMoneyBiz gameExchangeMoneyBiz;
/**
*
@ -43,7 +46,7 @@ public class TenantExchangeController extends BaseController {
public TableDataInfo list(GameExchangeMoneyDTO gameExchangeMoneyDTO) {
gameExchangeMoneyDTO.setTenantKey(getUsername());
startPage();
List<GameExchangeMoneyDTO> gameExchangeMoneyDTOS = gameExchangeMoneyService.selectGameExchangeMoneyDTOList(gameExchangeMoneyDTO);
List<GameExchangeMoneyDTO> gameExchangeMoneyDTOS = gameExchangeMoneyBiz.selectGameExchangeMoneyDTOList(gameExchangeMoneyDTO);
return getDataTable(gameExchangeMoneyDTOS);
}

View File

@ -3,10 +3,7 @@ package com.ff.tenant.controller;
import com.ff.base.core.controller.BaseController;
import com.ff.base.core.page.TableDataInfo;
import com.ff.common.domain.TenantGameQuotaFlow;
import com.ff.common.service.ITenantGameQuotaFlowService;
import com.ff.game.domain.GameBettingDetails;
import com.ff.game.service.IGameBettingDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import com.ff.tenant.service.ITenantGameQuotaFlowService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@ -27,7 +24,6 @@ import java.util.List;
public class TenantQuotaFlowController extends BaseController {
@Resource
private ITenantGameQuotaFlowService tenantGameQuotaFlowService;
@ -40,8 +36,7 @@ public class TenantQuotaFlowController extends BaseController {
*/
@PreAuthorize("@ss.hasPermi('tenant:quota:flow:list')")
@GetMapping("/list")
public TableDataInfo list(TenantGameQuotaFlow tenantGameQuotaFlow)
{
public TableDataInfo list(TenantGameQuotaFlow tenantGameQuotaFlow) {
tenantGameQuotaFlow.setTenantKey(getUsername());
startPage();
List<TenantGameQuotaFlow> tenantGameQuotaFlows = tenantGameQuotaFlowService.selectTenantGameQuotaFlowList(tenantGameQuotaFlow);

View File

@ -24,7 +24,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateTime" column="update_time" />
</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 g.id,
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>
</where>
</select>
<sql id="selectGameVo">
select * from ff_game
</sql>
<select id="selectGameResponseList" resultMap="GameResponseResultMap">
select
g.game_id,