主播游戏薪资操作

This commit is contained in:
2025-08-04 15:43:16 +08:00
parent b81a9d11d2
commit 75a54aaf52
10 changed files with 471 additions and 22 deletions

View File

@@ -0,0 +1,241 @@
package com.accompany.admin.service.guildgame;
import com.accompany.business.constant.guild.GuildConstant;
import com.accompany.business.constant.guild.GuildUsdOperateTypeEnum;
import com.accompany.business.constant.guildgame.GameTimeUtil;
import com.accompany.business.model.UserPurse;
import com.accompany.business.model.guild.Guild;
import com.accompany.business.model.guild.GuildMember;
import com.accompany.business.param.BasePageParams;
import com.accompany.business.service.guild.GuildMemberService;
import com.accompany.business.service.guild.GuildService;
import com.accompany.business.service.guildgame.GameUsdBillRecordService;
import com.accompany.business.service.purse.UserPurseService;
import com.accompany.business.service.user.UsersService;
import com.accompany.business.vo.guild.AgencyOwnerVo;
import com.accompany.business.vo.guild.GuildDateCycleVo;
import com.accompany.business.vo.guildgame.AnchorGameSalaryBillAdminVo;
import com.accompany.common.status.BusiStatus;
import com.accompany.common.utils.DateTimeUtil;
import com.accompany.core.exception.AdminServiceException;
import com.accompany.core.exception.ServiceException;
import com.accompany.core.model.PartitionInfo;
import com.accompany.core.model.Users;
import com.accompany.core.service.partition.PartitionInfoService;
import com.accompany.core.service.region.RegionInfoService;
import com.accompany.core.vo.BaseResponseVO;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.util.*;
import java.util.stream.Collectors;
@Service
public class GameUsdBillRecordAdminService {
@Autowired
private GameUsdBillRecordService gameUsdBillRecordService;
@Autowired
private UsersService usersService;
@Autowired
private GuildMemberService guildMemberService;
@Autowired
private GuildService guildService;
@Autowired
private UserPurseService userPurseService;
@Autowired
private PartitionInfoService partitionInfoService;
@Autowired
private RegionInfoService regionInfoService;
public Page<AnchorGameSalaryBillAdminVo> chargeAgentList(BasePageParams basePageParams, Long chargeAgentErbanNo, Long erbanNo) {
if (null == basePageParams.getPartitionId()){
throw new AdminServiceException(BusiStatus.PARAMERROR);
}
Long receiveUid = null;
Long uid = null;
if (chargeAgentErbanNo != null){
Users users = usersService.getUserByErbanNo(chargeAgentErbanNo);
if (users == null){
throw new ServiceException(BusiStatus.SERVERERROR,"充值代理ID输入错误");
}
receiveUid = users.getUid();
}
if (erbanNo != null){
Users users = usersService.getUserByErbanNo(erbanNo);
if (users == null){
throw new ServiceException(BusiStatus.SERVERERROR,"主播ID输入错误");
}
uid = users.getUid();
}
return gameUsdBillRecordService.listPage(basePageParams, uid, receiveUid, GuildUsdOperateTypeEnum.USD_TO_RECHARGE_USER.getType(), null );
}
public Double chargeAgentSum(BasePageParams basePageParams, Long chargeAgentErbanNo, Long erbanNo) {
if (null == basePageParams.getPartitionId()){
throw new AdminServiceException(BusiStatus.PARAMERROR);
}
Long receiveUid = null;
Long uid = null;
if (chargeAgentErbanNo != null){
Users users = usersService.getUserByErbanNo(chargeAgentErbanNo);
if (users == null){
throw new ServiceException(BusiStatus.SERVERERROR,"充值代理ID输入错误");
}
receiveUid = users.getUid();
}
if (erbanNo != null){
Users users = usersService.getUserByErbanNo(erbanNo);
if (users == null){
throw new ServiceException(BusiStatus.SERVERERROR,"主播ID输入错误");
}
uid = users.getUid();
}
return gameUsdBillRecordService.sum(basePageParams.getPartitionId(), uid, receiveUid,
basePageParams.getStartTime(), basePageParams.getEndTime() , GuildUsdOperateTypeEnum.USD_TO_RECHARGE_USER.getType());
}
public Page<AnchorGameSalaryBillAdminVo> anchorSummary(BasePageParams basePageParams, Long erbanNo, Long agencyOwnerId, Integer agencyId, String dateCycle) {
if (null == basePageParams.getPartitionId()){
throw new ServiceException(BusiStatus.SERVERERROR, "请输入分区");
}
if (StringUtils.isEmpty(dateCycle)) {
throw new ServiceException(BusiStatus.SERVERERROR, "请输入周期");
}
Page<AnchorGameSalaryBillAdminVo> page = new Page<>(basePageParams.getPageNo(), basePageParams.getPageSize());
Long uid = null;
Integer guildId = null;
if (erbanNo != null) {
Users users = usersService.getUserByErbanNo(erbanNo);
if (users == null) {
throw new ServiceException(BusiStatus.SERVERERROR, "请输入正确用户");
}
uid = users.getUid();
}
if (agencyId != null) {
Guild guild = guildService.getVaildGuildById(agencyId);
if (guild == null) {
throw new ServiceException(BusiStatus.SERVERERROR, "公会id输入错误");
}
guildId = guild.getId();
}
if (agencyOwnerId != null) {
Users users = usersService.getUserByErbanNo(agencyOwnerId);
if (users == null) {
throw new ServiceException(BusiStatus.SERVERERROR, "公会长id输入错误");
}
GuildMember guildMember = guildMemberService.getVaildGuildMemberByUid(users.getUid());
if (guildMember == null) {
throw new ServiceException(BusiStatus.SERVERERROR, "该用户不属于任何公会");
}
if (GuildConstant.RoleType.NORMAL.equals(guildMember.getRoleType())) {
throw new ServiceException(BusiStatus.SERVERERROR, "该用户不是公会长");
}
guildId = guildMember.getGuildId();
}
Page<AnchorGameSalaryBillAdminVo> anchorSalaryBillAdminVoPage =
gameUsdBillRecordService.anchorSummary(page, dateCycle, uid, guildId, basePageParams.getPartitionId());
if (CollectionUtils.isEmpty(anchorSalaryBillAdminVoPage.getRecords())) {
return anchorSalaryBillAdminVoPage;
}
fillUserInfo(anchorSalaryBillAdminVoPage.getRecords());
fillAgencyInfo(anchorSalaryBillAdminVoPage.getRecords());
fillAgencyPurse(anchorSalaryBillAdminVoPage.getRecords());
return anchorSalaryBillAdminVoPage;
}
private void fillUserInfo(List<AnchorGameSalaryBillAdminVo> anchorSalaryBillVos) {
List<Long> uids = anchorSalaryBillVos.stream().map(AnchorGameSalaryBillAdminVo::getUid).collect(Collectors.toList());
Map<Long, Users> cacheByUid = usersService.getUsersMapByUids(uids);
Map<Integer, String> partitionDescMap = partitionInfoService.listAll().stream().collect(Collectors.toMap(PartitionInfo::getId, PartitionInfo::getDesc));
for (AnchorGameSalaryBillAdminVo anchorSalaryBillVo : anchorSalaryBillVos) {
Users users = cacheByUid.get(anchorSalaryBillVo.getUid());
if (users!=null){
anchorSalaryBillVo.setErbano(users.getErbanNo());
anchorSalaryBillVo.setNick(users.getNick());
anchorSalaryBillVo.setPartitionDesc(partitionDescMap.get(users.getPartitionId()));
}
}
}
private void fillAgencyInfo(List<AnchorGameSalaryBillAdminVo> records) {
Set<Integer> hallIds = records.stream().map(AnchorGameSalaryBillAdminVo::getHallId).collect(Collectors.toSet());
Map<Integer, AgencyOwnerVo> agencyOwnerMapByHallIds = guildService.getAgencyOwnerMapByHallIds(hallIds);
Map<Integer, String> regionNameMap = regionInfoService.getRegionName();
for (AnchorGameSalaryBillAdminVo record : records) {
AgencyOwnerVo agencyOwnerVo = agencyOwnerMapByHallIds.get(record.getHallId());
if (agencyOwnerVo != null){
record.setAgencyOwnerErbanNo(agencyOwnerVo.getErbanNo());
record.setAgencyId(agencyOwnerVo.getAgencyId());
record.setAgencyOwnerRegionDesc(regionNameMap.get(agencyOwnerVo.getRegionId()));
}
}
}
private void fillAgencyPurse(List<AnchorGameSalaryBillAdminVo> records) {
if (CollectionUtils.isEmpty(records)){
return;
}
Set<Long> uids = records.stream().map(AnchorGameSalaryBillAdminVo::getUid).collect(Collectors.toSet());
Map<Long, UserPurse> agencyPurseMap = userPurseService.getAgencyPurseMap(uids);
for (AnchorGameSalaryBillAdminVo record : records) {
UserPurse userPurse = agencyPurseMap.get(record.getUid());
if (userPurse!= null){
record.setUsb(userPurse.getGameUsd());
}
}
}
public Page<AnchorGameSalaryBillAdminVo> baselist(BasePageParams pageParams, Long uid, Integer salaryType, Long hallId) {
return gameUsdBillRecordService.listPage(pageParams, uid, null, salaryType,hallId);
}
public BaseResponseVO<List<GuildDateCycleVo>> dateCycleList(Long month) {
ZonedDateTime now = DateTimeUtil.getDateTimeByZoneId(ZoneId.systemDefault().getId());
List<GuildDateCycleVo> agencyDateCycleVos = new ArrayList<>();
for (int i = 0; i < month; i++) {
ZonedDateTime zdt = now.minusMonths(i);
String cycleDate = GameTimeUtil.getCycleDate(zdt);
String cycleEndDate = GameTimeUtil.getCycleEndDate(zdt);
GuildDateCycleVo dateCycle = new GuildDateCycleVo();
dateCycle.setDateCycle(cycleDate);
Date startDate = DateTimeUtil.convertStrToDate(cycleDate, DateTimeUtil.DEFAULT_DATE_PATTERN);
Date endDate = DateTimeUtil.getEndTimeOfDay(DateTimeUtil.convertStrToDate(cycleEndDate, DateTimeUtil.DEFAULT_DATE_PATTERN));
dateCycle.setStartDate(startDate);
dateCycle.setEndDate(endDate);
dateCycle.setStartDateStr(cycleDate);
dateCycle.setEndDateStr(cycleEndDate);
agencyDateCycleVos.add(dateCycle);
}
return new BaseResponseVO<>(agencyDateCycleVos);
}
}

View File

@@ -0,0 +1,79 @@
package com.accompany.admin.controller.guildgame;
import com.accompany.admin.service.guildgame.GameUsdBillRecordAdminService;
import com.accompany.business.param.BasePageParams;
import com.accompany.business.vo.guild.GuildDateCycleVo;
import com.accompany.business.vo.guildgame.AnchorGameSalaryBillAdminVo;
import com.accompany.core.vo.BaseResponseVO;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.support.ExcelTypeEnum;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.List;
@RestController
@RequestMapping("/anchorGameSalaryBill")
public class AnchorGameSalaryBillController {
@Autowired
private GameUsdBillRecordAdminService gameUsdBillRecordAdminService;
@ApiOperation("主播游戏薪资列表")
@GetMapping("/anchorSummary/list")
public BaseResponseVO<Page<AnchorGameSalaryBillAdminVo>> anchorSummaryList(BasePageParams basePageParams, Long erbanNo,
Long agencyOwnerId, Integer agencyId, String dateCycle) {
Page<AnchorGameSalaryBillAdminVo> page = gameUsdBillRecordAdminService.anchorSummary(basePageParams, erbanNo, agencyOwnerId, agencyId, dateCycle);
return new BaseResponseVO(page);
}
@ApiOperation("明细列表")
@GetMapping("/detail/list")
public BaseResponseVO<Page<AnchorGameSalaryBillAdminVo>> detailList(BasePageParams basePageParams, Long uid, Integer salaryType, Long hallId) {
Page<AnchorGameSalaryBillAdminVo> page = gameUsdBillRecordAdminService.baselist(basePageParams, uid, salaryType, hallId);
return new BaseResponseVO(page);
}
@ApiOperation("充值代理列表")
@GetMapping("/chargeAgent/list")
public BaseResponseVO<Page<AnchorGameSalaryBillAdminVo>> chargeAgentList(BasePageParams basePageParams, Long chargeAgentErbanNo, Long erbanNo) {
Page<AnchorGameSalaryBillAdminVo> page = gameUsdBillRecordAdminService.chargeAgentList(basePageParams, chargeAgentErbanNo, erbanNo);
return new BaseResponseVO(page);
}
@ApiOperation("充值代理列表-导出")
@GetMapping("/chargeAgent/export")
public void chargeAgentList(HttpServletResponse response, BasePageParams basePageParams, Long chargeAgentErbanNo, Long erbanNo) throws IOException {
basePageParams.setPageNo(-1);
basePageParams.setPageSize(-1);
Page<AnchorGameSalaryBillAdminVo> page = gameUsdBillRecordAdminService.chargeAgentList(basePageParams, chargeAgentErbanNo, erbanNo);
response.setContentType("application/vnd.ms-excel");
response.setCharacterEncoding("utf-8");
// 这里URLEncoder.encode可以防止中文乱码
String excelName = URLEncoder.encode("充值代理收入转赠游戏薪资", StandardCharsets.UTF_8);
response.setHeader("Content-disposition", "attachment;filename=" + excelName + ExcelTypeEnum.XLSX.getValue());
EasyExcel.write(response.getOutputStream(), AnchorGameSalaryBillAdminVo.class).sheet("充值代理收入转赠游戏薪资").doWrite(page.getRecords());
}
@ApiOperation("转增总值")
@GetMapping("/chargeAgent/sum")
public BaseResponseVO<Double> chargeAgentSum(BasePageParams basePageParams, Long chargeAgentErbanNo, Long erbanNo) {
Double sum = gameUsdBillRecordAdminService.chargeAgentSum(basePageParams, chargeAgentErbanNo, erbanNo);
return new BaseResponseVO(sum);
}
@ApiOperation("获取周期list")
@GetMapping("/dateCycle/list")
public BaseResponseVO<List<GuildDateCycleVo>> dateCycleList(Long month) {
return gameUsdBillRecordAdminService.dateCycleList(month);
}
}

View File

@@ -2,8 +2,10 @@ package com.accompany.business.constant.guildgame;
import com.accompany.common.utils.DateTimeUtil;
import java.time.LocalTime;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.time.temporal.TemporalAdjusters;
public class GameTimeUtil {
@@ -12,6 +14,11 @@ public class GameTimeUtil {
.format(DateTimeFormatter.ofPattern(DateTimeUtil.DEFAULT_DATE_PATTERN));
}
public static String getCycleEndDate(ZonedDateTime zdt) {
return zdt.with(TemporalAdjusters.lastDayOfMonth())
.with(LocalTime.MAX).format(DateTimeFormatter.ofPattern(DateTimeUtil.DEFAULT_DATE_PATTERN));
}
public static String getStatDate(ZonedDateTime zdt){
return zdt.format(DateTimeFormatter.ofPattern(DateTimeUtil.DEFAULT_DATE_PATTERN));
}

View File

@@ -0,0 +1,122 @@
package com.accompany.business.vo.guildgame;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.*;
import java.util.Date;
/**
* <p>
* 主播薪资流水(主播薪资结算)
* </p>
*
* @author wxf
* @since 2024-07-23
*/
@Getter
@Setter
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class AnchorGameSalaryBillAdminVo {
@ExcelIgnore
private Long uid;
@ExcelProperty("订单号")
private String no;
@ExcelProperty("主播ID")
private Long erbano;
@ExcelProperty("主播昵称")
private String nick;
@ExcelIgnore
private String partitionDesc;
@ExcelIgnore
private String abbr;
@ExcelIgnore
private Long receiveUid;
@ExcelProperty("充值代理昵称")
private String receiveNick;
@ExcelProperty("充值代理ID ")
private Long receiveErbano;
@ExcelIgnore
private String receiveAbbr;
@ExcelProperty("转增薪资")
private Double tradeUsb;
@ExcelIgnore
private Double beforeUsb;
@ExcelIgnore
private Double afterUsb;
@ExcelIgnore
private Double afterDiamond;
@ExcelIgnore
private Double exDiamond;
@ExcelProperty("对应金币数")
private Long gold;
@ExcelIgnore
private Date createTime;
@ExcelProperty("时间")
private String createTimeStr;
@ExcelIgnore
private Double usb;
@ExcelIgnore
private Double diamond;
/**
* 公会主键id
*/
@ExcelIgnore
private Integer hallId;
/**
* 公会id
*/
@ExcelIgnore
private Integer agencyId;
/**
* 公会长id
*/
@ExcelIgnore
private Long agencyOwnerErbanNo;
@ExcelIgnore
private String agencyOwnerRegionDesc;
/**
* 钻石兑换薪资
*/
@ExcelIgnore
private Double receiveUsd;
/**
* 薪资兑换金币
*/
@ExcelIgnore
private Double usbToGold;
/**
* 薪资转增代理
*/
@ExcelIgnore
private Double usbToAgent;
/**
* 薪资转增公会长
*/
@ExcelIgnore
private Double usbToOwner;
/**
* 官方提现
*/
@ExcelIgnore
private Double officialWithdram;
@ExcelIgnore
private String dateCycle;
@ExcelIgnore
private Integer type;
@ExcelIgnore
private String remark;
/**
* 官方操作
*/
@ExcelIgnore
private Double platformOperationUsb;
}

View File

@@ -1,7 +1,7 @@
package com.accompany.business.mybatismapper.guildgame;
import com.accompany.business.model.guildgame.GameUsdBillRecord;
import com.accompany.business.vo.guild.AnchorSalaryBillAdminVo;
import com.accompany.business.vo.guildgame.AnchorGameSalaryBillAdminVo;
import com.accompany.business.vo.guildgame.GameUsdAccountCycleUsdStatVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -30,7 +30,7 @@ public interface GameUsdBillRecordMapper extends BaseMapper<GameUsdBillRecord> {
@Param("salaryOperateType") Integer salaryOperateType);
Page<AnchorSalaryBillAdminVo> anchorSummary(@Param("page") Page<AnchorSalaryBillAdminVo> page,
Page<AnchorGameSalaryBillAdminVo> anchorSummary(@Param("page") Page<AnchorGameSalaryBillAdminVo> page,
@Param("dateCycle") String dateCycle, @Param("uid") Long uid, @Param("hallId") Integer hallId, @Param("partitionId") Integer partitionId);
Double sumRechargeUsd(@Param("receiveUid") Long receiveUid, @Param("cycleDate") String cycleDate, @Param("salaryOperateType") Integer salaryOperateType);

View File

@@ -9,7 +9,7 @@ import com.accompany.business.mybatismapper.guildgame.GameUsdBillRecordMapper;
import com.accompany.business.param.BasePageParams;
import com.accompany.business.service.user.UsersService;
import com.accompany.business.util.CycleTimeUtil;
import com.accompany.business.vo.guild.AnchorSalaryBillAdminVo;
import com.accompany.business.vo.guildgame.AnchorGameSalaryBillAdminVo;
import com.accompany.business.vo.guildgame.GameUsdAccountCycleUsdStatVo;
import com.accompany.business.vo.guildgame.GameUsdBillRecordVo;
import com.accompany.business.vo.guildgame.GameUsdRechargeUserRecordVo;
@@ -293,13 +293,13 @@ public class GameUsdBillRecordService extends ServiceImpl<GameUsdBillRecordMappe
return baseMapper.getCycleUsdStatInCycleDateList(memberId, cycleDateList);
}
public Page<AnchorSalaryBillAdminVo> listPage(BasePageParams pageParams, Long uid, Long receiveUid, Integer salaryOperateType, Long hallId) {
public Page<AnchorGameSalaryBillAdminVo> listPage(BasePageParams pageParams, Long uid, Long receiveUid, Integer salaryOperateType, Long hallId) {
Page<GameUsdBillRecord> ipage = new Page<>(pageParams.getPageNo(), pageParams.getPageSize());
Page<GameUsdBillRecord> anchorSalaryBillPage = this.baseMapper.listPage(ipage, pageParams.getPartitionId(), pageParams.getDateCycle(),
uid, receiveUid, pageParams.getStartTime(), pageParams.getEndTime(), salaryOperateType,hallId);
List<AnchorSalaryBillAdminVo> anchorSalaryBillVos = converAdminBillVo(anchorSalaryBillPage.getRecords());
List<AnchorGameSalaryBillAdminVo> anchorSalaryBillVos = converAdminBillVo(anchorSalaryBillPage.getRecords());
Page<AnchorSalaryBillAdminVo> page = new Page<>();
Page<AnchorGameSalaryBillAdminVo> page = new Page<>();
page.setTotal(anchorSalaryBillPage.getTotal());
page.setRecords(anchorSalaryBillVos);
fillUserInfo(page.getRecords());
@@ -315,13 +315,13 @@ public class GameUsdBillRecordService extends ServiceImpl<GameUsdBillRecordMappe
return baseMapper.sumRechargeUsd(receiveUid, cycleDate, salaryOperateType);
}
private void fillReceiveUserInfo(List<AnchorSalaryBillAdminVo> anchorSalaryBillVos) {
List<Long> uids = anchorSalaryBillVos.stream().map(AnchorSalaryBillAdminVo::getReceiveUid).filter(Objects::nonNull).collect(Collectors.toList());
private void fillReceiveUserInfo(List<AnchorGameSalaryBillAdminVo> anchorSalaryBillVos) {
List<Long> uids = anchorSalaryBillVos.stream().map(AnchorGameSalaryBillAdminVo::getReceiveUid).filter(Objects::nonNull).collect(Collectors.toList());
if (org.springframework.util.CollectionUtils.isEmpty(uids)){
return;
}
Map<Long, Users> cacheByUid = usersService.getUsersMapByUids(uids);
for (AnchorSalaryBillAdminVo anchorSalaryBillVo : anchorSalaryBillVos) {
for (AnchorGameSalaryBillAdminVo anchorSalaryBillVo : anchorSalaryBillVos) {
Users users = cacheByUid.get(anchorSalaryBillVo.getReceiveUid());
if (users!=null){
anchorSalaryBillVo.setReceiveErbano(users.getErbanNo());
@@ -330,11 +330,11 @@ public class GameUsdBillRecordService extends ServiceImpl<GameUsdBillRecordMappe
}
}
private void fillUserInfo(List<AnchorSalaryBillAdminVo> anchorSalaryBillVos) {
List<Long> uids = anchorSalaryBillVos.stream().map(AnchorSalaryBillAdminVo::getUid).collect(Collectors.toList());
private void fillUserInfo(List<AnchorGameSalaryBillAdminVo> anchorSalaryBillVos) {
List<Long> uids = anchorSalaryBillVos.stream().map(AnchorGameSalaryBillAdminVo::getUid).collect(Collectors.toList());
Map<Long, Users> cacheByUid = usersService.getUsersMapByUids(uids);
Map<Integer, String> partitionDescMap = partitionInfoService.listAll().stream().collect(Collectors.toMap(PartitionInfo::getId, PartitionInfo::getDesc));
for (AnchorSalaryBillAdminVo anchorSalaryBillVo : anchorSalaryBillVos) {
for (AnchorGameSalaryBillAdminVo anchorSalaryBillVo : anchorSalaryBillVos) {
Users users = cacheByUid.get(anchorSalaryBillVo.getUid());
if (users!=null){
anchorSalaryBillVo.setErbano(users.getErbanNo());
@@ -344,10 +344,10 @@ public class GameUsdBillRecordService extends ServiceImpl<GameUsdBillRecordMappe
}
}
private List<AnchorSalaryBillAdminVo> converAdminBillVo(List<GameUsdBillRecord> anchorSalaryBills) {
List<AnchorSalaryBillAdminVo> anchorSalaryBillAdminVos = new ArrayList<>();
private List<AnchorGameSalaryBillAdminVo> converAdminBillVo(List<GameUsdBillRecord> anchorSalaryBills) {
List<AnchorGameSalaryBillAdminVo> anchorSalaryBillAdminVos = new ArrayList<>();
for (GameUsdBillRecord anchorSalaryBill : anchorSalaryBills) {
AnchorSalaryBillAdminVo anchorSalaryBillAdminVo = new AnchorSalaryBillAdminVo();
AnchorGameSalaryBillAdminVo anchorSalaryBillAdminVo = new AnchorGameSalaryBillAdminVo();
anchorSalaryBillAdminVo.setCreateTime(anchorSalaryBill.getCreateTime());
anchorSalaryBillAdminVo.setCreateTimeStr(DateTimeUtil.convertWithZoneId(anchorSalaryBill.getCreateTime()
, PartitionEnum.getByPartitionId(anchorSalaryBill.getPartitionId()).getZoneId()).format(DateTimeUtil.datetimeFormatter));
@@ -365,7 +365,7 @@ public class GameUsdBillRecordService extends ServiceImpl<GameUsdBillRecordMappe
return anchorSalaryBillAdminVos;
}
public Page<AnchorSalaryBillAdminVo> anchorSummary(Page<AnchorSalaryBillAdminVo> page, String dateCycle, Long uid, Integer hallId, Integer partitionId) {
public Page<AnchorGameSalaryBillAdminVo> anchorSummary(Page<AnchorGameSalaryBillAdminVo> page, String dateCycle, Long uid, Integer hallId, Integer partitionId) {
return baseMapper.anchorSummary(page, dateCycle, uid, hallId, partitionId);
}

View File

@@ -84,16 +84,16 @@
order by create_time desc
</select>
<select id="anchorSummary" resultType="com.accompany.business.vo.guild.AnchorSalaryBillAdminVo">
<select id="anchorSummary" resultType="com.accompany.business.vo.guildgame.AnchorGameSalaryBillAdminVo">
SELECT hm.uid,hm.guild_id hallId, hm.guild_id agencyId,
IFNULL(a.diamondToUsb,0) diamondToUsb,
IFNULL(a.diamondToUsb,0) receiveUsd,
IFNULL(a.usbToGold,0) usbToGold,
IFNULL(a.usbToAgent,0) usbToAgent,
IFNULL(a.usbToOwner,0) usbToOwner,
IFNULL(a.officialWithdram,0) officialWithdram FROM guild_member hm
LEFT JOIN
(select uid,guild_id,
sum(IF( FIND_IN_SET( type, 1), operate_usd, 0 )) diamondToUsb,
sum(IF( FIND_IN_SET( type, 1), operate_usd, 0 )) receiveUsd,
sum(IF( FIND_IN_SET( type, 2), operate_usd, 0 )) usbToGold,
sum(IF( FIND_IN_SET( type, 3), operate_usd, 0 )) usbToAgent,
sum(IF( FIND_IN_SET( type, 4), operate_usd, 0 )) usbToOwner,

View File

@@ -1,4 +1,4 @@
package com.accompany.business.controller.guild;
package com.accompany.business.controller.guildgame;
import com.accompany.business.service.guildgame.GameUsdOperateService;
import com.accompany.business.service.guildgame.GameUsdService;

View File

@@ -1,4 +1,4 @@
package com.accompany.business.controller.guild;
package com.accompany.business.controller.guildgame;
import com.accompany.business.service.guildgame.GameUsdBillRecordService;
import com.accompany.business.vo.guildgame.GameUsdBillRecordVo;

View File

@@ -1,4 +1,4 @@
package com.accompany.business.controller.guild;
package com.accompany.business.controller.guildgame;
import com.accompany.business.service.guildgame.GameUsdWithdrawAccountService;
import com.accompany.business.vo.guildgame.GameUsdWithdrawAccountVo;