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

- 重命名 GameBettingDetailsServiceImpl 为 GameBettingDetailsBizImpl
- 新增 GameBettingDetailsBizMapper 接口和对应的 XML 文件- 重命名 GameExchangeMoneyServiceImpl 为 GameExchangeMoneyBizImpl- 新增 GameExchangeMoneyBizMapper 接口和对应的 XML 文件- 删除 GameFreeRecordServiceImpl 类- 更新 GameMapper.xml,简化查询语句
- 重命名 GameServiceImpl 中的 memberService 和 gamesService 字段
main-pp
liaoyong 2025-04-12 14:10:35 +08:00
parent 4894bd7784
commit 974800f5b6
60 changed files with 1013 additions and 2728 deletions

View File

@ -7,59 +7,58 @@ import java.util.List;
/**
* Mapper
*
*
* @author shi
* @date 2025-02-26
*/
public interface TenantAgentCommissionMapper
{
public interface TenantAgentCommissionMapper {
/**
*
*
*
*
* @param id
* @return
* @return
*/
TenantAgentCommission selectTenantAgentCommissionById(Long id);
TenantAgentCommission selectTenantAgentCommissionById(Long id);
/**
*
*
* @param tenantAgentCommission
*
* @param tenantAgentCommission
* @return
*/
List<TenantAgentCommission> selectTenantAgentCommissionList(TenantAgentCommission tenantAgentCommission);
List<TenantAgentCommission> selectTenantAgentCommissionList(TenantAgentCommission tenantAgentCommission);
/**
*
*
* @param tenantAgentCommission
*
*
* @param tenantAgentCommission
* @return
*/
int insertTenantAgentCommission(TenantAgentCommission tenantAgentCommission);
int insertTenantAgentCommission(TenantAgentCommission tenantAgentCommission);
/**
*
*
* @param tenantAgentCommission
*
*
* @param tenantAgentCommission
* @return
*/
int updateTenantAgentCommission(TenantAgentCommission tenantAgentCommission);
int updateTenantAgentCommission(TenantAgentCommission tenantAgentCommission);
/**
*
*
*
*
* @param id
* @return
*/
int deleteTenantAgentCommissionById(Long id);
int deleteTenantAgentCommissionById(Long id);
/**
*
*
*
*
* @param ids
* @return
*/
int deleteTenantAgentCommissionByIds(Long[] ids);
int deleteTenantAgentCommissionByIds(Long[] ids);
/**

View File

@ -6,19 +6,18 @@ import java.util.List;
/**
* Mapper
*
*
* @author shi
* @date 2025-02-25
*/
public interface TenantAgentInviteMapper
{
public interface TenantAgentInviteMapper {
/**
*
*
*
* @param id
* @return
*/
TenantAgentInvite selectTenantAgentInviteById(Long id);
TenantAgentInvite selectTenantAgentInviteById(Long id);
/**
@ -31,41 +30,41 @@ public interface TenantAgentInviteMapper
/**
*
*
*
* @param tenantAgentInvite
* @return
*/
List<TenantAgentInvite> selectTenantAgentInviteList(TenantAgentInvite tenantAgentInvite);
List<TenantAgentInvite> selectTenantAgentInviteList(TenantAgentInvite tenantAgentInvite);
/**
*
*
*
* @param tenantAgentInvite
* @return
*/
int insertTenantAgentInvite(TenantAgentInvite tenantAgentInvite);
int insertTenantAgentInvite(TenantAgentInvite tenantAgentInvite);
/**
*
*
*
* @param tenantAgentInvite
* @return
*/
int updateTenantAgentInvite(TenantAgentInvite tenantAgentInvite);
int updateTenantAgentInvite(TenantAgentInvite tenantAgentInvite);
/**
*
*
*
* @param id
* @return
*/
int deleteTenantAgentInviteById(Long id);
int deleteTenantAgentInviteById(Long id);
/**
*
*
*
* @param ids
* @return
*/
int deleteTenantAgentInviteByIds(Long[] ids);
int deleteTenantAgentInviteByIds(Long[] ids);
}

View File

@ -6,57 +6,56 @@ import java.util.List;
/**
* Mapper
*
*
* @author shi
* @date 2025-02-27
*/
public interface TenantAgentInvitePlatformMapper
{
public interface TenantAgentInvitePlatformMapper {
/**
*
*
*
* @param id
* @return
*/
TenantAgentInvitePlatform selectTenantAgentInvitePlatformById(Long id);
TenantAgentInvitePlatform selectTenantAgentInvitePlatformById(Long id);
/**
*
*
*
* @param tenantAgentInvitePlatform
* @return
*/
List<TenantAgentInvitePlatform> selectTenantAgentInvitePlatformList(TenantAgentInvitePlatform tenantAgentInvitePlatform);
List<TenantAgentInvitePlatform> selectTenantAgentInvitePlatformList(TenantAgentInvitePlatform tenantAgentInvitePlatform);
/**
*
*
*
* @param tenantAgentInvitePlatform
* @return
*/
int insertTenantAgentInvitePlatform(TenantAgentInvitePlatform tenantAgentInvitePlatform);
int insertTenantAgentInvitePlatform(TenantAgentInvitePlatform tenantAgentInvitePlatform);
/**
*
*
*
* @param tenantAgentInvitePlatform
* @return
*/
int updateTenantAgentInvitePlatform(TenantAgentInvitePlatform tenantAgentInvitePlatform);
int updateTenantAgentInvitePlatform(TenantAgentInvitePlatform tenantAgentInvitePlatform);
/**
*
*
*
* @param id
* @return
*/
int deleteTenantAgentInvitePlatformById(Long id);
int deleteTenantAgentInvitePlatformById(Long id);
/**
*
*
*
* @param ids
* @return
*/
int deleteTenantAgentInvitePlatformByIds(Long[] ids);
int deleteTenantAgentInvitePlatformByIds(Long[] ids);
}

View File

@ -6,57 +6,56 @@ import java.util.List;
/**
* Mapper
*
*
* @author shi
* @date 2025-02-26
*/
public interface TenantAgentWithdrawalMapper
{
public interface TenantAgentWithdrawalMapper {
/**
*
*
*
* @param id
* @return
*/
TenantAgentWithdrawal selectTenantAgentWithdrawalById(Long id);
TenantAgentWithdrawal selectTenantAgentWithdrawalById(Long id);
/**
*
*
*
* @param tenantAgentWithdrawal
* @return
*/
List<TenantAgentWithdrawal> selectTenantAgentWithdrawalList(TenantAgentWithdrawal tenantAgentWithdrawal);
List<TenantAgentWithdrawal> selectTenantAgentWithdrawalList(TenantAgentWithdrawal tenantAgentWithdrawal);
/**
*
*
*
* @param tenantAgentWithdrawal
* @return
*/
int insertTenantAgentWithdrawal(TenantAgentWithdrawal tenantAgentWithdrawal);
int insertTenantAgentWithdrawal(TenantAgentWithdrawal tenantAgentWithdrawal);
/**
*
*
*
* @param tenantAgentWithdrawal
* @return
*/
int updateTenantAgentWithdrawal(TenantAgentWithdrawal tenantAgentWithdrawal);
int updateTenantAgentWithdrawal(TenantAgentWithdrawal tenantAgentWithdrawal);
/**
*
*
*
* @param id
* @return
*/
int deleteTenantAgentWithdrawalById(Long id);
int deleteTenantAgentWithdrawalById(Long id);
/**
*
*
*
* @param ids
* @return
*/
int deleteTenantAgentWithdrawalByIds(Long[] ids);
int deleteTenantAgentWithdrawalByIds(Long[] ids);
}

View File

@ -0,0 +1,22 @@
package com.ff.agent.mapper;
import com.ff.agent.dto.TenantAgentInviteRegisterDTO;
import java.util.List;
/**
* Mapper
*
* @author shi
* @date 2025-02-25
*/
public interface TenantAgentInviteRegisterBizMapper {
/**
* dto
*
* @param tenantAgentInviteRegisterDTO dto
* @return {@link List }<{@link TenantAgentInviteRegisterDTO }>
*/
List<TenantAgentInviteRegisterDTO> selectTenantAgentInviteRegisterListDTO(TenantAgentInviteRegisterDTO tenantAgentInviteRegisterDTO);
}

View File

@ -1,72 +0,0 @@
package com.ff.agent.service;
import com.ff.agent.domain.TenantAgentCommission;
import java.math.BigDecimal;
import java.util.List;
/**
* Service
*
* @author shi
* @date 2025-02-26
*/
public interface ITenantAgentCommissionService
{
/**
*
*
* @param id
* @return
*/
TenantAgentCommission selectTenantAgentCommissionById(Long id);
/**
*
*
* @param tenantAgentCommission
* @return
*/
List<TenantAgentCommission> selectTenantAgentCommissionList(TenantAgentCommission tenantAgentCommission);
/**
*
*
* @param tenantAgentCommission
* @return {@link BigDecimal }
*/
BigDecimal getAgentCommissionSum(TenantAgentCommission tenantAgentCommission);
/**
*
*
* @param tenantAgentCommission
* @return
*/
int insertTenantAgentCommission(TenantAgentCommission tenantAgentCommission);
/**
*
*
* @param tenantAgentCommission
* @return
*/
int updateTenantAgentCommission(TenantAgentCommission tenantAgentCommission);
/**
*
*
* @param ids
* @return
*/
int deleteTenantAgentCommissionByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
int deleteTenantAgentCommissionById(Long id);
}

View File

@ -1,62 +0,0 @@
package com.ff.agent.service;
import com.ff.agent.domain.TenantAgentInvitePlatform;
import java.util.List;
/**
* Service
*
* @author shi
* @date 2025-02-27
*/
public interface ITenantAgentInvitePlatformService
{
/**
*
*
* @param id
* @return
*/
TenantAgentInvitePlatform selectTenantAgentInvitePlatformById(Long id);
/**
*
*
* @param tenantAgentInvitePlatform
* @return
*/
List<TenantAgentInvitePlatform> selectTenantAgentInvitePlatformList(TenantAgentInvitePlatform tenantAgentInvitePlatform);
/**
*
*
* @param tenantAgentInvitePlatform
* @return
*/
int insertTenantAgentInvitePlatform(TenantAgentInvitePlatform tenantAgentInvitePlatform);
/**
*
*
* @param tenantAgentInvitePlatform
* @return
*/
int updateTenantAgentInvitePlatform(TenantAgentInvitePlatform tenantAgentInvitePlatform);
/**
*
*
* @param ids
* @return
*/
int deleteTenantAgentInvitePlatformByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
int deleteTenantAgentInvitePlatformById(Long id);
}

View File

@ -0,0 +1,23 @@
package com.ff.agent.service;
import com.ff.agent.dto.TenantAgentInviteRegisterDTO;
import java.util.List;
/**
* Service
*
* @author shi
* @date 2025-02-25
*/
public interface ITenantAgentInviteRegisterBiz {
/**
* dto
*
* @param tenantAgentInviteRegisterDTO dto
* @return {@link List }<{@link TenantAgentInviteRegisterDTO }>
*/
List<TenantAgentInviteRegisterDTO> selectTenantAgentInviteRegisterListDTO(TenantAgentInviteRegisterDTO tenantAgentInviteRegisterDTO);
}

View File

@ -1,73 +0,0 @@
package com.ff.agent.service;
import com.ff.agent.domain.TenantAgentInviteRegister;
import com.ff.agent.dto.TenantAgentInviteRegisterDTO;
import java.util.List;
/**
* Service
*
* @author shi
* @date 2025-02-25
*/
public interface ITenantAgentInviteRegisterService
{
/**
*
*
* @param id
* @return
*/
TenantAgentInviteRegister selectTenantAgentInviteRegisterById(Long id);
/**
*
*
* @param tenantAgentInviteRegister
* @return
*/
List<TenantAgentInviteRegister> selectTenantAgentInviteRegisterList(TenantAgentInviteRegister tenantAgentInviteRegister);
/**
* dto
*
* @param tenantAgentInviteRegisterDTO dto
* @return {@link List }<{@link TenantAgentInviteRegisterDTO }>
*/
List<TenantAgentInviteRegisterDTO> selectTenantAgentInviteRegisterListDTO(TenantAgentInviteRegisterDTO tenantAgentInviteRegisterDTO);
/**
*
*
* @param tenantAgentInviteRegister
* @return
*/
int insertTenantAgentInviteRegister(TenantAgentInviteRegister tenantAgentInviteRegister);
/**
*
*
* @param tenantAgentInviteRegister
* @return
*/
int updateTenantAgentInviteRegister(TenantAgentInviteRegister tenantAgentInviteRegister);
/**
*
*
* @param ids
* @return
*/
int deleteTenantAgentInviteRegisterByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
int deleteTenantAgentInviteRegisterById(Long id);
}

View File

@ -1,78 +0,0 @@
package com.ff.agent.service;
import com.ff.agent.domain.TenantAgentInvite;
import java.util.List;
/**
* Service
*
* @author shi
* @date 2025-02-25
*/
public interface ITenantAgentInviteService
{
/**
*
*
* @param id
* @return
*/
TenantAgentInvite selectTenantAgentInviteById(Long id);
/**
*
*
* @param inviteCode
* @return {@link TenantAgentInvite }
*/
TenantAgentInvite selectTenantAgentInviteByInviteCode(String inviteCode);
/**
*
*
* @param tenantAgentInvite
* @return
*/
List<TenantAgentInvite> selectTenantAgentInviteList(TenantAgentInvite tenantAgentInvite);
/**
*
*
* @param tenantAgentInvite
* @return
*/
int insertTenantAgentInvite(TenantAgentInvite tenantAgentInvite);
/**
*
*
* @return {@link String }
*/
String getInviteCode();
/**
*
*
* @param tenantAgentInvite
* @return
*/
int updateTenantAgentInvite(TenantAgentInvite tenantAgentInvite);
/**
*
*
* @param ids
* @return
*/
int deleteTenantAgentInviteByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
int deleteTenantAgentInviteById(Long id);
}

View File

@ -1,62 +0,0 @@
package com.ff.agent.service;
import com.ff.agent.domain.TenantAgentWithdrawal;
import java.util.List;
/**
* Service
*
* @author shi
* @date 2025-02-26
*/
public interface ITenantAgentWithdrawalService
{
/**
*
*
* @param id
* @return
*/
TenantAgentWithdrawal selectTenantAgentWithdrawalById(Long id);
/**
*
*
* @param tenantAgentWithdrawal
* @return
*/
List<TenantAgentWithdrawal> selectTenantAgentWithdrawalList(TenantAgentWithdrawal tenantAgentWithdrawal);
/**
*
*
* @param tenantAgentWithdrawal
* @return
*/
int insertTenantAgentWithdrawal(TenantAgentWithdrawal tenantAgentWithdrawal);
/**
*
*
* @param tenantAgentWithdrawal
* @return
*/
int updateTenantAgentWithdrawal(TenantAgentWithdrawal tenantAgentWithdrawal);
/**
*
*
* @param ids
* @return
*/
int deleteTenantAgentWithdrawalByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
int deleteTenantAgentWithdrawalById(Long id);
}

View File

@ -1,111 +0,0 @@
package com.ff.agent.service.impl;
import cn.hutool.core.util.IdUtil;
import com.ff.agent.domain.TenantAgentCommission;
import com.ff.agent.mapper.TenantAgentCommissionMapper;
import com.ff.agent.service.ITenantAgentCommissionService;
import com.ff.base.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.util.List;
/**
* Service
*
* @author shi
* @date 2025-02-26
*/
@Service
public class TenantAgentCommissionServiceImpl implements ITenantAgentCommissionService
{
@Autowired
private TenantAgentCommissionMapper tenantAgentCommissionMapper;
/**
*
*
* @param id
* @return
*/
@Override
public TenantAgentCommission selectTenantAgentCommissionById(Long id)
{
return tenantAgentCommissionMapper.selectTenantAgentCommissionById(id);
}
/**
*
*
* @param tenantAgentCommission
* @return
*/
@Override
public List<TenantAgentCommission> selectTenantAgentCommissionList(TenantAgentCommission tenantAgentCommission)
{
return tenantAgentCommissionMapper.selectTenantAgentCommissionList(tenantAgentCommission);
}
/**
*
*
* @param tenantAgentCommission
* @return {@link BigDecimal }
*/
@Override
public BigDecimal getAgentCommissionSum(TenantAgentCommission tenantAgentCommission) {
return tenantAgentCommissionMapper.getAgentCommissionSum(tenantAgentCommission);
}
/**
*
*
* @param tenantAgentCommission
* @return
*/
@Override
public int insertTenantAgentCommission(TenantAgentCommission tenantAgentCommission)
{
tenantAgentCommission.setCreateTime(DateUtils.getNowDate());
tenantAgentCommission.setId(IdUtil.getSnowflakeNextId());
return tenantAgentCommissionMapper.insertTenantAgentCommission(tenantAgentCommission);
}
/**
*
*
* @param tenantAgentCommission
* @return
*/
@Override
public int updateTenantAgentCommission(TenantAgentCommission tenantAgentCommission)
{
tenantAgentCommission.setUpdateTime(DateUtils.getNowDate());
return tenantAgentCommissionMapper.updateTenantAgentCommission(tenantAgentCommission);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteTenantAgentCommissionByIds(Long[] ids)
{
return tenantAgentCommissionMapper.deleteTenantAgentCommissionByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteTenantAgentCommissionById(Long id)
{
return tenantAgentCommissionMapper.deleteTenantAgentCommissionById(id);
}
}

View File

@ -1,100 +0,0 @@
package com.ff.agent.service.impl;
import cn.hutool.core.util.IdUtil;
import com.ff.agent.domain.TenantAgentInvitePlatform;
import com.ff.agent.mapper.TenantAgentInvitePlatformMapper;
import com.ff.agent.service.ITenantAgentInvitePlatformService;
import com.ff.base.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Service
*
* @author shi
* @date 2025-02-27
*/
@Service
public class TenantAgentInvitePlatformServiceImpl implements ITenantAgentInvitePlatformService
{
@Autowired
private TenantAgentInvitePlatformMapper tenantAgentInvitePlatformMapper;
/**
*
*
* @param id
* @return
*/
@Override
public TenantAgentInvitePlatform selectTenantAgentInvitePlatformById(Long id)
{
return tenantAgentInvitePlatformMapper.selectTenantAgentInvitePlatformById(id);
}
/**
*
*
* @param tenantAgentInvitePlatform
* @return
*/
@Override
public List<TenantAgentInvitePlatform> selectTenantAgentInvitePlatformList(TenantAgentInvitePlatform tenantAgentInvitePlatform)
{
return tenantAgentInvitePlatformMapper.selectTenantAgentInvitePlatformList(tenantAgentInvitePlatform);
}
/**
*
*
* @param tenantAgentInvitePlatform
* @return
*/
@Override
public int insertTenantAgentInvitePlatform(TenantAgentInvitePlatform tenantAgentInvitePlatform)
{
tenantAgentInvitePlatform.setId(IdUtil.getSnowflakeNextId());
tenantAgentInvitePlatform.setCreateTime(DateUtils.getNowDate());
return tenantAgentInvitePlatformMapper.insertTenantAgentInvitePlatform(tenantAgentInvitePlatform);
}
/**
*
*
* @param tenantAgentInvitePlatform
* @return
*/
@Override
public int updateTenantAgentInvitePlatform(TenantAgentInvitePlatform tenantAgentInvitePlatform)
{
tenantAgentInvitePlatform.setUpdateTime(DateUtils.getNowDate());
return tenantAgentInvitePlatformMapper.updateTenantAgentInvitePlatform(tenantAgentInvitePlatform);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteTenantAgentInvitePlatformByIds(Long[] ids)
{
return tenantAgentInvitePlatformMapper.deleteTenantAgentInvitePlatformByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteTenantAgentInvitePlatformById(Long id)
{
return tenantAgentInvitePlatformMapper.deleteTenantAgentInvitePlatformById(id);
}
}

View File

@ -0,0 +1,33 @@
package com.ff.agent.service.impl;
import com.ff.agent.dto.TenantAgentInviteRegisterDTO;
import com.ff.agent.mapper.TenantAgentInviteRegisterBizMapper;
import com.ff.agent.service.ITenantAgentInviteRegisterBiz;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Service
*
* @author shi
* @date 2025-02-25
*/
@Service
public class TenantAgentInviteRegisterBizImpl implements ITenantAgentInviteRegisterBiz {
@Autowired
private TenantAgentInviteRegisterBizMapper tenantAgentInviteRegisterBizMapper;
/**
* dto
*
* @param tenantAgentInviteRegisterDTO dto
* @return {@link List }<{@link TenantAgentInviteRegisterDTO }>
*/
@Override
public List<TenantAgentInviteRegisterDTO> selectTenantAgentInviteRegisterListDTO(TenantAgentInviteRegisterDTO tenantAgentInviteRegisterDTO) {
return tenantAgentInviteRegisterBizMapper.selectTenantAgentInviteRegisterListDTO(tenantAgentInviteRegisterDTO);
}
}

View File

@ -1,111 +0,0 @@
package com.ff.agent.service.impl;
import cn.hutool.core.util.IdUtil;
import com.ff.agent.domain.TenantAgentInviteRegister;
import com.ff.agent.dto.TenantAgentInviteRegisterDTO;
import com.ff.agent.mapper.TenantAgentInviteRegisterMapper;
import com.ff.agent.service.ITenantAgentInviteRegisterService;
import com.ff.base.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Service
*
* @author shi
* @date 2025-02-25
*/
@Service
public class TenantAgentInviteRegisterServiceImpl implements ITenantAgentInviteRegisterService
{
@Autowired
private TenantAgentInviteRegisterMapper tenantAgentInviteRegisterMapper;
/**
*
*
* @param id
* @return
*/
@Override
public TenantAgentInviteRegister selectTenantAgentInviteRegisterById(Long id)
{
return tenantAgentInviteRegisterMapper.selectTenantAgentInviteRegisterById(id);
}
/**
*
*
* @param tenantAgentInviteRegister
* @return
*/
@Override
public List<TenantAgentInviteRegister> selectTenantAgentInviteRegisterList(TenantAgentInviteRegister tenantAgentInviteRegister)
{
return tenantAgentInviteRegisterMapper.selectTenantAgentInviteRegisterList(tenantAgentInviteRegister);
}
/**
* dto
*
* @param tenantAgentInviteRegisterDTO dto
* @return {@link List }<{@link TenantAgentInviteRegisterDTO }>
*/
@Override
public List<TenantAgentInviteRegisterDTO> selectTenantAgentInviteRegisterListDTO(TenantAgentInviteRegisterDTO tenantAgentInviteRegisterDTO) {
return tenantAgentInviteRegisterMapper.selectTenantAgentInviteRegisterListDTO(tenantAgentInviteRegisterDTO);
}
/**
*
*
* @param tenantAgentInviteRegister
* @return
*/
@Override
public int insertTenantAgentInviteRegister(TenantAgentInviteRegister tenantAgentInviteRegister)
{
tenantAgentInviteRegister.setId(IdUtil.getSnowflakeNextId());
tenantAgentInviteRegister.setCreateTime(DateUtils.getNowDate());
return tenantAgentInviteRegisterMapper.insertTenantAgentInviteRegister(tenantAgentInviteRegister);
}
/**
*
*
* @param tenantAgentInviteRegister
* @return
*/
@Override
public int updateTenantAgentInviteRegister(TenantAgentInviteRegister tenantAgentInviteRegister)
{
tenantAgentInviteRegister.setUpdateTime(DateUtils.getNowDate());
return tenantAgentInviteRegisterMapper.updateTenantAgentInviteRegister(tenantAgentInviteRegister);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteTenantAgentInviteRegisterByIds(Long[] ids)
{
return tenantAgentInviteRegisterMapper.deleteTenantAgentInviteRegisterByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteTenantAgentInviteRegisterById(Long id)
{
return tenantAgentInviteRegisterMapper.deleteTenantAgentInviteRegisterById(id);
}
}

View File

@ -1,128 +0,0 @@
package com.ff.agent.service.impl;
import cn.hutool.core.util.IdUtil;
import com.ff.agent.domain.TenantAgentInvite;
import com.ff.agent.mapper.TenantAgentInviteMapper;
import com.ff.agent.service.ITenantAgentInviteService;
import com.ff.base.utils.DateUtils;
import com.ff.base.utils.NumberUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.List;
/**
* Service
*
* @author shi
* @date 2025-02-25
*/
@Service
public class TenantAgentInviteServiceImpl implements ITenantAgentInviteService
{
@Autowired
private TenantAgentInviteMapper tenantAgentInviteMapper;
/**
*
*
* @param id
* @return
*/
@Override
public TenantAgentInvite selectTenantAgentInviteById(Long id)
{
return tenantAgentInviteMapper.selectTenantAgentInviteById(id);
}
/**
*
*
* @param inviteCode
* @return {@link TenantAgentInvite }
*/
@Override
public TenantAgentInvite selectTenantAgentInviteByInviteCode(String inviteCode) {
return tenantAgentInviteMapper.selectTenantAgentInviteByInviteCode( inviteCode);
}
/**
*
*
* @param tenantAgentInvite
* @return
*/
@Override
public List<TenantAgentInvite> selectTenantAgentInviteList(TenantAgentInvite tenantAgentInvite)
{
return tenantAgentInviteMapper.selectTenantAgentInviteList(tenantAgentInvite);
}
/**
*
*
* @param tenantAgentInvite
* @return
*/
@Override
public int insertTenantAgentInvite(TenantAgentInvite tenantAgentInvite)
{
tenantAgentInvite.setId(IdUtil.getSnowflakeNextId());
tenantAgentInvite.setCreateTime(DateUtils.getNowDate());
return tenantAgentInviteMapper.insertTenantAgentInvite(tenantAgentInvite);
}
/**
*
*
* @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;
}
/**3
*
*
* @param tenantAgentInvite
* @return
*/
@Override
public int updateTenantAgentInvite(TenantAgentInvite tenantAgentInvite)
{
tenantAgentInvite.setUpdateTime(DateUtils.getNowDate());
return tenantAgentInviteMapper.updateTenantAgentInvite(tenantAgentInvite);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteTenantAgentInviteByIds(Long[] ids)
{
return tenantAgentInviteMapper.deleteTenantAgentInviteByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteTenantAgentInviteById(Long id)
{
return tenantAgentInviteMapper.deleteTenantAgentInviteById(id);
}
}

View File

@ -1,100 +0,0 @@
package com.ff.agent.service.impl;
import cn.hutool.core.util.IdUtil;
import com.ff.agent.domain.TenantAgentWithdrawal;
import com.ff.agent.mapper.TenantAgentWithdrawalMapper;
import com.ff.agent.service.ITenantAgentWithdrawalService;
import com.ff.base.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Service
*
* @author shi
* @date 2025-02-26
*/
@Service
public class TenantAgentWithdrawalServiceImpl implements ITenantAgentWithdrawalService
{
@Autowired
private TenantAgentWithdrawalMapper tenantAgentWithdrawalMapper;
/**
*
*
* @param id
* @return
*/
@Override
public TenantAgentWithdrawal selectTenantAgentWithdrawalById(Long id)
{
return tenantAgentWithdrawalMapper.selectTenantAgentWithdrawalById(id);
}
/**
*
*
* @param tenantAgentWithdrawal
* @return
*/
@Override
public List<TenantAgentWithdrawal> selectTenantAgentWithdrawalList(TenantAgentWithdrawal tenantAgentWithdrawal)
{
return tenantAgentWithdrawalMapper.selectTenantAgentWithdrawalList(tenantAgentWithdrawal);
}
/**
*
*
* @param tenantAgentWithdrawal
* @return
*/
@Override
public int insertTenantAgentWithdrawal(TenantAgentWithdrawal tenantAgentWithdrawal)
{
tenantAgentWithdrawal.setId(IdUtil.getSnowflakeNextId());
tenantAgentWithdrawal.setCreateTime(DateUtils.getNowDate());
return tenantAgentWithdrawalMapper.insertTenantAgentWithdrawal(tenantAgentWithdrawal);
}
/**
*
*
* @param tenantAgentWithdrawal
* @return
*/
@Override
public int updateTenantAgentWithdrawal(TenantAgentWithdrawal tenantAgentWithdrawal)
{
tenantAgentWithdrawal.setUpdateTime(DateUtils.getNowDate());
return tenantAgentWithdrawalMapper.updateTenantAgentWithdrawal(tenantAgentWithdrawal);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteTenantAgentWithdrawalByIds(Long[] ids)
{
return tenantAgentWithdrawalMapper.deleteTenantAgentWithdrawalByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteTenantAgentWithdrawalById(Long id)
{
return tenantAgentWithdrawalMapper.deleteTenantAgentWithdrawalById(id);
}
}

View File

@ -1,62 +0,0 @@
package com.ff.common.service;
import com.ff.common.domain.TenantAgentPlatform;
import java.util.List;
/**
* Service
*
* @author shi
* @date 2025-02-27
*/
public interface ITenantAgentPlatformService
{
/**
*
*
* @param id
* @return
*/
TenantAgentPlatform selectTenantAgentPlatformById(Long id);
/**
*
*
* @param tenantAgentPlatform
* @return
*/
List<TenantAgentPlatform> selectTenantAgentPlatformList(TenantAgentPlatform tenantAgentPlatform);
/**
*
*
* @param tenantAgentPlatform
* @return
*/
int insertTenantAgentPlatform(TenantAgentPlatform tenantAgentPlatform);
/**
*
*
* @param tenantAgentPlatform
* @return
*/
int updateTenantAgentPlatform(TenantAgentPlatform tenantAgentPlatform);
/**
*
*
* @param ids
* @return
*/
int deleteTenantAgentPlatformByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
int deleteTenantAgentPlatformById(Long id);
}

View File

@ -1,80 +0,0 @@
package com.ff.common.service;
import com.ff.common.domain.TenantGameQuotaFlow;
import java.math.BigDecimal;
import java.util.List;
/**
* Service
*
* @author shi
* @date 2025-02-12
*/
public interface ITenantGameQuotaFlowService
{
/**
*
*
* @param id
* @return
*/
TenantGameQuotaFlow selectTenantGameQuotaFlowById(Long id);
/**
*
*
* @param tenantGameQuotaFlow
* @return
*/
List<TenantGameQuotaFlow> selectTenantGameQuotaFlowList(TenantGameQuotaFlow tenantGameQuotaFlow);
/**
*
*
* @param tenantGameQuotaFlow
* @return
*/
int insertTenantGameQuotaFlow(TenantGameQuotaFlow tenantGameQuotaFlow);
/**
*
*
* @param tenantGameQuotaFlow
* @return
*/
int updateTenantGameQuotaFlow(TenantGameQuotaFlow tenantGameQuotaFlow);
/**
*
*
* @param ids
* @return
*/
int deleteTenantGameQuotaFlowByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
int deleteTenantGameQuotaFlowById(Long id);
/**
* id
*
* @param tenantGameQuotaFlow
* @return {@link BigDecimal }
*/
BigDecimal getExchangeMoneyByMemberId(TenantGameQuotaFlow tenantGameQuotaFlow);
/**
*
*
* @param tenantGameQuotaFlow
* @return {@link List }<{@link TenantGameQuotaFlow }>
*/
List<TenantGameQuotaFlow> getBalanceByTenantKey(TenantGameQuotaFlow tenantGameQuotaFlow);
}

View File

@ -1,102 +0,0 @@
package com.ff.common.service;
import com.ff.common.domain.TenantGameQuota;
import com.ff.common.dto.BalanceChangesDTO;
import com.ff.common.dto.BalanceRealChangesDTO;
import com.ff.common.dto.GameBalanceExchange;
import java.math.BigDecimal;
import java.util.List;
/**
* Service
*
* @author shi
* @date 2025-02-12
*/
public interface ITenantGameQuotaService
{
/**
*
*
* @param id
* @return
*/
TenantGameQuota selectTenantGameQuotaById(Long id);
/**
*
*
* @param tenantGameQuota
* @return
*/
List<TenantGameQuota> selectTenantGameQuotaList(TenantGameQuota tenantGameQuota);
/**
*
*
* @param tenantGameQuota
* @return
*/
int insertTenantGameQuota(TenantGameQuota tenantGameQuota);
/**
*
*
* @param tenantGameQuota
* @return
*/
int updateTenantGameQuota(TenantGameQuota tenantGameQuota);
/**
*
*
* @param ids
* @return
*/
int deleteTenantGameQuotaByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
int deleteTenantGameQuotaById(Long id);
/**
*
*
* @param balanceChangesDTO
* @return {@link Boolean }
*/
Boolean balanceChanges(BalanceChangesDTO balanceChangesDTO);
/**
*
*
* @param balanceRealChangesDTO
* @return {@link Boolean }
*/
Boolean balanceRealChanges(BalanceRealChangesDTO balanceRealChangesDTO);
/**
*
*
* @param gameBalanceExchange
* @return {@link BigDecimal }
*/
BigDecimal gameBalanceExchange(GameBalanceExchange gameBalanceExchange);
/**
*
*
* @param tenantKey
* @return
*/
TenantGameQuota selectTenantGameQuotaByTenantKey(String tenantKey, String quotaType);
}

View File

@ -1,72 +0,0 @@
package com.ff.common.service;
import com.ff.common.domain.TenantQuotaExchange;
import java.util.List;
/**
* Service
*
* @author shi
* @date 2025-02-21
*/
public interface ITenantQuotaExchangeService
{
/**
*
*
* @param id
* @return
*/
TenantQuotaExchange selectTenantQuotaExchangeById(Long id);
/**
*
*
* @param tenantQuotaExchange
* @return
*/
List<TenantQuotaExchange> selectTenantQuotaExchangeList(TenantQuotaExchange tenantQuotaExchange);
/**
*
*
* @param currencyCode
* @param exchangeCurrencyCode
* @return {@link TenantQuotaExchange }
*/
TenantQuotaExchange getTenantQuotaExchange(String currencyCode,String exchangeCurrencyCode);
/**
*
*
* @param tenantQuotaExchange
* @return
*/
int insertTenantQuotaExchange(TenantQuotaExchange tenantQuotaExchange);
/**
*
*
* @param tenantQuotaExchange
* @return
*/
int updateTenantQuotaExchange(TenantQuotaExchange tenantQuotaExchange);
/**
*
*
* @param ids
* @return
*/
int deleteTenantQuotaExchangeByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
int deleteTenantQuotaExchangeById(Long id);
}

View File

@ -1,100 +0,0 @@
package com.ff.common.service.impl;
import cn.hutool.core.util.IdUtil;
import com.ff.base.utils.DateUtils;
import com.ff.common.domain.TenantAgentPlatform;
import com.ff.tenant.mapper.TenantAgentPlatformMapper;
import com.ff.common.service.ITenantAgentPlatformService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Service
*
* @author shi
* @date 2025-02-27
*/
@Service
public class TenantAgentPlatformServiceImpl implements ITenantAgentPlatformService
{
@Autowired
private TenantAgentPlatformMapper tenantAgentPlatformMapper;
/**
*
*
* @param id
* @return
*/
@Override
public TenantAgentPlatform selectTenantAgentPlatformById(Long id)
{
return tenantAgentPlatformMapper.selectTenantAgentPlatformById(id);
}
/**
*
*
* @param tenantAgentPlatform
* @return
*/
@Override
public List<TenantAgentPlatform> selectTenantAgentPlatformList(TenantAgentPlatform tenantAgentPlatform)
{
return tenantAgentPlatformMapper.selectTenantAgentPlatformList(tenantAgentPlatform);
}
/**
*
*
* @param tenantAgentPlatform
* @return
*/
@Override
public int insertTenantAgentPlatform(TenantAgentPlatform tenantAgentPlatform)
{
tenantAgentPlatform.setId(IdUtil.getSnowflakeNextId());
tenantAgentPlatform.setCreateTime(DateUtils.getNowDate());
return tenantAgentPlatformMapper.insertTenantAgentPlatform(tenantAgentPlatform);
}
/**
*
*
* @param tenantAgentPlatform
* @return
*/
@Override
public int updateTenantAgentPlatform(TenantAgentPlatform tenantAgentPlatform)
{
tenantAgentPlatform.setUpdateTime(DateUtils.getNowDate());
return tenantAgentPlatformMapper.updateTenantAgentPlatform(tenantAgentPlatform);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteTenantAgentPlatformByIds(Long[] ids)
{
return tenantAgentPlatformMapper.deleteTenantAgentPlatformByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteTenantAgentPlatformById(Long id)
{
return tenantAgentPlatformMapper.deleteTenantAgentPlatformById(id);
}
}

View File

@ -1,116 +0,0 @@
package com.ff.common.service.impl;
import cn.hutool.core.util.IdUtil;
import com.ff.base.utils.DateUtils;
import com.ff.common.domain.TenantGameQuotaFlow;
import com.ff.tenant.mapper.TenantGameQuotaFlowMapper;
import com.ff.common.service.ITenantGameQuotaFlowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.util.List;
/**
* Service
*
* @author shi
* @date 2025-02-12
*/
@Service
public class TenantGameQuotaFlowServiceImpl implements ITenantGameQuotaFlowService {
@Autowired
private TenantGameQuotaFlowMapper tenantGameQuotaFlowMapper;
/**
*
*
* @param id
* @return
*/
@Override
public TenantGameQuotaFlow selectTenantGameQuotaFlowById(Long id) {
return tenantGameQuotaFlowMapper.selectTenantGameQuotaFlowById(id);
}
/**
*
*
* @param tenantGameQuotaFlow
* @return
*/
@Override
public List<TenantGameQuotaFlow> selectTenantGameQuotaFlowList(TenantGameQuotaFlow tenantGameQuotaFlow) {
return tenantGameQuotaFlowMapper.selectTenantGameQuotaFlowList(tenantGameQuotaFlow);
}
/**
*
*
* @param tenantGameQuotaFlow
* @return
*/
@Override
public int insertTenantGameQuotaFlow(TenantGameQuotaFlow tenantGameQuotaFlow) {
tenantGameQuotaFlow.setId(IdUtil.getSnowflakeNextId());
tenantGameQuotaFlow.setCreateTime(DateUtils.getNowDate());
return tenantGameQuotaFlowMapper.insertTenantGameQuotaFlow(tenantGameQuotaFlow);
}
/**
*
*
* @param tenantGameQuotaFlow
* @return
*/
@Override
public int updateTenantGameQuotaFlow(TenantGameQuotaFlow tenantGameQuotaFlow) {
tenantGameQuotaFlow.setUpdateTime(DateUtils.getNowDate());
return tenantGameQuotaFlowMapper.updateTenantGameQuotaFlow(tenantGameQuotaFlow);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteTenantGameQuotaFlowByIds(Long[] ids) {
return tenantGameQuotaFlowMapper.deleteTenantGameQuotaFlowByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteTenantGameQuotaFlowById(Long id) {
return tenantGameQuotaFlowMapper.deleteTenantGameQuotaFlowById(id);
}
/**
* id
*
* @param tenantGameQuotaFlow
* @return {@link BigDecimal }
*/
@Override
public BigDecimal getExchangeMoneyByMemberId(TenantGameQuotaFlow tenantGameQuotaFlow) {
return tenantGameQuotaFlowMapper.getExchangeMoneyByMemberId(tenantGameQuotaFlow);
}
/**
*
*
* @param tenantGameQuotaFlow
* @return {@link List }<{@link TenantGameQuotaFlow }>
*/
@Override
public List<TenantGameQuotaFlow> getBalanceByTenantKey(TenantGameQuotaFlow tenantGameQuotaFlow) {
return tenantGameQuotaFlowMapper.getBalanceByTenantKey(tenantGameQuotaFlow);
}
}

View File

@ -1,111 +0,0 @@
package com.ff.common.service.impl;
import cn.hutool.core.util.IdUtil;
import com.ff.base.utils.DateUtils;
import com.ff.common.domain.TenantQuotaExchange;
import com.ff.tenant.mapper.TenantQuotaExchangeMapper;
import com.ff.common.service.ITenantQuotaExchangeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Service
*
* @author shi
* @date 2025-02-21
*/
@Service
public class TenantQuotaExchangeServiceImpl implements ITenantQuotaExchangeService
{
@Autowired
private TenantQuotaExchangeMapper tenantQuotaExchangeMapper;
/**
*
*
* @param id
* @return
*/
@Override
public TenantQuotaExchange selectTenantQuotaExchangeById(Long id)
{
return tenantQuotaExchangeMapper.selectTenantQuotaExchangeById(id);
}
/**
*
*
* @param tenantQuotaExchange
* @return
*/
@Override
public List<TenantQuotaExchange> selectTenantQuotaExchangeList(TenantQuotaExchange tenantQuotaExchange)
{
return tenantQuotaExchangeMapper.selectTenantQuotaExchangeList(tenantQuotaExchange);
}
/**
*
*
* @param currencyCode
* @param exchangeCurrencyCode
* @return {@link TenantQuotaExchange }
*/
@Override
public TenantQuotaExchange getTenantQuotaExchange(String currencyCode, String exchangeCurrencyCode) {
return tenantQuotaExchangeMapper.getTenantQuotaExchange(currencyCode, exchangeCurrencyCode);
}
/**
*
*
* @param tenantQuotaExchange
* @return
*/
@Override
public int insertTenantQuotaExchange(TenantQuotaExchange tenantQuotaExchange)
{
tenantQuotaExchange.setId(IdUtil.getSnowflakeNextId());
tenantQuotaExchange.setCreateTime(DateUtils.getNowDate());
return tenantQuotaExchangeMapper.insertTenantQuotaExchange(tenantQuotaExchange);
}
/**
*
*
* @param tenantQuotaExchange
* @return
*/
@Override
public int updateTenantQuotaExchange(TenantQuotaExchange tenantQuotaExchange)
{
tenantQuotaExchange.setUpdateTime(DateUtils.getNowDate());
return tenantQuotaExchangeMapper.updateTenantQuotaExchange(tenantQuotaExchange);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteTenantQuotaExchangeByIds(Long[] ids)
{
return tenantQuotaExchangeMapper.deleteTenantQuotaExchangeByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteTenantQuotaExchangeById(Long id)
{
return tenantQuotaExchangeMapper.deleteTenantQuotaExchangeById(id);
}
}

View File

@ -1,6 +1,5 @@
package com.ff.game.dto;
import com.ff.game.domain.GameBettingDetails;
import com.ff.game.domain.GameExchangeMoney;
import lombok.Data;

View File

@ -0,0 +1,14 @@
package com.ff.game.mapper;
import com.ff.game.domain.GameBettingDetails;
import com.ff.game.dto.GameBettingDetailsDTO;
import java.util.List;
/**
* @author cengy
*/
public interface GameBettingDetailsBizMapper {
List<GameBettingDetails> selectGameBettingDetailsList(GameBettingDetailsDTO gameBettingDetailsDTO);
}

View File

@ -0,0 +1,39 @@
package com.ff.game.mapper;
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;
/**
* @author cengy
*/
public interface GameBizMapper {
/**
*
*
* @param gameDTO dto
* @return {@link List }<{@link Game }>
*/
List<Game> selectGameDTOList(GameDTO gameDTO);
/**
*
*
* @return {@link List }<{@link GameResponse }>
*/
List<GameResponse> selectGameResponseList();
/**
*
*
* @param gameUniqueDTO dto
* @return {@link List }<{@link Game }>
*/
List<Game> selectGameUniqueList(GameUniqueDTO gameUniqueDTO);
}

View File

@ -0,0 +1,13 @@
package com.ff.game.mapper;
import com.ff.game.dto.GameExchangeMoneyDTO;
import java.util.List;
/**
* @author cengy
*/
public interface GameExchangeMoneyBizMapper {
List<GameExchangeMoneyDTO> selectGameExchangeMoneyDTOList(GameExchangeMoneyDTO gameExchangeMoneyDTO);
}

View File

@ -0,0 +1,23 @@
package com.ff.game.service;
import com.ff.game.domain.GameBettingDetails;
import com.ff.game.dto.GameBettingDetailsDTO;
import java.util.List;
/**
* Service
*
* @author shi
* @date 2025-02-10
*/
public interface IGameBettingDetailsBiz {
/**
*
*
* @param gameBettingDetailsDTO
* @return
*/
List<GameBettingDetails> selectGameBettingDetailsList(GameBettingDetailsDTO gameBettingDetailsDTO);
}

View File

@ -0,0 +1,41 @@
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 IGameBiz {
/**
*
*
* @param gameDTO dto
* @return {@link List }<{@link Game }>
*/
List<Game> selectGameDTOList(GameDTO gameDTO);
/**
*
*
* @return {@link List }<{@link GameResponse }>
*/
List<GameResponse> selectGameResponseList();
/**
*
*
* @param gameUniqueDTO dto
* @return {@link List }<{@link Game }>
*/
List<Game> selectGameUniqueList(GameUniqueDTO gameUniqueDTO);
}

View File

@ -0,0 +1,31 @@
package com.ff.game.service;
import com.ff.game.dto.GameExchangeMoneyDTO;
import java.util.List;
/**
* Service
*
* @author shi
* @date 2025-02-10
*/
public interface IGameExchangeMoneyBiz {
/**
*
*
* @param gameExchangeMoneyDTO dto
* @return {@link List }<{@link GameExchangeMoneyDTO }>
*/
List<GameExchangeMoneyDTO> selectGameExchangeMoneyDTOList(GameExchangeMoneyDTO gameExchangeMoneyDTO);
/**
* id
*
* @param prefix
* @param length
* @return {@link String }
*/
String getTransactionId(String prefix, int length);
}

View File

@ -1,81 +0,0 @@
package com.ff.game.service;
import com.ff.game.domain.GameExchangeMoney;
import com.ff.game.dto.GameExchangeMoneyDTO;
import java.util.List;
/**
* Service
*
* @author shi
* @date 2025-02-10
*/
public interface IGameExchangeMoneyService
{
/**
*
*
* @param id
* @return
*/
GameExchangeMoney selectGameExchangeMoneyById(Long id);
/**
*
*
* @param gameExchangeMoney
* @return
*/
List<GameExchangeMoney> selectGameExchangeMoneyList(GameExchangeMoney gameExchangeMoney);
/**
*
*
* @param gameExchangeMoneyDTO dto
* @return {@link List }<{@link GameExchangeMoneyDTO }>
*/
List<GameExchangeMoneyDTO> selectGameExchangeMoneyDTOList(GameExchangeMoneyDTO gameExchangeMoneyDTO);
/**
*
*
* @param gameExchangeMoney
* @return
*/
int insertGameExchangeMoney(GameExchangeMoney gameExchangeMoney);
/**
* id
*
* @param prefix
* @param length
* @return {@link String }
*/
String getTransactionId(String prefix, int length );
/**
*
*
* @param gameExchangeMoney
* @return
*/
int updateGameExchangeMoney(GameExchangeMoney gameExchangeMoney);
/**
*
*
* @param ids
* @return
*/
int deleteGameExchangeMoneyByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
int deleteGameExchangeMoneyById(Long id);
}

View File

@ -0,0 +1,13 @@
package com.ff.game.service;
import com.ff.game.domain.Platform;
/**
* @author cengy
*/
public interface IPlatformBiz {
void loadToCache();
Platform get(String platformCode);
}

View File

@ -1,27 +0,0 @@
package com.ff.game.service;
import com.ff.game.domain.Platform;
import java.util.List;
/**
* @author cengy
*/
public interface IPlatformService {
List<Platform> selectList(Platform platform);
Platform selectByPlatformCode(String platformCode);
int updatePlatform(Platform platform);
int insertPlatform(Platform platform);
int deleteById(Long id);
int deleteByIds(String ids);
void loadToCache();
Platform get(String platformCode);
}

View File

@ -0,0 +1,34 @@
package com.ff.game.service.impl;
import com.ff.game.domain.GameBettingDetails;
import com.ff.game.dto.GameBettingDetailsDTO;
import com.ff.game.mapper.GameBettingDetailsBizMapper;
import com.ff.game.service.IGameBettingDetailsBiz;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Service
*
* @author shi
* @date 2025-02-10
*/
@Service
public class GameBettingDetailsBizImpl implements IGameBettingDetailsBiz {
@Autowired
private GameBettingDetailsBizMapper gameBettingDetailsBizMapper;
/**
*
*
* @param gameBettingDetailsDTO
* @return
*/
@Override
public List<GameBettingDetails> selectGameBettingDetailsList(GameBettingDetailsDTO gameBettingDetailsDTO) {
return gameBettingDetailsBizMapper.selectGameBettingDetailsList(gameBettingDetailsDTO);
}
}

View File

@ -1,133 +0,0 @@
package com.ff.game.service.impl;
import cn.hutool.core.util.IdUtil;
import com.ff.base.utils.DateUtils;
import com.ff.game.domain.GameBettingDetails;
import com.ff.game.dto.GameBettingDetailsDTO;
import com.ff.game.mapper.GameBettingDetailsMapper;
import com.ff.game.service.IGameBettingDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Service
*
* @author shi
* @date 2025-02-10
*/
@Service
public class GameBettingDetailsServiceImpl implements IGameBettingDetailsService
{
@Autowired
private GameBettingDetailsMapper gameBettingDetailsMapper;
/**
*
*
* @param id
* @return
*/
@Override
public GameBettingDetails selectGameBettingDetailsById(Long id)
{
return gameBettingDetailsMapper.selectGameBettingDetailsById(id);
}
/**
* id
*
* @param wagersIds ID
* @return {@link List }<{@link Long }>
*/
@Override
public List<String> selectGameBettingDetailsByWagersId(List<String> wagersIds, String platformCode) {
return gameBettingDetailsMapper.selectGameBettingDetailsByWagersId(wagersIds,platformCode);
}
/**
*
*
* @param gameBettingDetailsDTO
* @return
*/
@Override
public List<GameBettingDetails> selectGameBettingDetailsList(GameBettingDetailsDTO gameBettingDetailsDTO)
{
return gameBettingDetailsMapper.selectGameBettingDetailsList(gameBettingDetailsDTO);
}
/**
*
*
* @param gameBettingDetails
* @return
*/
@Override
public int insertGameBettingDetails(GameBettingDetails gameBettingDetails)
{
gameBettingDetails.setId(IdUtil.getSnowflakeNextId());
gameBettingDetails.setCreateTime(DateUtils.getNowDate());
return gameBettingDetailsMapper.insertGameBettingDetails(gameBettingDetails);
}
/**
*
*
* @param bettingDetails
* @return int
*/
@Override
public int batchInsert(List<GameBettingDetails> bettingDetails) {
return gameBettingDetailsMapper.batchInsert(bettingDetails);
}
/**
*
*
* @param gameBettingDetails
* @return
*/
@Override
public int updateGameBettingDetails(GameBettingDetails gameBettingDetails)
{
gameBettingDetails.setUpdateTime(DateUtils.getNowDate());
return gameBettingDetailsMapper.updateGameBettingDetails(gameBettingDetails);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteGameBettingDetailsByIds(Long[] ids)
{
return gameBettingDetailsMapper.deleteGameBettingDetailsByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteGameBettingDetailsById(Long id)
{
return gameBettingDetailsMapper.deleteGameBettingDetailsById(id);
}
/**
* id
*
* @param wagersId id
* @return int
*/
@Override
public int deleteGameBettingDetailsByWagersId(List<String> wagersId) {
return gameBettingDetailsMapper.deleteGameBettingDetailsByWagersId(wagersId);
}
}

View File

@ -0,0 +1,61 @@
package com.ff.game.service.impl;
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 com.ff.game.mapper.GameBizMapper;
import com.ff.game.service.IGameBiz;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Service
*
* @author shi
* @date 2025-02-10
*/
@Service
@Slf4j
public class GameBizImpl implements IGameBiz {
@Autowired
private GameBizMapper gameBizMapper;
/**
*
*
* @param gameDTO dto
* @return {@link List }<{@link Game }>
*/
@Override
public List<Game> selectGameDTOList(GameDTO gameDTO) {
return gameBizMapper.selectGameDTOList(gameDTO);
}
/**
*
*
* @return {@link List }<{@link GameResponse }>
*/
@Override
public List<GameResponse> selectGameResponseList() {
return gameBizMapper.selectGameResponseList();
}
/**
*
*
* @param gameUniqueDTO dto
* @return {@link List }<{@link Game }>
*/
@Override
public List<Game> selectGameUniqueList(GameUniqueDTO gameUniqueDTO) {
return gameBizMapper.selectGameUniqueList(gameUniqueDTO);
}
}

View File

@ -0,0 +1,61 @@
package com.ff.game.service.impl;
import com.ff.base.utils.StringUtils;
import com.ff.game.domain.GameExchangeMoney;
import com.ff.game.dto.GameExchangeMoneyDTO;
import com.ff.game.mapper.GameExchangeMoneyBizMapper;
import com.ff.game.mapper.GameExchangeMoneyMapper;
import com.ff.game.service.IGameExchangeMoneyBiz;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.List;
/**
* Service
*
* @author shi
* @date 2025-02-10
*/
@Service
public class GameExchangeMoneyBizImpl implements IGameExchangeMoneyBiz {
@Autowired
private GameExchangeMoneyBizMapper gameExchangeMoneyBizMapper;
@Autowired
private GameExchangeMoneyMapper gameExchangeMoneyMapper;
@Override
public List<GameExchangeMoneyDTO> selectGameExchangeMoneyDTOList(GameExchangeMoneyDTO gameExchangeMoneyDTO) {
return gameExchangeMoneyBizMapper.selectGameExchangeMoneyDTOList(gameExchangeMoneyDTO);
}
/**
* id
*
* @param prefix
* @param length
* @return {@link String }
*/
@Override
public synchronized String getTransactionId(String prefix, int length) {
String transactionId = StringUtils.generateOrderId(prefix, length);
List<GameExchangeMoney> gameExchangeMonies = gameExchangeMoneyMapper.selectGameExchangeMoneyList(
GameExchangeMoney.builder()
.transactionId(transactionId)
.build()
);
while (!CollectionUtils.isEmpty(gameExchangeMonies)) {
transactionId = StringUtils.generateOrderId(prefix, length);
gameExchangeMonies = gameExchangeMoneyMapper.selectGameExchangeMoneyList(
GameExchangeMoney.builder()
.transactionId(transactionId)
.build()
);
}
return transactionId;
}
}

View File

@ -1,134 +0,0 @@
package com.ff.game.service.impl;
import cn.hutool.core.util.IdUtil;
import com.ff.base.utils.DateUtils;
import com.ff.base.utils.StringUtils;
import com.ff.game.domain.GameExchangeMoney;
import com.ff.game.dto.GameExchangeMoneyDTO;
import com.ff.game.mapper.GameExchangeMoneyMapper;
import com.ff.game.service.IGameExchangeMoneyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.List;
/**
* Service
*
* @author shi
* @date 2025-02-10
*/
@Service
public class GameExchangeMoneyServiceImpl implements IGameExchangeMoneyService
{
@Autowired
private GameExchangeMoneyMapper gameExchangeMoneyMapper;
/**
*
*
* @param id
* @return
*/
@Override
public GameExchangeMoney selectGameExchangeMoneyById(Long id)
{
return gameExchangeMoneyMapper.selectGameExchangeMoneyById(id);
}
/**
*
*
* @param gameExchangeMoney
* @return
*/
@Override
public List<GameExchangeMoney> selectGameExchangeMoneyList(GameExchangeMoney gameExchangeMoney)
{
return gameExchangeMoneyMapper.selectGameExchangeMoneyList(gameExchangeMoney);
}
@Override
public List<GameExchangeMoneyDTO> selectGameExchangeMoneyDTOList(GameExchangeMoneyDTO gameExchangeMoneyDTO) {
return gameExchangeMoneyMapper.selectGameExchangeMoneyDTOList(gameExchangeMoneyDTO);
}
/**
*
*
* @param gameExchangeMoney
* @return
*/
@Override
public int insertGameExchangeMoney(GameExchangeMoney gameExchangeMoney)
{
gameExchangeMoney.setId(IdUtil.getSnowflakeNextId());
gameExchangeMoney.setCreateTime(DateUtils.getNowDate());
return gameExchangeMoneyMapper.insertGameExchangeMoney(gameExchangeMoney);
}
/**
* id
*
* @param prefix
* @param length
* @return {@link String }
*/
@Override
public synchronized String getTransactionId(String prefix, int length) {
String transactionId = StringUtils.generateOrderId(prefix,length);
List<GameExchangeMoney> gameExchangeMonies = this.selectGameExchangeMoneyList(
GameExchangeMoney.builder()
.transactionId(transactionId)
.build()
);
while (!CollectionUtils.isEmpty(gameExchangeMonies)){
transactionId = StringUtils.generateOrderId(prefix,length);
gameExchangeMonies = this.selectGameExchangeMoneyList(
GameExchangeMoney.builder()
.transactionId(transactionId)
.build()
);
}
return transactionId;
}
/**
*
*
* @param gameExchangeMoney
* @return
*/
@Override
public int updateGameExchangeMoney(GameExchangeMoney gameExchangeMoney)
{
gameExchangeMoney.setUpdateTime(DateUtils.getNowDate());
return gameExchangeMoneyMapper.updateGameExchangeMoney(gameExchangeMoney);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteGameExchangeMoneyByIds(Long[] ids)
{
return gameExchangeMoneyMapper.deleteGameExchangeMoneyByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteGameExchangeMoneyById(Long id)
{
return gameExchangeMoneyMapper.deleteGameExchangeMoneyById(id);
}
}

View File

@ -1,99 +0,0 @@
package com.ff.game.service.impl;
import cn.hutool.core.util.IdUtil;
import com.ff.base.utils.DateUtils;
import com.ff.game.domain.GameFreeRecord;
import com.ff.game.mapper.GameFreeRecordMapper;
import com.ff.game.service.IGameFreeRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Service
*
* @author shi
* @date 2025-02-10
*/
@Service
public class GameFreeRecordServiceImpl implements IGameFreeRecordService
{
@Autowired
private GameFreeRecordMapper gameFreeRecordMapper;
/**
*
*
* @param id
* @return
*/
@Override
public GameFreeRecord selectGameFreeRecordById(Long id)
{
return gameFreeRecordMapper.selectGameFreeRecordById(id);
}
/**
*
*
* @param gameFreeRecord
* @return
*/
@Override
public List<GameFreeRecord> selectGameFreeRecordList(GameFreeRecord gameFreeRecord)
{
return gameFreeRecordMapper.selectGameFreeRecordList(gameFreeRecord);
}
/**
*
*
* @param gameFreeRecord
* @return
*/
@Override
public int insertGameFreeRecord(GameFreeRecord gameFreeRecord)
{
gameFreeRecord.setId(IdUtil.getSnowflakeNextId());
gameFreeRecord.setCreateTime(DateUtils.getNowDate());
return gameFreeRecordMapper.insertGameFreeRecord(gameFreeRecord);
}
/**
*
*
* @param gameFreeRecord
* @return
*/
@Override
public int updateGameFreeRecord(GameFreeRecord gameFreeRecord)
{
gameFreeRecord.setUpdateTime(DateUtils.getNowDate());
return gameFreeRecordMapper.updateGameFreeRecord(gameFreeRecord);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteGameFreeRecordByIds(Long[] ids)
{
return gameFreeRecordMapper.deleteGameFreeRecordByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteGameFreeRecordById(Long id)
{
return gameFreeRecordMapper.deleteGameFreeRecordById(id);
}
}

View File

@ -30,13 +30,6 @@ public class GameServiceImpl implements IGameService {
@Autowired
private GameMapper gameMapper;
@Resource
private IMemberService memberService;
@Autowired
private Map<String, IGamesService> gamesService;
/**
*
*

View File

@ -5,6 +5,7 @@ import com.ff.base.core.redis.RedisCache;
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;
@ -17,43 +18,13 @@ import java.util.Map;
* @author cengy
*/
@Service
public class PlatformServiceImpl implements IPlatformService {
public class PlatformBizImpl implements IPlatformBiz {
@Autowired
PlatformMapper platformMapper;
@Autowired
RedisCache redisCache;
@Override
public List<Platform> selectList(Platform platform) {
return platformMapper.selectList(platform);
}
@Override
public Platform selectByPlatformCode(String platformCode) {
return platformMapper.selectByPlatformCode(platformCode);
}
@Override
public int updatePlatform(Platform platform) {
return platformMapper.updatePlatform(platform);
}
@Override
public int insertPlatform(Platform platform) {
return platformMapper.insertPlatform(platform);
}
@Override
public int deleteById(Long id) {
return platformMapper.deleteById(id);
}
@Override
public int deleteByIds(String ids) {
return platformMapper.deleteByIds(ids);
}
@Override
public void loadToCache() {
Map<Object, DataSource> resolvedDataSources = DynamicDataSourceContextHolder.getAllDataSource();

View File

@ -0,0 +1,21 @@
package com.ff.member.service;
/**
* Service
*
* @author shi
* @date 2025-02-10
*/
public interface IMemberBiz {
/**
*
*
* @param platformCode
* @param tenantSn sn
* @return {@link String }
*/
String getMemberGameAccount(String platformCode, String tenantSn);
}

View File

@ -1,90 +0,0 @@
package com.ff.member.service;
import com.ff.member.domain.Member;
import java.util.List;
/**
* Service
*
* @author shi
* @date 2025-02-10
*/
public interface IMemberService
{
/**
*
*
* @param id
* @return
*/
Member selectMemberById(Long id);
/**
*
*
* @param member
* @return
*/
List<Member> selectMemberList(Member member);
/**
*
*
* @param platformCode
* @param tenantSn sn
* @return {@link String }
*/
String getMemberGameAccount(String platformCode,String tenantSn);
/**
*
*
* @param member
* @return
*/
int insertMember(Member member);
/**
*
*
* @param member
* @return
*/
int updateMember(Member member);
/**
*
*
* @param ids
* @return
*/
int deleteMemberByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
int deleteMemberById(Long id);
/**
*
*
* @param gameAccount
* @return {@link Member }
*/
Member selectMemberByGameAccount(String gameAccount);
/**
*
*
* @param account
* @param currencyCode
* @param platformCode
* @return {@link Member }
*/
Member selectMemberByAccount(String account,String currencyCode,String platformCode);
}

View File

@ -0,0 +1,51 @@
package com.ff.member.service.impl;
import com.ff.base.enums.GamePlatforms;
import com.ff.base.utils.RandomGeneratorUtils;
import com.ff.member.mapper.MemberMapper;
import com.ff.member.service.IMemberBiz;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
/**
* Service
*
* @author shi
* @date 2025-02-10
*/
@Service
public class MemberBizImpl implements IMemberBiz {
@Autowired
private MemberMapper memberMapper;
/**
*
*
* @return {@link String }
*/
@Override
public synchronized String getMemberGameAccount(String platformCode, String tenantSn) {
String gameAccount = null;
if (GamePlatforms.DG.getInfo().equals(platformCode) || GamePlatforms.KM.getInfo().equals(platformCode)) {
tenantSn = tenantSn.toUpperCase();
do {
gameAccount = RandomGeneratorUtils.generateRandomAccountUpper() + tenantSn;
} while (!ObjectUtils.isEmpty(memberMapper.selectMemberByGameAccount(gameAccount)));
} else if (GamePlatforms.PG.getInfo().equals(platformCode) || GamePlatforms.PGX.getInfo().equals(platformCode) || GamePlatforms.PGT.getInfo().equals(platformCode)) {
tenantSn = tenantSn.toLowerCase();
do {
gameAccount = RandomGeneratorUtils.generateRandomAccountLower() + tenantSn;
} while (!ObjectUtils.isEmpty(memberMapper.selectMemberByGameAccount(gameAccount)));
} else {
do {
gameAccount = RandomGeneratorUtils.generateRandomAccount() + tenantSn;
} while (!ObjectUtils.isEmpty(memberMapper.selectMemberByGameAccount(gameAccount)));
}
return gameAccount;
}
}

View File

@ -1,148 +0,0 @@
package com.ff.member.service.impl;
import cn.hutool.core.util.IdUtil;
import com.ff.base.enums.GamePlatforms;
import com.ff.base.utils.DateUtils;
import com.ff.base.utils.RandomGeneratorUtils;
import com.ff.member.domain.Member;
import com.ff.member.mapper.MemberMapper;
import com.ff.member.service.IMemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import java.util.List;
/**
* Service
*
* @author shi
* @date 2025-02-10
*/
@Service
public class MemberServiceImpl implements IMemberService {
@Autowired
private MemberMapper memberMapper;
/**
*
*
* @param id
* @return
*/
@Override
public Member selectMemberById(Long id) {
return memberMapper.selectMemberById(id);
}
/**
*
*
* @param member
* @return
*/
@Override
public List<Member> selectMemberList(Member member) {
return memberMapper.selectMemberList(member);
}
/**
*
*
* @return {@link String }
*/
@Override
public synchronized String getMemberGameAccount(String platformCode,String tenantSn) {
String gameAccount = null;
if (GamePlatforms.DG.getInfo().equals(platformCode) || GamePlatforms.KM.getInfo().equals(platformCode)) {
tenantSn=tenantSn.toUpperCase();
do {
gameAccount = RandomGeneratorUtils.generateRandomAccountUpper()+tenantSn;
} while (!ObjectUtils.isEmpty(memberMapper.selectMemberByGameAccount(gameAccount)));
} else if (GamePlatforms.PG.getInfo().equals(platformCode) || GamePlatforms.PGX.getInfo().equals(platformCode) || GamePlatforms.PGT.getInfo().equals(platformCode)) {
tenantSn=tenantSn.toLowerCase();
do {
gameAccount = RandomGeneratorUtils.generateRandomAccountLower()+tenantSn;
} while (!ObjectUtils.isEmpty(memberMapper.selectMemberByGameAccount(gameAccount)));
} else {
do {
gameAccount = RandomGeneratorUtils.generateRandomAccount()+tenantSn;
} while (!ObjectUtils.isEmpty(memberMapper.selectMemberByGameAccount(gameAccount)));
}
return gameAccount;
}
/**
*
*
* @param member
* @return
*/
@Override
public int insertMember(Member member) {
member.setId(IdUtil.getSnowflakeNextId());
member.setCreateTime(DateUtils.getNowDate());
return memberMapper.insertMember(member);
}
/**
*
*
* @param member
* @return
*/
@Override
public int updateMember(Member member) {
member.setUpdateTime(DateUtils.getNowDate());
return memberMapper.updateMember(member);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteMemberByIds(Long[] ids) {
return memberMapper.deleteMemberByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteMemberById(Long id) {
return memberMapper.deleteMemberById(id);
}
/**
*
*
* @param gameAccount
* @return {@link Member }
*/
@Override
public Member selectMemberByGameAccount(String gameAccount) {
return memberMapper.selectMemberByGameAccount(gameAccount);
}
/**
*
*
* @param account
* @param currencyCode
* @param platformCode
* @return {@link Member }
*/
@Override
public Member selectMemberByAccount(String account, String currencyCode, String platformCode) {
return memberMapper.selectMemberByAccount(account, currencyCode, platformCode);
}
}

View File

@ -0,0 +1,51 @@
package com.ff.tenant.service;
import com.ff.common.domain.TenantGameQuota;
import com.ff.common.dto.BalanceChangesDTO;
import com.ff.common.dto.BalanceRealChangesDTO;
import com.ff.common.dto.GameBalanceExchange;
import java.math.BigDecimal;
/**
* Service
*
* @author shi
* @date 2025-02-12
*/
public interface ITenantGameQuotaBiz {
/**
*
*
* @param balanceChangesDTO
* @return {@link Boolean }
*/
Boolean balanceChanges(BalanceChangesDTO balanceChangesDTO);
/**
*
*
* @param balanceRealChangesDTO
* @return {@link Boolean }
*/
Boolean balanceRealChanges(BalanceRealChangesDTO balanceRealChangesDTO);
/**
*
*
* @param gameBalanceExchange
* @return {@link BigDecimal }
*/
BigDecimal gameBalanceExchange(GameBalanceExchange gameBalanceExchange);
/**
*
*
* @param tenantKey
* @return
*/
TenantGameQuota selectTenantGameQuotaByTenantKey(String tenantKey, String quotaType);
}

View File

@ -1,4 +1,4 @@
package com.ff.common.service.impl;
package com.ff.tenant.service.impl;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.NumberUtil;
@ -17,14 +17,14 @@ import com.ff.common.domain.TenantQuotaExchange;
import com.ff.common.dto.BalanceChangesDTO;
import com.ff.common.dto.BalanceRealChangesDTO;
import com.ff.common.dto.GameBalanceExchange;
import com.ff.tenant.mapper.TenantGameQuotaMapper;
import com.ff.common.service.ITenantGameQuotaFlowService;
import com.ff.common.service.ITenantGameQuotaService;
import com.ff.common.service.ITenantQuotaExchangeService;
import com.ff.game.api.IGamesService;
import com.ff.game.api.request.MemberInfoRequestDTO;
import com.ff.member.domain.Member;
import com.ff.member.service.IMemberService;
import com.ff.tenant.mapper.TenantGameQuotaMapper;
import com.ff.tenant.service.ITenantGameQuotaBiz;
import com.ff.tenant.service.ITenantGameQuotaFlowService;
import com.ff.tenant.service.ITenantQuotaExchangeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.Assert;
@ -33,7 +33,6 @@ import org.springframework.util.ObjectUtils;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.List;
import java.util.Map;
/**
@ -43,11 +42,10 @@ import java.util.Map;
* @date 2025-02-12
*/
@Service
public class TenantGameQuotaServiceImpl implements ITenantGameQuotaService {
public class TenantGameQuotaBizImpl implements ITenantGameQuotaBiz {
@Autowired
private TenantGameQuotaMapper tenantGameQuotaMapper;
@Resource
private ITenantGameQuotaFlowService tenantGameQuotaFlowService;
@ -66,76 +64,6 @@ public class TenantGameQuotaServiceImpl implements ITenantGameQuotaService {
@Resource
private ITenantPlatformService tenantPlatformService;
/**
*
*
* @param id
* @return
*/
@Override
public TenantGameQuota selectTenantGameQuotaById(Long id) {
return tenantGameQuotaMapper.selectTenantGameQuotaById(id);
}
/**
*
*
* @param tenantGameQuota
* @return
*/
@Override
public List<TenantGameQuota> selectTenantGameQuotaList(TenantGameQuota tenantGameQuota) {
return tenantGameQuotaMapper.selectTenantGameQuotaList(tenantGameQuota);
}
/**
*
*
* @param tenantGameQuota
* @return
*/
@Override
public int insertTenantGameQuota(TenantGameQuota tenantGameQuota) {
tenantGameQuota.setId(IdUtil.getSnowflakeNextId());
tenantGameQuota.setCreateTime(DateUtils.getNowDate());
return tenantGameQuotaMapper.insertTenantGameQuota(tenantGameQuota);
}
/**
*
*
* @param tenantGameQuota
* @return
*/
@Override
public int updateTenantGameQuota(TenantGameQuota tenantGameQuota) {
tenantGameQuota.setUpdateTime(DateUtils.getNowDate());
return tenantGameQuotaMapper.updateTenantGameQuota(tenantGameQuota);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteTenantGameQuotaByIds(Long[] ids) {
return tenantGameQuotaMapper.deleteTenantGameQuotaByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteTenantGameQuotaById(Long id) {
return tenantGameQuotaMapper.deleteTenantGameQuotaById(id);
}
/**
*
*

View File

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ff.agent.mapper.TenantAgentInviteRegisterBizMapper">
<resultMap type="com.ff.agent.dto.TenantAgentInviteRegisterDTO" id="TenantAgentInviteRegisterDTOResult">
<result property="id" column="id"/>
<result property="agentId" column="agent_id"/>
<result property="inviteCode" column="invite_code"/>
<result property="account" column="account"/>
<result property="password" column="password"/>
<result property="balance" column="balance"/>
<result property="registerTime" column="register_time"/>
<result property="registerIp" column="register_ip"/>
<result property="registerIpCity" column="register_ip_city"/>
<result property="status" column="status"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="inviteType" column="invite_type"/>
<result property="orderId" column="order_id"/>
</resultMap>
<select id="selectTenantAgentInviteRegisterListDTO" parameterType="com.ff.agent.dto.TenantAgentInviteRegisterDTO" resultMap="TenantAgentInviteRegisterDTOResult">
select r.id,
r.order_id,
r.agent_id,
r.invite_code,
r.account,
r.password,
r.balance,
r.register_time,
r.register_ip,
r.register_ip_city,
r.status,
r.create_by,
r.create_time,
r.update_by,
r.update_time,
i.invite_type
from ff_tenant_agent_invite_register r
inner join ff_tenant_agent_invite i on r.invite_code = i.invite_code
<where>
<if test="agentId != null "> and r.agent_id = #{agentId}</if>
<if test="inviteCode != null and inviteCode != ''"> and r.invite_code = #{inviteCode}</if>
<if test="account != null and account != ''"> and r.account = #{account}</if>
<if test="password != null and password != ''"> and r.password = #{password}</if>
<if test="balance != null "> and r.balance = #{balance}</if>
<if test="registerTime != null "> and r.register_time = #{registerTime}</if>
<if test="registerIp != null and registerIp != ''"> and r.register_ip = #{registerIp}</if>
<if test="registerIpCity != null and registerIpCity != ''"> and r.register_ip_city = #{registerIpCity}</if>
<if test="status != null "> and r.status = #{status}</if>
<if test="inviteType != null "> and i.invite_type = #{inviteType}</if>
<if test="orderId != null and orderId != ''"> and r.order_id = #{orderId}</if>
</where>
</select>
</mapper>

View File

@ -1,100 +1,64 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ff.agent.mapper.TenantAgentInviteRegisterMapper">
<resultMap type="TenantAgentInviteRegister" id="TenantAgentInviteRegisterResult">
<result property="id" column="id" />
<result property="agentId" column="agent_id" />
<result property="inviteCode" column="invite_code" />
<result property="account" column="account" />
<result property="password" column="password" />
<result property="balance" column="balance" />
<result property="registerTime" column="register_time" />
<result property="registerIp" column="register_ip" />
<result property="registerIpCity" column="register_ip_city" />
<result property="status" column="status" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="orderId" column="order_id" />
</resultMap>
<resultMap type="com.ff.agent.dto.TenantAgentInviteRegisterDTO" id="TenantAgentInviteRegisterDTOResult">
<result property="id" column="id" />
<result property="agentId" column="agent_id" />
<result property="inviteCode" column="invite_code" />
<result property="account" column="account" />
<result property="password" column="password" />
<result property="balance" column="balance" />
<result property="registerTime" column="register_time" />
<result property="registerIp" column="register_ip" />
<result property="registerIpCity" column="register_ip_city" />
<result property="status" column="status" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="inviteType" column="invite_type" />
<result property="orderId" column="order_id" />
<resultMap type="TenantAgentInviteRegister" id="TenantAgentInviteRegisterResult">
<result property="id" column="id"/>
<result property="agentId" column="agent_id"/>
<result property="inviteCode" column="invite_code"/>
<result property="account" column="account"/>
<result property="password" column="password"/>
<result property="balance" column="balance"/>
<result property="registerTime" column="register_time"/>
<result property="registerIp" column="register_ip"/>
<result property="registerIpCity" column="register_ip_city"/>
<result property="status" column="status"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="orderId" column="order_id"/>
</resultMap>
<sql id="selectTenantAgentInviteRegisterVo">
select id,order_id, agent_id, invite_code, account, password, balance, register_time, register_ip, register_ip_city, status, create_by, create_time, update_by, update_time from ff_tenant_agent_invite_register
select id,
order_id,
agent_id,
invite_code,
account,
password,
balance,
register_time,
register_ip,
register_ip_city,
status,
create_by,
create_time,
update_by,
update_time
from ff_tenant_agent_invite_register
</sql>
<select id="selectTenantAgentInviteRegisterList" parameterType="TenantAgentInviteRegister" resultMap="TenantAgentInviteRegisterResult">
<select id="selectTenantAgentInviteRegisterList" parameterType="TenantAgentInviteRegister"
resultMap="TenantAgentInviteRegisterResult">
<include refid="selectTenantAgentInviteRegisterVo"/>
<where>
<if test="agentId != null "> and agent_id = #{agentId}</if>
<if test="inviteCode != null and inviteCode != ''"> and invite_code = #{inviteCode}</if>
<if test="account != null and account != ''"> and account = #{account}</if>
<if test="password != null and password != ''"> and password = #{password}</if>
<if test="balance != null "> and balance = #{balance}</if>
<if test="registerTime != null "> and register_time = #{registerTime}</if>
<if test="registerIp != null and registerIp != ''"> and register_ip = #{registerIp}</if>
<if test="registerIpCity != null and registerIpCity != ''"> and register_ip_city = #{registerIpCity}</if>
<if test="status != null "> and status = #{status}</if>
<if test="orderId != null and orderId != ''"> and order_id = #{orderId}</if>
<where>
<if test="agentId != null ">and agent_id = #{agentId}</if>
<if test="inviteCode != null and inviteCode != ''">and invite_code = #{inviteCode}</if>
<if test="account != null and account != ''">and account = #{account}</if>
<if test="password != null and password != ''">and password = #{password}</if>
<if test="balance != null ">and balance = #{balance}</if>
<if test="registerTime != null ">and register_time = #{registerTime}</if>
<if test="registerIp != null and registerIp != ''">and register_ip = #{registerIp}</if>
<if test="registerIpCity != null and registerIpCity != ''">and register_ip_city = #{registerIpCity}</if>
<if test="status != null ">and status = #{status}</if>
<if test="orderId != null and orderId != ''">and order_id = #{orderId}</if>
</where>
</select>
<select id="selectTenantAgentInviteRegisterListDTO" parameterType="com.ff.agent.dto.TenantAgentInviteRegisterDTO" resultMap="TenantAgentInviteRegisterDTOResult">
select r.id,
r.order_id,
r.agent_id,
r.invite_code,
r.account,
r.password,
r.balance,
r.register_time,
r.register_ip,
r.register_ip_city,
r.status,
r.create_by,
r.create_time,
r.update_by,
r.update_time,
i.invite_type
from ff_tenant_agent_invite_register r
inner join ff_tenant_agent_invite i on r.invite_code = i.invite_code
<where>
<if test="agentId != null "> and r.agent_id = #{agentId}</if>
<if test="inviteCode != null and inviteCode != ''"> and r.invite_code = #{inviteCode}</if>
<if test="account != null and account != ''"> and r.account = #{account}</if>
<if test="password != null and password != ''"> and r.password = #{password}</if>
<if test="balance != null "> and r.balance = #{balance}</if>
<if test="registerTime != null "> and r.register_time = #{registerTime}</if>
<if test="registerIp != null and registerIp != ''"> and r.register_ip = #{registerIp}</if>
<if test="registerIpCity != null and registerIpCity != ''"> and r.register_ip_city = #{registerIpCity}</if>
<if test="status != null "> and r.status = #{status}</if>
<if test="inviteType != null "> and i.invite_type = #{inviteType}</if>
<if test="orderId != null and orderId != ''"> and r.order_id = #{orderId}</if>
</where>
</select>
<select id="selectTenantAgentInviteRegisterById" parameterType="Long" resultMap="TenantAgentInviteRegisterResult">
<include refid="selectTenantAgentInviteRegisterVo"/>
where id = #{id}
@ -118,7 +82,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="orderId != null">order_id,</if>
</trim>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="agentId != null">#{agentId},</if>
@ -135,7 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="orderId != null">#{orderId},</if>
</trim>
</trim>
</insert>
<update id="updateTenantAgentInviteRegister" parameterType="TenantAgentInviteRegister">
@ -160,11 +124,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id="deleteTenantAgentInviteRegisterById" parameterType="Long">
delete from ff_tenant_agent_invite_register where id = #{id}
delete
from ff_tenant_agent_invite_register
where id = #{id}
</delete>
<delete id="deleteTenantAgentInviteRegisterByIds" parameterType="String">
delete from ff_tenant_agent_invite_register where id in
delete from ff_tenant_agent_invite_register where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>

View File

@ -0,0 +1,89 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ff.game.mapper.GameBettingDetailsBizMapper">
<resultMap type="GameBettingDetails" id="GameBettingDetailsResult">
<result property="id" column="id" />
<result property="tenantKey" column="tenant_key" />
<result property="currencyCode" column="currency_code" />
<result property="memberId" column="member_id" />
<result property="gameCode" column="game_code" />
<result property="gameId" column="game_id" />
<result property="gameType" column="game_type" />
<result property="platformCode" column="platform_code" />
<result property="gameName" column="game_name" />
<result property="gameStatus" column="game_status" />
<result property="gameStatusType" column="game_status_type" />
<result property="gameCurrencyCode" column="game_currency_code" />
<result property="account" column="account" />
<result property="round" column="round" />
<result property="table" column="table" />
<result property="seat" column="seat" />
<result property="betContent" column="bet_content" />
<result property="wagersId" column="wagers_id" />
<result property="wagersTime" column="wagers_time" />
<result property="betAmount" column="bet_amount" />
<result property="payoffTime" column="payoff_time" />
<result property="payoffAmount" column="payoff_amount" />
<result property="settlementTime" column="settlement_time" />
<result property="turnover" column="turnover" />
<result property="orderNo" column="order_no" />
<result property="settlementStatus" column="settlement_status" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectGameBettingDetailsVo">
select * from ff_game_betting_details
</sql>
<select id="selectGameBettingDetailsList" parameterType="com.ff.game.dto.GameBettingDetailsDTO"
resultMap="GameBettingDetailsResult">
<include refid="selectGameBettingDetailsVo"/>
<where>
<if test="tenantKey != null and tenantKey != ''">and tenant_key = #{tenantKey}</if>
<if test="currencyCode != null and currencyCode != ''">and currency_code = #{currencyCode}</if>
<if test="memberId != null ">and member_id = #{memberId}</if>
<if test="gameCode != null ">and game_code = #{gameCode}</if>
<if test="gameId != null ">and game_id = #{gameId}</if>
<if test="gameType != null ">and game_type = #{gameType}</if>
<if test="platformCode != null and platformCode != ''">and platform_code = #{platformCode}</if>
<if test="gameName != null and gameName != ''">and game_name like concat('%', #{gameName}, '%')</if>
<if test="gameStatus != null ">and game_status = #{gameStatus}</if>
<if test="gameStatusType != null ">and game_status_type = #{gameStatusType}</if>
<if test="gameCurrencyCode != null and gameCurrencyCode != ''">and game_currency_code =
#{gameCurrencyCode}
</if>
<if test="account != null and account != ''">and account like concat('%', #{account}, '%')</if>
<if test="wagersId != null ">and wagers_id = #{wagersId}</if>
<if test="wagersTime != null ">and wagers_time = #{wagersTime}</if>
<if test="betAmount != null ">and bet_amount = #{betAmount}</if>
<if test="payoffTime != null ">and payoff_time = #{payoffTime}</if>
<if test="payoffAmount != null ">and payoff_amount = #{payoffAmount}</if>
<if test="settlementTime != null ">and settlement_time = #{settlementTime}</if>
<if test="turnover != null ">and turnover = #{turnover}</if>
<if test="orderNo != null and orderNo != ''">and order_no = #{orderNo}</if>
<if test="settlementStatus != null ">and settlement_status = #{settlementStatus}</if>
<if test="params.beginTime != null and timeType !=null and timeType==1">
AND wagers_time &gt;= #{params.beginTime}
</if>
<if test="params.endTime != null and timeType !=null and timeType==1">
AND wagers_time &lt;= #{params.endTime}
</if>
<if test="params.beginTime != null and timeType !=null and timeType ==2">
AND create_time &gt;= #{params.beginTime}
</if>
<if test="params.endTime != null and timeType !=null and timeType==2">
AND create_time &lt;= #{params.endTime}
</if>
</where>
</select>
</mapper>

View File

@ -0,0 +1,90 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ff.game.mapper.GameBizMapper">
<resultMap type="Game" id="GameResult">
<result property="id" column="id" />
<result property="sortNo" column="sort_no" />
<result property="gameCode" column="game_code" />
<result property="ingress" column="ingress" />
<result property="gameSourceType" column="game_source_type" />
<result property="gameName" column="game_name" />
<result property="nameInfo" column="name_info" typeHandler="com.ff.base.handler.JsonListHandler" javaType="com.ff.game.domain.NameInfo" />
<result property="gameId" column="game_id" />
<result property="platformCode" column="platform_code" />
<result property="platformType" column="platform_type" />
<result property="freespin" column="freespin" />
<result property="demoStatus" column="demo_status" />
<result property="stopStatus" column="stop_status" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<select id="selectGameDTOList" parameterType="com.ff.game.dto.GameDTO" resultMap="GameResult">
select g.id,
g.sort_no,
g.game_code,
g.ingress,
g.game_source_type,
g.game_name,
g.freespin,
g.demo_status,
g.stop_status,
g.create_by,
g.create_time,
g.update_by,
g.update_time
from ff_game g
<where>
<if test="sortNo != null "> and g.sort_no = #{sortNo}</if>
<if test="gameCode != null "> and g.game_code = #{gameCode}</if>
<if test="ingress != null "> and g.ingress = #{ingress}</if>
<if test="gameSourceType != null "> and g.game_source_type = #{gameSourceType}</if>
<if test="gameName != null and gameName != ''"> and name_info like concat('%', #{gameName}, '%')</if>
<if test="freespin != null "> and g.freespin = #{freespin}</if>
<if test="demoStatus != null "> and g.demo_status = #{demoStatus}</if>
<if test="stopStatus != null "> and g.stop_status = #{stopStatus}</if>
<if test="platformCode != null and platformCode != ''"> and g.platform_code = #{platformCode}</if>
</where>
</select>
<select id="selectGameResponseList" resultMap="GameResponseResultMap">
select
g.game_id,
g.game_name,
g.freespin,
g.demo_status,
g.ingress,
g.platform_type,
g.platform_code,
g.name_info
from ff_game g
where g.stop_status=1
</select>
<select id="selectGameUniqueList" parameterType="com.ff.game.api.request.GameUniqueDTO" resultMap="GameResult">
<include refid="selectGameVo"/>
<where>
<if test="sortNo != null "> and sort_no = #{sortNo}</if>
<if test="gameCode != null "> and game_code = #{gameCode}</if>
<if test="ingress != null "> and ingress = #{ingress}</if>
<if test="gameSourceType != null "> and game_source_type = #{gameSourceType}</if>
<if test="gameName != null and gameName != ''"> and game_name like concat('%', #{gameName}, '%')</if>
<if test="freespin != null "> and freespin = #{freespin}</if>
<if test="demoStatus != null "> and demo_status = #{demoStatus}</if>
<if test="stopStatus != null "> and stop_status = #{stopStatus}</if>
<if test="gameIds != null and gameIds.size() >0 ">
and id in
<foreach item="gameId" collection="gameIds" open="(" separator="," close=")">
#{gameId}
</foreach>
</if>
</where>
</select>
</mapper>

View File

@ -0,0 +1,115 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ff.game.mapper.GameExchangeMoneyMapper">
<resultMap type="com.ff.game.dto.GameExchangeMoneyDTO" id="GameExchangeMoneyDTOResult">
<result property="id" column="id"/>
<result property="tenantKey" column="tenant_key"/>
<result property="orderId" column="order_id"/>
<result property="currencyCode" column="currency_code"/>
<result property="transactionId" column="transaction_id"/>
<result property="memberId" column="member_id"/>
<result property="platformCode" column="platform_code"/>
<result property="balance" column="balance"/>
<result property="quota" column="quota"/>
<result property="coinBefore" column="coin_before"/>
<result property="coinAfter" column="coin_after"/>
<result property="currencyBefore" column="currency_before"/>
<result property="currencyAfter" column="currency_after"/>
<result property="exchangeType" column="exchange_type"/>
<result property="status" column="status"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="memberAccount" column="member_account"/>
<result property="gameAccount" column="game_account"/>
<result property="step" column="step"/>
<result property="stepStatus" column="step_status"/>
</resultMap>
<select id="selectGameExchangeMoneyDTOList" parameterType="com.ff.game.dto.GameExchangeMoneyDTO"
resultMap="GameExchangeMoneyDTOResult">
select e.id,
e.tenant_key,
e.currency_code,
e.transaction_id,
e.member_id,
e.platform_code,
e.balance,
e.quota,
e.coin_before,
e.coin_after,
e.currency_before,
e.currency_after,
e.exchange_type,
e.status,
e.order_id,
e.create_by,
e.create_time,
e.update_by,
e.update_time,
m.member_account,
m.game_account
from ff_game_exchange_money e
inner join ff_member m on e.member_id = m.id
<where>
<if test="tenantKey != null and tenantKey != ''">
and e.tenant_key = #{tenantKey}
</if>
<if test="orderId != null and orderId != ''">
and e.order_id = #{orderId}
</if>
<if test="currencyCode != null and currencyCode != ''">
and e.currency_code = #{currencyCode}
</if>
<if test="transactionId != null and transactionId != ''">
and e.transaction_id = #{transactionId}
</if>
<if test="memberId != null ">
and e.member_id = #{memberId}
</if>
<if test="platformCode != null and platformCode != ''">
and e.platform_code = #{platformCode}
</if>
<if test="balance != null ">
and e.balance = #{balance}
</if>
<if test="quota != null ">
and e.quota = #{quota}
</if>
<if test="coinBefore != null ">
and e.coin_before = #{coinBefore}
</if>
<if test="coinAfter != null ">
and e.coin_after = #{coinAfter}
</if>
<if test="currencyBefore != null ">
and e.currency_before = #{currencyBefore}
</if>
<if test="currencyAfter != null ">
and e.currency_after = #{currencyAfter}
</if>
<if test="exchangeType != null ">
and e.exchange_type = #{exchangeType}
</if>
<if test="status != null ">
and e.status = #{status}
</if>
<if test="params.beginTime != null">
AND e.create_time &gt;= #{params.beginTime}
</if>
<if test="params.endTime != null">
AND e.create_time &lt;= #{params.endTime}
</if>
<if test="memberAccount != null and memberAccount != ''">
AND m.member_account &lt;= #{memberAccount}
</if>
</where>
</select>
</mapper>

View File

@ -27,33 +27,6 @@
<result property="stepStatus" column="step_status"/>
</resultMap>
<resultMap type="com.ff.game.dto.GameExchangeMoneyDTO" id="GameExchangeMoneyDTOResult">
<result property="id" column="id"/>
<result property="tenantKey" column="tenant_key"/>
<result property="orderId" column="order_id"/>
<result property="currencyCode" column="currency_code"/>
<result property="transactionId" column="transaction_id"/>
<result property="memberId" column="member_id"/>
<result property="platformCode" column="platform_code"/>
<result property="balance" column="balance"/>
<result property="quota" column="quota"/>
<result property="coinBefore" column="coin_before"/>
<result property="coinAfter" column="coin_after"/>
<result property="currencyBefore" column="currency_before"/>
<result property="currencyAfter" column="currency_after"/>
<result property="exchangeType" column="exchange_type"/>
<result property="status" column="status"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="memberAccount" column="member_account"/>
<result property="gameAccount" column="game_account"/>
<result property="step" column="step"/>
<result property="stepStatus" column="step_status"/>
</resultMap>
<sql id="selectGameExchangeMoneyVo">
select id,
tenant_key,
@ -133,88 +106,6 @@
</where>
</select>
<select id="selectGameExchangeMoneyDTOList" parameterType="com.ff.game.dto.GameExchangeMoneyDTO"
resultMap="GameExchangeMoneyDTOResult">
select e.id,
e.tenant_key,
e.currency_code,
e.transaction_id,
e.member_id,
e.platform_code,
e.balance,
e.quota,
e.coin_before,
e.coin_after,
e.currency_before,
e.currency_after,
e.exchange_type,
e.status,
e.order_id,
e.create_by,
e.create_time,
e.update_by,
e.update_time,
m.member_account,
m.game_account
from ff_game_exchange_money e
inner join ff_member m on e.member_id = m.id
<where>
<if test="tenantKey != null and tenantKey != ''">
and e.tenant_key = #{tenantKey}
</if>
<if test="orderId != null and orderId != ''">
and e.order_id = #{orderId}
</if>
<if test="currencyCode != null and currencyCode != ''">
and e.currency_code = #{currencyCode}
</if>
<if test="transactionId != null and transactionId != ''">
and e.transaction_id = #{transactionId}
</if>
<if test="memberId != null ">
and e.member_id = #{memberId}
</if>
<if test="platformCode != null and platformCode != ''">
and e.platform_code = #{platformCode}
</if>
<if test="balance != null ">
and e.balance = #{balance}
</if>
<if test="quota != null ">
and e.quota = #{quota}
</if>
<if test="coinBefore != null ">
and e.coin_before = #{coinBefore}
</if>
<if test="coinAfter != null ">
and e.coin_after = #{coinAfter}
</if>
<if test="currencyBefore != null ">
and e.currency_before = #{currencyBefore}
</if>
<if test="currencyAfter != null ">
and e.currency_after = #{currencyAfter}
</if>
<if test="exchangeType != null ">
and e.exchange_type = #{exchangeType}
</if>
<if test="status != null ">
and e.status = #{status}
</if>
<if test="params.beginTime != null">
AND e.create_time &gt;= #{params.beginTime}
</if>
<if test="params.endTime != null">
AND e.create_time &lt;= #{params.endTime}
</if>
<if test="memberAccount != null and memberAccount != ''">
AND m.member_account &lt;= #{memberAccount}
</if>
</where>
</select>
<select id="selectGameExchangeMoneyById" parameterType="Long" resultMap="GameExchangeMoneyResult">
<include refid="selectGameExchangeMoneyVo"/>

View File

@ -25,12 +25,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectGameVo">
select id, sort_no, game_code,ingress, game_source_type, game_name, freespin, demo_status, stop_status, create_by, create_time, update_by, update_time, name_info, game_id, platform_code, platform_type from ff_game
select * from ff_game
</sql>
<select id="selectGameList" parameterType="Game" resultMap="GameResult">
<include refid="selectGameVo"/>
<where>
@ -48,39 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</select>
<select id="selectGameDTOList" parameterType="com.ff.game.dto.GameDTO" resultMap="GameResult">
select g.id,
g.sort_no,
g.game_code,
g.ingress,
g.game_source_type,
g.game_name,
g.freespin,
g.demo_status,
g.stop_status,
g.create_by,
g.create_time,
g.update_by,
g.update_time
from ff_game g
<where>
<if test="sortNo != null "> and g.sort_no = #{sortNo}</if>
<if test="gameCode != null "> and g.game_code = #{gameCode}</if>
<if test="ingress != null "> and g.ingress = #{ingress}</if>
<if test="gameSourceType != null "> and g.game_source_type = #{gameSourceType}</if>
<if test="gameName != null and gameName != ''"> and name_info like concat('%', #{gameName}, '%')</if>
<if test="freespin != null "> and g.freespin = #{freespin}</if>
<if test="demoStatus != null "> and g.demo_status = #{demoStatus}</if>
<if test="stopStatus != null "> and g.stop_status = #{stopStatus}</if>
<if test="platformCode != null and platformCode != ''"> and g.platform_code = #{platformCode}</if>
</where>
</select>
<select id="selectGameById" parameterType="Long" resultMap="GameResult">
<include refid="selectGameVo"/>
where id = #{id}
@ -186,25 +152,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<select id="selectGameResponseList" resultMap="GameResponseResultMap">
select
g.game_id,
g.game_name,
g.freespin,
g.demo_status,
g.ingress,
g.platform_type,
g.platform_code,
g.name_info
from ff_game g
where g.stop_status=1
</select>
<select id="selectGameUniqueList" parameterType="com.ff.game.api.request.GameUniqueDTO" resultMap="GameResult">
<include refid="selectGameVo"/>
<where>

View File

@ -42,46 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select id,tenant_key, currency_code, member_id, game_code, game_id, game_type, platform_code, game_name, game_status, game_status_type, game_currency_code, account, round, `table`, seat, bet_content, wagers_id, wagers_time, bet_amount, payoff_time, payoff_amount, settlement_time, turnover, order_no, settlement_status, create_by, create_time, update_by, update_time from ff_game_betting_details
</sql>
<select id="selectGameBettingDetailsList" parameterType="com.ff.game.dto.GameBettingDetailsDTO" resultMap="GameBettingDetailsResult">
<include refid="selectGameBettingDetailsVo"/>
<where>
<if test="tenantKey != null and tenantKey != ''"> and tenant_key = #{tenantKey}</if>
<if test="currencyCode != null and currencyCode != ''"> and currency_code = #{currencyCode}</if>
<if test="memberId != null "> and member_id = #{memberId}</if>
<if test="gameCode != null "> and game_code = #{gameCode}</if>
<if test="gameId != null "> and game_id = #{gameId}</if>
<if test="gameType != null "> and game_type = #{gameType}</if>
<if test="platformCode != null and platformCode != ''"> and platform_code = #{platformCode}</if>
<if test="gameName != null and gameName != ''"> and game_name like concat('%', #{gameName}, '%')</if>
<if test="gameStatus != null "> and game_status = #{gameStatus}</if>
<if test="gameStatusType != null "> and game_status_type = #{gameStatusType}</if>
<if test="gameCurrencyCode != null and gameCurrencyCode != ''"> and game_currency_code = #{gameCurrencyCode}</if>
<if test="account != null and account != ''"> and account like concat('%', #{account}, '%')</if>
<if test="wagersId != null "> and wagers_id = #{wagersId}</if>
<if test="wagersTime != null "> and wagers_time = #{wagersTime}</if>
<if test="betAmount != null "> and bet_amount = #{betAmount}</if>
<if test="payoffTime != null "> and payoff_time = #{payoffTime}</if>
<if test="payoffAmount != null "> and payoff_amount = #{payoffAmount}</if>
<if test="settlementTime != null "> and settlement_time = #{settlementTime}</if>
<if test="turnover != null "> and turnover = #{turnover}</if>
<if test="orderNo != null and orderNo != ''"> and order_no = #{orderNo}</if>
<if test="settlementStatus != null "> and settlement_status = #{settlementStatus}</if>
<if test="params.beginTime != null and timeType !=null and timeType==1">
AND wagers_time &gt;= #{params.beginTime}
</if>
<if test="params.endTime != null and timeType !=null and timeType==1">
AND wagers_time &lt;= #{params.endTime}
</if>
<if test="params.beginTime != null and timeType !=null and timeType ==2">
AND create_time &gt;= #{params.beginTime}
</if>
<if test="params.endTime != null and timeType !=null and timeType==2">
AND create_time &lt;= #{params.endTime}
</if>
</where>
</select>
<select id="selectGameBettingDetailsById" parameterType="Long" resultMap="GameBettingDetailsResult">
<include refid="selectGameBettingDetailsVo"/>