Browse Source

Merge remote-tracking branch 'origin/package' into package

zhangxianyu 8 months ago
parent
commit
759010e001

+ 24 - 3
game-gs-data/game-gs-data-serve/src/main/java/com/zanxiang/game/gs/data/serve/controller/GameParentController.java

@@ -2,10 +2,10 @@ package com.zanxiang.game.gs.data.serve.controller;
 
 
 import com.mybatisflex.core.row.Row;
 import com.mybatisflex.core.row.Row;
 import com.zanxiang.game.gs.data.serve.pojo.dto.BigRDTO;
 import com.zanxiang.game.gs.data.serve.pojo.dto.BigRDTO;
+import com.zanxiang.game.gs.data.serve.pojo.dto.RoleManageDTO;
 import com.zanxiang.game.gs.data.serve.pojo.dto.RolePayDTO;
 import com.zanxiang.game.gs.data.serve.pojo.dto.RolePayDTO;
-import com.zanxiang.game.gs.data.serve.pojo.vo.BigRVO;
-import com.zanxiang.game.gs.data.serve.pojo.vo.PageVO;
-import com.zanxiang.game.gs.data.serve.pojo.vo.RolePayVO;
+import com.zanxiang.game.gs.data.serve.pojo.dto.RoleRemoveGameMonitorDTO;
+import com.zanxiang.game.gs.data.serve.pojo.vo.*;
 import com.zanxiang.game.gs.data.serve.service.IAdsRoleAmountDataParentService;
 import com.zanxiang.game.gs.data.serve.service.IAdsRoleAmountDataParentService;
 import com.zanxiang.game.gs.data.serve.service.IAdsRoleAmountRateParentService;
 import com.zanxiang.game.gs.data.serve.service.IAdsRoleAmountRateParentService;
 import com.zanxiang.module.util.pojo.ResultVO;
 import com.zanxiang.module.util.pojo.ResultVO;
@@ -49,4 +49,25 @@ public class GameParentController {
         return ResultVO.ok(adsRoleAmountRateParentService.rolePayTotal(dto));
         return ResultVO.ok(adsRoleAmountRateParentService.rolePayTotal(dto));
     }
     }
 
 
+    @ApiOperation(value = "角色流失监控")
+//    @PreAuthorize(permissionKey = "gameGs:roleRemoveGame:monitor")
+    @PostMapping("/role/remove/game/monitor")
+    public ResultVO<PageVO<RoleRemoveGameMonitorVO, Row>> roleRemoveGameMonitor(@Validated @RequestBody RoleRemoveGameMonitorDTO dto) {
+        return ResultVO.ok(adsRoleAmountDataParentService.roleRemoveGameMonitor(dto));
+    }
+
+    @ApiOperation(value = "游戏角色管理")
+//    @PreAuthorize(permissionKey = "gameGs:role:manage")
+    @PostMapping("/role/manage")
+    public ResultVO<PageVO<RoleManageVO, Row>> roleManage(@Validated @RequestBody RoleManageDTO dto) {
+        return ResultVO.ok(adsRoleAmountDataParentService.roleManage(dto));
+    }
+
+//    @ApiOperation(value = "游戏角色管理")
+////    @PreAuthorize(permissionKey = "gameGs:role:manage")
+//    @PostMapping("/role/manage")
+//    public ResultVO<PageVO<RoleManageVO, Row>> roleManage(@Validated @RequestBody RoleManageDTO dto) {
+//        return ResultVO.ok(adsRoleAmountDataParentService.roleManage(dto));
+//    }
+
 }
 }

+ 49 - 0
game-gs-data/game-gs-data-serve/src/main/java/com/zanxiang/game/gs/data/serve/pojo/dto/RoleManageDTO.java

@@ -0,0 +1,49 @@
+package com.zanxiang.game.gs.data.serve.pojo.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import javax.validation.constraints.NotNull;
+import java.time.LocalDate;
+import java.util.List;
+
+@EqualsAndHashCode(callSuper = true)
+@Data
+public class RoleManageDTO extends BaseListDTO {
+    @NotNull(message = "SDK来源必填")
+    @ApiModelProperty(notes = "必填:SDK来源;默认ZX_ONE")
+    private String sourceSystem;
+    @ApiModelProperty("排序字段")
+    private String sortFiled;
+    @ApiModelProperty("排序类型:升序 true;降序 false")
+    private Boolean sortAsc = true;
+
+    @ApiModelProperty("gs id 列表")
+    private List<Long> gsIdList;
+
+    @ApiModelProperty("父游戏id")
+    private Long parentGameId;
+
+    @ApiModelProperty("角色名称")
+    private String roleName;
+
+    @ApiModelProperty("角色创建日期开始")
+    private LocalDate roleCreateDayBegin;
+    @ApiModelProperty("角色创建日期结束")
+    private LocalDate roleCreateDayEnd;
+
+    @ApiModelProperty("超父游戏id")
+    private Integer superGameId;
+    @ApiModelProperty("角色当前所在区服id列表")
+    private List<String> serverIdList;
+
+    @ApiModelProperty("服务日期开始")
+    private LocalDate serveDayBegin;
+    @ApiModelProperty("服务日期开始")
+    private LocalDate serveDayEnd;
+
+    @ApiModelProperty("服务状态:1:服务中;2:服务完成")
+    private Integer serveStatus;
+
+}

+ 50 - 0
game-gs-data/game-gs-data-serve/src/main/java/com/zanxiang/game/gs/data/serve/pojo/dto/RoleRemoveGameMonitorDTO.java

@@ -0,0 +1,50 @@
+package com.zanxiang.game.gs.data.serve.pojo.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import javax.validation.constraints.NotNull;
+import java.time.LocalDate;
+import java.util.List;
+
+@EqualsAndHashCode(callSuper = true)
+@Data
+public class RoleRemoveGameMonitorDTO extends BaseListDTO {
+    @NotNull(message = "SDK来源必填")
+    @ApiModelProperty(notes = "必填:SDK来源;默认ZX_ONE")
+    private String sourceSystem;
+    @ApiModelProperty("排序字段")
+    private String sortFiled;
+    @ApiModelProperty("排序类型:升序 true;降序 false")
+    private Boolean sortAsc = true;
+
+    @ApiModelProperty("gs id 列表")
+    private List<Long> gsIdList;
+
+    @ApiModelProperty("父游戏id")
+    private Long parentGameId;
+
+    @ApiModelProperty("角色名称")
+    private String roleName;
+
+    @ApiModelProperty("角色创建日期开始")
+    private LocalDate roleCreateDayBegin;
+    @ApiModelProperty("角色创建日期结束")
+    private LocalDate roleCreateDayEnd;
+
+    @ApiModelProperty("超父游戏id")
+    private Integer superGameId;
+    @ApiModelProperty("角色当前所在区服id列表")
+    private List<String> serverIdList;
+
+    @ApiModelProperty("服务日期开始")
+    private LocalDate serveDayBegin;
+    @ApiModelProperty("服务日期开始")
+    private LocalDate serveDayEnd;
+
+    @NotNull(message = "角色来源必填")
+    @ApiModelProperty("必填:角色来源:1:区服指派;2:角色指派")
+    private Integer roleSource;
+
+}

+ 2 - 0
game-gs-data/game-gs-data-serve/src/main/java/com/zanxiang/game/gs/data/serve/pojo/entity/game/parent/AdsRoleAmountDataParent.java

@@ -228,4 +228,6 @@ public class AdsRoleAmountDataParent {
     @Column(value = "is_remove_game")
     @Column(value = "is_remove_game")
     private Integer isRemoveGame;
     private Integer isRemoveGame;
 
 
+    private Integer systemRemoveGameStatus;
+
 }
 }

+ 91 - 0
game-gs-data/game-gs-data-serve/src/main/java/com/zanxiang/game/gs/data/serve/pojo/vo/RoleManageVO.java

@@ -0,0 +1,91 @@
+package com.zanxiang.game.gs.data.serve.pojo.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
+@Data
+public class RoleManageVO {
+    @ApiModelProperty("游戏ID")
+    private Integer gameId;
+    @ApiModelProperty("角色ID")
+    private String roleId;
+
+    @ApiModelProperty("角色名称")
+    private String roleName;
+    @ApiModelProperty("超父游戏id")
+    private Long superGameId;
+    @ApiModelProperty("当前区服ID")
+    private String endServerId;
+
+    @ApiModelProperty("当前区服名称")
+    private String endServerName;
+
+    @ApiModelProperty("父游戏ID")
+    private Integer parentGameId;
+    @ApiModelProperty("父游戏名称")
+    private String parentGameName;
+
+    @ApiModelProperty("父用户ID")
+    private Long associationUserId;
+
+    @ApiModelProperty("角色vip")
+    private Integer roleVip;
+
+    @ApiModelProperty("角色等级")
+    private Integer roleLevel;
+
+    @ApiModelProperty("角色攻击力")
+    private Long combatNum;
+
+    @ApiModelProperty("国家")
+    private String country;
+
+    @ApiModelProperty("角色创建时间")
+    private LocalDateTime roleTime;
+    @ApiModelProperty("角色创角天数")
+    private Long roleCreateDayDiff;
+    @ApiModelProperty("角色最近充值时间距今")
+    private Long lastOrderDayDiff;
+    @ApiModelProperty("角色最近活跃时间距今")
+    private Long roleActiveDayDiff;
+    @ApiModelProperty("角色创角充值时间差")
+    private Long roleCreatePayDayDiff;
+
+    @ApiModelProperty("角色最近充值时间")
+    private LocalDateTime lastOrderTime;
+
+    @ApiModelProperty("角色累计充值金额")
+    private BigDecimal totalAmount;
+
+    @ApiModelProperty("角色最近活跃时间")
+    private LocalDateTime activeTime;
+
+    @ApiModelProperty("GS名称")
+    private String gsName;
+    @ApiModelProperty("GS ID")
+    private Long gsId;
+
+    @ApiModelProperty("GS服务时间-开始")
+    private LocalDate gsStartTime;
+    @ApiModelProperty("GS服务时间-结束")
+    private LocalDate gsEndTime;
+
+    @ApiModelProperty("GS服务天数")
+    private Long gsServeDays;
+
+    @ApiModelProperty("GS服务状态:0:服务中;1:服务完成")
+    private Boolean serveStatus;
+
+    @ApiModelProperty("GS服务中的付费金额")
+    private BigDecimal gsAmount;
+    @ApiModelProperty("GS服务中的付费次数")
+    private Long gsCount;
+    @ApiModelProperty("区服指派GS充值金额")
+    private BigDecimal serverAmount;
+    @ApiModelProperty("区服指派GS充值次数")
+    private Integer serverCount;
+}

+ 110 - 0
game-gs-data/game-gs-data-serve/src/main/java/com/zanxiang/game/gs/data/serve/pojo/vo/RoleRemoveGameMonitorVO.java

@@ -0,0 +1,110 @@
+package com.zanxiang.game.gs.data.serve.pojo.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
+@Data
+public class RoleRemoveGameMonitorVO {
+    @ApiModelProperty("游戏ID")
+    private Integer gameId;
+    @ApiModelProperty("角色ID")
+    private String roleId;
+
+    @ApiModelProperty("角色名称")
+    private String roleName;
+    @ApiModelProperty("超父游戏id")
+    private Long superGameId;
+    @ApiModelProperty("当前区服ID")
+    private String endServerId;
+
+    @ApiModelProperty("当前区服名称")
+    private String endServerName;
+
+    @ApiModelProperty("父游戏ID")
+    private Integer parentGameId;
+    @ApiModelProperty("父游戏名称")
+    private String parentGameName;
+
+    @ApiModelProperty("父用户ID")
+    private Long associationUserId;
+
+    @ApiModelProperty("角色vip")
+    private Integer roleVip;
+
+    @ApiModelProperty("角色等级")
+    private Integer roleLevel;
+
+    @ApiModelProperty("角色攻击力")
+    private Long combatNum;
+
+    @ApiModelProperty("国家")
+    private String country;
+
+    @ApiModelProperty("角色创建时间")
+    private LocalDateTime roleTime;
+    @ApiModelProperty("角色创角天数")
+    private Long roleCreateDayDiff;
+    @ApiModelProperty("角色最近充值时间距今")
+    private Long lastOrderDayDiff;
+    @ApiModelProperty("角色最近活跃时间距今")
+    private Long roleActiveDayDiff;
+
+    @ApiModelProperty("角色首充金额")
+    private BigDecimal firstAmount;
+
+    @ApiModelProperty("创角24小时付费金额")
+    private BigDecimal roleHourAmount;
+
+    @ApiModelProperty("角色最近充值金额")
+    private BigDecimal lastAmount;
+
+    @ApiModelProperty("角色最近充值时间")
+    private LocalDateTime lastOrderTime;
+
+    @ApiModelProperty("角色最近充值产品")
+    private String productName;
+
+    @ApiModelProperty("角色累计充值金额")
+    private BigDecimal totalAmount;
+
+    @ApiModelProperty("角色累计充值次数")
+    private Integer totalCnt;
+
+    @ApiModelProperty("角色最近活跃时间")
+    private LocalDateTime activeTime;
+
+    @ApiModelProperty("小程序充值金额")
+    private BigDecimal appAmount;
+
+    @ApiModelProperty("角色转端充值比")
+    private BigDecimal proportion;
+
+    @ApiModelProperty("GS名称")
+    private String gsName;
+    @ApiModelProperty("GS ID")
+    private Long gsId;
+
+    @ApiModelProperty("GS服务时间-开始")
+    private LocalDate gsStartTime;
+    @ApiModelProperty("GS服务时间-结束")
+    private LocalDate gsEndTime;
+
+    @ApiModelProperty("GS服务天数")
+    private Long gsServeDays;
+
+    @ApiModelProperty("GS服务状态:0:服务中;1:服务完成")
+    private Boolean serveStatus;
+
+    @ApiModelProperty("角色来源:1:区服指派;2:角色指派")
+    private Integer roleSource;
+
+    @ApiModelProperty("角色人工判断退游状态:0:未退游;1:退游")
+    private Integer humanRemoveGameStatus;
+
+    @ApiModelProperty("角色系统判断退游状态:0:未退游;1:退游")
+    private Integer systemRemoveGameStatus;
+}

+ 8 - 0
game-gs-data/game-gs-data-serve/src/main/java/com/zanxiang/game/gs/data/serve/service/IAdsRoleAmountDataParentService.java

@@ -3,10 +3,14 @@ package com.zanxiang.game.gs.data.serve.service;
 
 
 import com.mybatisflex.core.row.Row;
 import com.mybatisflex.core.row.Row;
 import com.zanxiang.game.gs.data.serve.pojo.dto.BigRDTO;
 import com.zanxiang.game.gs.data.serve.pojo.dto.BigRDTO;
+import com.zanxiang.game.gs.data.serve.pojo.dto.RoleManageDTO;
+import com.zanxiang.game.gs.data.serve.pojo.dto.RoleRemoveGameMonitorDTO;
 import com.zanxiang.game.gs.data.serve.pojo.entity.game.parent.AdsRoleAmountDataParent;
 import com.zanxiang.game.gs.data.serve.pojo.entity.game.parent.AdsRoleAmountDataParent;
 import com.mybatisflex.core.service.IService;
 import com.mybatisflex.core.service.IService;
 import com.zanxiang.game.gs.data.serve.pojo.vo.BigRVO;
 import com.zanxiang.game.gs.data.serve.pojo.vo.BigRVO;
 import com.zanxiang.game.gs.data.serve.pojo.vo.PageVO;
 import com.zanxiang.game.gs.data.serve.pojo.vo.PageVO;
+import com.zanxiang.game.gs.data.serve.pojo.vo.RoleManageVO;
+import com.zanxiang.game.gs.data.serve.pojo.vo.RoleRemoveGameMonitorVO;
 
 
 /**
 /**
  * 角色父游戏充值数据 服务层。
  * 角色父游戏充值数据 服务层。
@@ -17,4 +21,8 @@ import com.zanxiang.game.gs.data.serve.pojo.vo.PageVO;
 public interface IAdsRoleAmountDataParentService extends IService<AdsRoleAmountDataParent> {
 public interface IAdsRoleAmountDataParentService extends IService<AdsRoleAmountDataParent> {
 
 
     PageVO<BigRVO, Row> bigRListOfPage(BigRDTO dto);
     PageVO<BigRVO, Row> bigRListOfPage(BigRDTO dto);
+
+    PageVO<RoleRemoveGameMonitorVO, Row> roleRemoveGameMonitor(RoleRemoveGameMonitorDTO dto);
+
+    PageVO<RoleManageVO, Row> roleManage(RoleManageDTO dto);
 }
 }

+ 206 - 2
game-gs-data/game-gs-data-serve/src/main/java/com/zanxiang/game/gs/data/serve/service/impl/AdsRoleAmountDataParentServiceImpl.java

@@ -3,15 +3,20 @@ package com.zanxiang.game.gs.data.serve.service.impl;
 
 
 import com.google.common.base.CaseFormat;
 import com.google.common.base.CaseFormat;
 import com.mybatisflex.core.paginate.Page;
 import com.mybatisflex.core.paginate.Page;
+import com.mybatisflex.core.query.QueryCondition;
 import com.mybatisflex.core.query.QueryWrapper;
 import com.mybatisflex.core.query.QueryWrapper;
 import com.mybatisflex.core.row.Row;
 import com.mybatisflex.core.row.Row;
 import com.mybatisflex.spring.service.impl.ServiceImpl;
 import com.mybatisflex.spring.service.impl.ServiceImpl;
 import com.zanxiang.game.gs.data.serve.dao.mapper.game.parent.AdsRoleAmountDataParentMapper;
 import com.zanxiang.game.gs.data.serve.dao.mapper.game.parent.AdsRoleAmountDataParentMapper;
 import com.zanxiang.game.gs.data.serve.pojo.dto.BigRDTO;
 import com.zanxiang.game.gs.data.serve.pojo.dto.BigRDTO;
+import com.zanxiang.game.gs.data.serve.pojo.dto.RoleManageDTO;
+import com.zanxiang.game.gs.data.serve.pojo.dto.RoleRemoveGameMonitorDTO;
 import com.zanxiang.game.gs.data.serve.pojo.entity.game.parent.AdsRoleAmountDataParent;
 import com.zanxiang.game.gs.data.serve.pojo.entity.game.parent.AdsRoleAmountDataParent;
 import com.zanxiang.game.gs.data.serve.pojo.entity.game.parent.AdsRoleAmountDataTodayParent;
 import com.zanxiang.game.gs.data.serve.pojo.entity.game.parent.AdsRoleAmountDataTodayParent;
 import com.zanxiang.game.gs.data.serve.pojo.vo.BigRVO;
 import com.zanxiang.game.gs.data.serve.pojo.vo.BigRVO;
 import com.zanxiang.game.gs.data.serve.pojo.vo.PageVO;
 import com.zanxiang.game.gs.data.serve.pojo.vo.PageVO;
+import com.zanxiang.game.gs.data.serve.pojo.vo.RoleManageVO;
+import com.zanxiang.game.gs.data.serve.pojo.vo.RoleRemoveGameMonitorVO;
 import com.zanxiang.game.gs.data.serve.service.*;
 import com.zanxiang.game.gs.data.serve.service.*;
 import com.zanxiang.module.util.DateUtil;
 import com.zanxiang.module.util.DateUtil;
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.collections4.CollectionUtils;
@@ -98,6 +103,204 @@ public class AdsRoleAmountDataParentServiceImpl extends ServiceImpl<AdsRoleAmoun
         return new PageVO<>(paginate);
         return new PageVO<>(paginate);
     }
     }
 
 
+    @Override
+    public PageVO<RoleRemoveGameMonitorVO, Row> roleRemoveGameMonitor(RoleRemoveGameMonitorDTO dto) {
+        if (StringUtils.isBlank(dto.getSortFiled())) {
+            dto.setSortFiled(ADS_ROLE_AMOUNT_DATA_PARENT.TOTAL_AMOUNT.getName());
+        } else {
+            String column = CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, dto.getSortFiled());
+            dto.setSortFiled(column);
+        }
+        QueryWrapper bigRWrapper = getRoleRemoveGameWrapper(dto);
+
+        Page<RoleRemoveGameMonitorVO> paginate = getMapper().paginateAs(dto.getPageNum(), dto.getPageSize(), bigRWrapper, RoleRemoveGameMonitorVO.class);
+        if (0 == paginate.getTotalRow()) {
+            return PageVO.empty(dto);
+        }
+        List<RoleRemoveGameMonitorVO> records = paginate.getRecords();
+        Set<String> serverIdList = records.stream().map(RoleRemoveGameMonitorVO::getEndServerId).collect(Collectors.toSet());
+        Set<Integer> parentGameIdList = records.stream().map(RoleRemoveGameMonitorVO::getParentGameId).collect(Collectors.toSet());
+        Set<Long> gsIdList = records.stream().map(RoleRemoveGameMonitorVO::getGsId).collect(Collectors.toSet());
+        //父游戏名称
+        Map<Integer, String> parentGameMap = gameService.gameNameMap(dto.getSourceSystem(), parentGameIdList);
+        //区服名称
+        Map<Long, Map<String, String>> serverMap = serverSonMergeService.gameServerMap(dto.getSourceSystem(), serverIdList);
+        //GS名称查询
+        Map<Long, String> sysUserMap = CollectionUtils.isEmpty(gsIdList) ? null : sysUserService.getSysUserMap(gsIdList);
+        records.forEach(record -> {
+            Long gsId = record.getGsId();
+            record.setGsName(0 == gsId ? null : sysUserMap != null ? sysUserMap.get(gsId) : null);
+            record.setParentGameName(parentGameMap.get(record.getParentGameId()));
+            record.setEndServerName(null == serverMap.get(record.getSuperGameId()) ? null : serverMap.get(record.getSuperGameId()).get(record.getEndServerId()));
+            if (null != record.getGsStartTime()) {
+                record.setGsServeDays(record.getGsEndTime().isBefore(LocalDate.now()) ? DateUtil.intervalOfDays(record.getGsStartTime(), record.getGsEndTime())
+                        : DateUtil.intervalOfDays(record.getGsStartTime(), LocalDate.now()));
+                record.setServeStatus(record.getGsEndTime().isBefore(LocalDate.now()));
+            }
+            record.setRoleSource(0 == record.getGsId() ? 1 : 2);
+        });
+        return new PageVO<>(paginate);
+    }
+
+    @Override
+    public PageVO<RoleManageVO, Row> roleManage(RoleManageDTO dto) {
+        if (StringUtils.isBlank(dto.getSortFiled())) {
+            dto.setSortFiled(ADS_ROLE_AMOUNT_DATA_PARENT.TOTAL_AMOUNT.getName());
+        } else {
+            String column = CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, dto.getSortFiled());
+            dto.setSortFiled(column);
+        }
+        QueryWrapper wrapper = getRoleManageWrapper(dto);
+
+        Page<RoleManageVO> paginate = getMapper().paginateAs(dto.getPageNum(), dto.getPageSize(), wrapper, RoleManageVO.class);
+        if (0 == paginate.getTotalRow()) {
+            return PageVO.empty(dto);
+        }
+        List<RoleManageVO> records = paginate.getRecords();
+        Set<String> serverIdList = records.stream().map(RoleManageVO::getEndServerId).collect(Collectors.toSet());
+        Set<Integer> parentGameIdList = records.stream().map(RoleManageVO::getParentGameId).collect(Collectors.toSet());
+        Set<Long> gsIdList = records.stream().map(RoleManageVO::getGsId).collect(Collectors.toSet());
+        //父游戏名称
+        Map<Integer, String> parentGameMap = gameService.gameNameMap(dto.getSourceSystem(), parentGameIdList);
+        //区服名称
+        Map<Long, Map<String, String>> serverMap = serverSonMergeService.gameServerMap(dto.getSourceSystem(), serverIdList);
+        //GS名称查询
+        Map<Long, String> sysUserMap = CollectionUtils.isEmpty(gsIdList) ? null : sysUserService.getSysUserMap(gsIdList);
+        records.forEach(record -> {
+            Long gsId = record.getGsId();
+            record.setGsName(0 == gsId ? null : sysUserMap != null ? sysUserMap.get(gsId) : null);
+            record.setParentGameName(parentGameMap.get(record.getParentGameId()));
+            record.setEndServerName(null == serverMap.get(record.getSuperGameId()) ? null : serverMap.get(record.getSuperGameId()).get(record.getEndServerId()));
+            if (null != record.getGsStartTime()) {
+                record.setGsServeDays(record.getGsEndTime().isBefore(LocalDate.now()) ? DateUtil.intervalOfDays(record.getGsStartTime(), record.getGsEndTime())
+                        : DateUtil.intervalOfDays(record.getGsStartTime(), LocalDate.now()));
+                record.setServeStatus(record.getGsEndTime().isBefore(LocalDate.now()));
+            }
+        });
+        return new PageVO<>(paginate);
+    }
+
+    private static QueryWrapper getRoleManageWrapper(RoleManageDTO dto) {
+        return QueryWrapper.create()
+                .select(ADS_ROLE_AMOUNT_DATA_PARENT.GS_ID)
+                .select(ADS_ROLE_AMOUNT_DATA_PARENT.GAME_ID)
+                .select(ADS_ROLE_AMOUNT_DATA_PARENT.ROLE_ID)
+                .select(ADS_ROLE_AMOUNT_DATA_PARENT.GS_START_TIME)
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.ROLE_NAME).as(ADS_ROLE_AMOUNT_DATA_PARENT.ROLE_NAME.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.SERVER_ID).as(ADS_ROLE_AMOUNT_DATA_PARENT.SERVER_ID.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.PARENT_GAME_ID).as(ADS_ROLE_AMOUNT_DATA_PARENT.PARENT_GAME_ID.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.ASSOCIATION_USER_ID).as(ADS_ROLE_AMOUNT_DATA_PARENT.ASSOCIATION_USER_ID.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.ROLE_LEVEL).as(ADS_ROLE_AMOUNT_DATA_PARENT.ROLE_LEVEL.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.ROLE_VIP).as(ADS_ROLE_AMOUNT_DATA_PARENT.ROLE_VIP.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.COMBAT_NUM).as(ADS_ROLE_AMOUNT_DATA_PARENT.COMBAT_NUM.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.COUNTRY).as(ADS_ROLE_AMOUNT_DATA_PARENT.COUNTRY.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.ROLE_TIME).as(ADS_ROLE_AMOUNT_DATA_PARENT.ROLE_TIME.getName()))
+                .select(dateDiff(currentDate(), max(ADS_ROLE_AMOUNT_DATA_PARENT.ROLE_TIME)).as("role_create_day_diff"))
+                .select(dateDiff(currentDate(), max(ADS_ROLE_AMOUNT_DATA_PARENT.ACTIVE_TIME)).as("role_active_day_diff"))
+                .select(dateDiff(currentDate(), max(ADS_ROLE_AMOUNT_DATA_PARENT.LAST_ORDER_TIME)).as("last_order_day_diff"))
+                .select(dateDiff(max(ADS_ROLE_AMOUNT_DATA_PARENT.LAST_ORDER_TIME), max(ADS_ROLE_AMOUNT_DATA_PARENT.ROLE_TIME)).as("role_create_pay_day_diff"))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.FIRST_AMOUNT).as(ADS_ROLE_AMOUNT_DATA_PARENT.FIRST_AMOUNT.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.ROLE_HOUR_AMOUNT).as(ADS_ROLE_AMOUNT_DATA_PARENT.ROLE_HOUR_AMOUNT.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.LAST_AMOUNT).as(ADS_ROLE_AMOUNT_DATA_PARENT.LAST_AMOUNT.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.LAST_ORDER_TIME).as(ADS_ROLE_AMOUNT_DATA_PARENT.LAST_ORDER_TIME.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.PRODUCT_NAME).as(ADS_ROLE_AMOUNT_DATA_PARENT.PRODUCT_NAME.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.TOTAL_AMOUNT).as(ADS_ROLE_AMOUNT_DATA_PARENT.TOTAL_AMOUNT.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.TOTAL_CNT).as(ADS_ROLE_AMOUNT_DATA_PARENT.TOTAL_CNT.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.ACTIVE_TIME).as(ADS_ROLE_AMOUNT_DATA_PARENT.ACTIVE_TIME.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.APP_AMOUNT).as(ADS_ROLE_AMOUNT_DATA_PARENT.APP_AMOUNT.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.PROPORTION).as(ADS_ROLE_AMOUNT_DATA_PARENT.PROPORTION.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.CONCAT_GAME).as(ADS_ROLE_AMOUNT_DATA_PARENT.CONCAT_GAME.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.GS_AMOUNT).as(ADS_ROLE_AMOUNT_DATA_PARENT.GS_AMOUNT.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.GS_COUNT).as(ADS_ROLE_AMOUNT_DATA_PARENT.GS_COUNT.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.GS_END_TIME).as(ADS_ROLE_AMOUNT_DATA_PARENT.GS_END_TIME.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.SOURCE_SERVER_ID).as(ADS_ROLE_AMOUNT_DATA_PARENT.SOURCE_SERVER_ID.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.END_SERVER_ID).as(ADS_ROLE_AMOUNT_DATA_PARENT.END_SERVER_ID.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.SUPER_GAME_ID).as(ADS_ROLE_AMOUNT_DATA_PARENT.SUPER_GAME_ID.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.GS_ID_SERVER).as(ADS_ROLE_AMOUNT_DATA_PARENT.GS_ID_SERVER.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.SERVER_AMOUNT).as(ADS_ROLE_AMOUNT_DATA_PARENT.SERVER_AMOUNT.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.SERVER_COUNT).as(ADS_ROLE_AMOUNT_DATA_PARENT.SERVER_COUNT.getName()))
+                .from(ADS_ROLE_AMOUNT_DATA_PARENT)
+                .ge(AdsRoleAmountDataParent::getRoleTime, null == dto.getRoleCreateDayBegin() ? null : LocalDateTime.of(dto.getRoleCreateDayBegin(), LocalTime.MIDNIGHT), null != dto.getRoleCreateDayBegin())
+                .le(AdsRoleAmountDataParent::getRoleTime, null == dto.getRoleCreateDayEnd() ? null : LocalDateTime.of(dto.getRoleCreateDayEnd(), LocalTime.MAX), null != dto.getRoleCreateDayEnd())
+                .in(AdsRoleAmountDataParent::getGsId, dto.getGsIdList(), CollectionUtils.isNotEmpty(dto.getGsIdList()))
+                .eq(AdsRoleAmountDataParent::getParentGameId, dto.getParentGameId(), null != dto.getParentGameId())
+                .like(AdsRoleAmountDataParent::getRoleName, dto.getRoleName(), StringUtils.isNotBlank(dto.getRoleName()))
+                .eq(AdsRoleAmountDataParent::getSuperGameId, dto.getSuperGameId(), null != dto.getSuperGameId())
+                .in(AdsRoleAmountDataParent::getEndServerId, dto.getServerIdList(), CollectionUtils.isNotEmpty(dto.getServerIdList()))
+                .ge(AdsRoleAmountDataParent::getGsStartTime, dto.getServeDayBegin(), null != dto.getServeDayBegin())
+                .le(AdsRoleAmountDataParent::getGsEndTime, dto.getServeDayEnd(), null != dto.getServeDayEnd())
+                .ne(AdsRoleAmountDataParent::getGsId, 0)
+                .ge(AdsRoleAmountDataParent::getGsEndTime, LocalDate.now(), null != dto.getServeStatus() && 1 == dto.getServeStatus())
+                .le(AdsRoleAmountDataParent::getGsEndTime, LocalDate.now(), null != dto.getServeStatus() && 2 == dto.getServeStatus())
+                .groupBy(ADS_ROLE_AMOUNT_DATA_PARENT.GAME_ID)
+                .groupBy(ADS_ROLE_AMOUNT_DATA_PARENT.GS_ID)
+                .groupBy(ADS_ROLE_AMOUNT_DATA_PARENT.GS_START_TIME)
+                .groupBy(ADS_ROLE_AMOUNT_DATA_PARENT.ROLE_ID)
+                .orderBy(dto.getSortFiled(), dto.getSortAsc());
+    }
+
+    private static QueryWrapper getRoleRemoveGameWrapper(RoleRemoveGameMonitorDTO dto) {
+        return QueryWrapper.create()
+                .select(ADS_ROLE_AMOUNT_DATA_PARENT.GS_ID)
+                .select(ADS_ROLE_AMOUNT_DATA_PARENT.GAME_ID)
+                .select(ADS_ROLE_AMOUNT_DATA_PARENT.ROLE_ID)
+                .select(ADS_ROLE_AMOUNT_DATA_PARENT.GS_START_TIME)
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.ROLE_NAME).as(ADS_ROLE_AMOUNT_DATA_PARENT.ROLE_NAME.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.SERVER_ID).as(ADS_ROLE_AMOUNT_DATA_PARENT.SERVER_ID.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.PARENT_GAME_ID).as(ADS_ROLE_AMOUNT_DATA_PARENT.PARENT_GAME_ID.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.ASSOCIATION_USER_ID).as(ADS_ROLE_AMOUNT_DATA_PARENT.ASSOCIATION_USER_ID.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.ROLE_LEVEL).as(ADS_ROLE_AMOUNT_DATA_PARENT.ROLE_LEVEL.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.ROLE_VIP).as(ADS_ROLE_AMOUNT_DATA_PARENT.ROLE_VIP.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.COMBAT_NUM).as(ADS_ROLE_AMOUNT_DATA_PARENT.COMBAT_NUM.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.COUNTRY).as(ADS_ROLE_AMOUNT_DATA_PARENT.COUNTRY.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.ROLE_TIME).as(ADS_ROLE_AMOUNT_DATA_PARENT.ROLE_TIME.getName()))
+                .select(dateDiff(currentDate(), max(ADS_ROLE_AMOUNT_DATA_PARENT.ROLE_TIME)).as("role_create_day_diff"))
+                .select(dateDiff(currentDate(), max(ADS_ROLE_AMOUNT_DATA_PARENT.ACTIVE_TIME)).as("role_active_day_diff"))
+                .select(dateDiff(currentDate(), max(ADS_ROLE_AMOUNT_DATA_PARENT.LAST_ORDER_TIME)).as("last_order_day_diff"))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.FIRST_AMOUNT).as(ADS_ROLE_AMOUNT_DATA_PARENT.FIRST_AMOUNT.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.ROLE_HOUR_AMOUNT).as(ADS_ROLE_AMOUNT_DATA_PARENT.ROLE_HOUR_AMOUNT.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.LAST_AMOUNT).as(ADS_ROLE_AMOUNT_DATA_PARENT.LAST_AMOUNT.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.LAST_ORDER_TIME).as(ADS_ROLE_AMOUNT_DATA_PARENT.LAST_ORDER_TIME.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.PRODUCT_NAME).as(ADS_ROLE_AMOUNT_DATA_PARENT.PRODUCT_NAME.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.TOTAL_AMOUNT).as(ADS_ROLE_AMOUNT_DATA_PARENT.TOTAL_AMOUNT.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.TOTAL_CNT).as(ADS_ROLE_AMOUNT_DATA_PARENT.TOTAL_CNT.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.ACTIVE_TIME).as(ADS_ROLE_AMOUNT_DATA_PARENT.ACTIVE_TIME.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.APP_AMOUNT).as(ADS_ROLE_AMOUNT_DATA_PARENT.APP_AMOUNT.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.PROPORTION).as(ADS_ROLE_AMOUNT_DATA_PARENT.PROPORTION.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.CONCAT_GAME).as(ADS_ROLE_AMOUNT_DATA_PARENT.CONCAT_GAME.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.GS_AMOUNT).as(ADS_ROLE_AMOUNT_DATA_PARENT.GS_AMOUNT.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.GS_COUNT).as(ADS_ROLE_AMOUNT_DATA_PARENT.GS_COUNT.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.GS_END_TIME).as(ADS_ROLE_AMOUNT_DATA_PARENT.GS_END_TIME.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.SOURCE_SERVER_ID).as(ADS_ROLE_AMOUNT_DATA_PARENT.SOURCE_SERVER_ID.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.END_SERVER_ID).as(ADS_ROLE_AMOUNT_DATA_PARENT.END_SERVER_ID.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.SUPER_GAME_ID).as(ADS_ROLE_AMOUNT_DATA_PARENT.SUPER_GAME_ID.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.IS_REMOVE_GAME).as("human_remove_game_status"))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.GS_ID_SERVER).as(ADS_ROLE_AMOUNT_DATA_PARENT.GS_ID_SERVER.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.SERVER_AMOUNT).as(ADS_ROLE_AMOUNT_DATA_PARENT.SERVER_AMOUNT.getName()))
+                .select(max(ADS_ROLE_AMOUNT_DATA_PARENT.SERVER_COUNT).as(ADS_ROLE_AMOUNT_DATA_PARENT.SERVER_COUNT.getName()))
+                .select("IF(TIMESTAMPDIFF(HOUR, max(ads_role_amount_data_parent.active_time), NOW()) > 72,IF(TIMESTAMPDIFF(HOUR, max(ads_role_amount_data_parent.last_order_time), NOW()) < 72 , 0, 1) , 0) as system_remove_game_status")
+                .from(ADS_ROLE_AMOUNT_DATA_PARENT)
+                .ge(AdsRoleAmountDataParent::getRoleTime, null == dto.getRoleCreateDayBegin() ? null : LocalDateTime.of(dto.getRoleCreateDayBegin(), LocalTime.MIDNIGHT), null != dto.getRoleCreateDayBegin())
+                .le(AdsRoleAmountDataParent::getRoleTime, null == dto.getRoleCreateDayEnd() ? null : LocalDateTime.of(dto.getRoleCreateDayEnd(), LocalTime.MAX), null != dto.getRoleCreateDayEnd())
+                .in(AdsRoleAmountDataParent::getGsId, dto.getGsIdList(), CollectionUtils.isNotEmpty(dto.getGsIdList()))
+                .eq(AdsRoleAmountDataParent::getParentGameId, dto.getParentGameId(), null != dto.getParentGameId())
+                .like(AdsRoleAmountDataParent::getRoleName, dto.getRoleName(), StringUtils.isNotBlank(dto.getRoleName()))
+                .eq(AdsRoleAmountDataParent::getSuperGameId, dto.getSuperGameId(), null != dto.getSuperGameId())
+                .in(AdsRoleAmountDataParent::getEndServerId, dto.getServerIdList(), CollectionUtils.isNotEmpty(dto.getServerIdList()))
+                .ge(AdsRoleAmountDataParent::getGsStartTime, dto.getServeDayBegin(), null != dto.getServeDayBegin())
+                .le(AdsRoleAmountDataParent::getGsEndTime, dto.getServeDayEnd(), null != dto.getServeDayEnd())
+                .ge(AdsRoleAmountDataParent::getGsEndTime, LocalDate.now())
+                .ne(AdsRoleAmountDataParent::getGsId, 0, null != dto.getRoleSource() && 2 == dto.getRoleSource())
+                .isNotNull(AdsRoleAmountDataParent::getGsIdServer, null != dto.getRoleSource() && 1 == dto.getRoleSource())
+                .and(ADS_ROLE_AMOUNT_DATA_PARENT.IS_REMOVE_GAME.ne(1).or(ADS_ROLE_AMOUNT_DATA_PARENT.IS_REMOVE_GAME.isNull()))
+                .groupBy(ADS_ROLE_AMOUNT_DATA_PARENT.GAME_ID)
+                .groupBy(ADS_ROLE_AMOUNT_DATA_PARENT.GS_ID)
+                .groupBy(ADS_ROLE_AMOUNT_DATA_PARENT.GS_START_TIME)
+                .groupBy(ADS_ROLE_AMOUNT_DATA_PARENT.ROLE_ID)
+                .having(QueryCondition.createEmpty().and("system_remove_game_status = ?", 1))
+                .orderBy(dto.getSortFiled(), dto.getSortAsc());
+    }
+
     private static QueryWrapper getBigRWrapper(BigRDTO dto) {
     private static QueryWrapper getBigRWrapper(BigRDTO dto) {
         return QueryWrapper.create()
         return QueryWrapper.create()
                 .select(ADS_ROLE_AMOUNT_DATA_PARENT.GS_ID)
                 .select(ADS_ROLE_AMOUNT_DATA_PARENT.GS_ID)
@@ -162,12 +365,13 @@ public class AdsRoleAmountDataParentServiceImpl extends ServiceImpl<AdsRoleAmoun
                 .le(AdsRoleAmountDataParent::getGsEndTime, LocalDate.now(), null != dto.getServeStatus() && 2 == dto.getServeStatus())
                 .le(AdsRoleAmountDataParent::getGsEndTime, LocalDate.now(), null != dto.getServeStatus() && 2 == dto.getServeStatus())
                 .ne(AdsRoleAmountDataParent::getGsId, 0, null != dto.getRoleSource() && 2 == dto.getRoleSource())
                 .ne(AdsRoleAmountDataParent::getGsId, 0, null != dto.getRoleSource() && 2 == dto.getRoleSource())
                 .isNotNull(AdsRoleAmountDataParent::getGsIdServer, null != dto.getRoleSource() && 1 == dto.getRoleSource())
                 .isNotNull(AdsRoleAmountDataParent::getGsIdServer, null != dto.getRoleSource() && 1 == dto.getRoleSource())
-                .eq(AdsRoleAmountDataParent::getIsRemoveGame, dto.getHumanRemoveGameStatus(), null != dto.getHumanRemoveGameStatus())
-                .and(wrapper -> wrapper.and("'system_remove_game_status' = ?", dto.getSystemRemoveGameStatus()), null != dto.getSystemRemoveGameStatus())
+                .eq(AdsRoleAmountDataParent::getIsRemoveGame, dto.getHumanRemoveGameStatus(), null != dto.getHumanRemoveGameStatus() && 1 == dto.getHumanRemoveGameStatus())
+                .and(wrapper -> wrapper.ne(AdsRoleAmountDataParent::getIsRemoveGame,1).or(ADS_ROLE_AMOUNT_DATA_PARENT.IS_REMOVE_GAME.isNull()), null != dto.getHumanRemoveGameStatus() && 0 == dto.getHumanRemoveGameStatus())
                 .groupBy(ADS_ROLE_AMOUNT_DATA_PARENT.GAME_ID)
                 .groupBy(ADS_ROLE_AMOUNT_DATA_PARENT.GAME_ID)
                 .groupBy(ADS_ROLE_AMOUNT_DATA_PARENT.GS_ID)
                 .groupBy(ADS_ROLE_AMOUNT_DATA_PARENT.GS_ID)
                 .groupBy(ADS_ROLE_AMOUNT_DATA_PARENT.GS_START_TIME)
                 .groupBy(ADS_ROLE_AMOUNT_DATA_PARENT.GS_START_TIME)
                 .groupBy(ADS_ROLE_AMOUNT_DATA_PARENT.ROLE_ID)
                 .groupBy(ADS_ROLE_AMOUNT_DATA_PARENT.ROLE_ID)
+                .having(QueryCondition.createEmpty().and("system_remove_game_status = ?", dto.getSystemRemoveGameStatus()).when(null != dto.getSystemRemoveGameStatus()))
                 .orderBy(dto.getSortFiled(), dto.getSortAsc());
                 .orderBy(dto.getSortFiled(), dto.getSortAsc());
     }
     }
 }
 }

+ 1 - 1
game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/SDKApplication.java

@@ -23,7 +23,7 @@ public class SDKApplication {
 
 
     public static void main(String[] args) {
     public static void main(String[] args) {
         SpringApplication.run(SDKApplication.class, args);
         SpringApplication.run(SDKApplication.class, args);
-        System.out.println("赞象SDK服务启动成功 <解决微信支付CP方金额精度不正确的问题> ( ´・・)ノ(._.`) \n" +
+        System.out.println("赞象SDK服务启动成功 <解决微信支付精度丢失的问题> ( ´・・)ノ(._.`) \n" +
                 " ___________ _   __\n" +
                 " ___________ _   __\n" +
                 "/  ___|  _  \\ | / /\n" +
                 "/  ___|  _  \\ | / /\n" +
                 "\\ `--.| | | | |/ / \n" +
                 "\\ `--.| | | | |/ / \n" +

+ 2 - 1
game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/pay/WxPayService.java

@@ -15,6 +15,7 @@ import com.zanxiang.game.module.sdk.util.HttpUtil;
 import com.zanxiang.game.module.sdk.util.WxPayUtil;
 import com.zanxiang.game.module.sdk.util.WxPayUtil;
 import com.zanxiang.game.module.sdk.util.XmlUtil;
 import com.zanxiang.game.module.sdk.util.XmlUtil;
 import com.zanxiang.module.util.JsonUtil;
 import com.zanxiang.module.util.JsonUtil;
+import com.zanxiang.module.util.NumberUtil;
 import com.zanxiang.module.util.exception.BaseException;
 import com.zanxiang.module.util.exception.BaseException;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.io.IOUtils;
@@ -328,7 +329,7 @@ public class WxPayService extends PayBaseService {
             paramData.put("body", product.getSubject());
             paramData.put("body", product.getSubject());
             paramData.put("out_trade_no", product.getOutTradeNo());
             paramData.put("out_trade_no", product.getOutTradeNo());
             paramData.put("fee_type", "CNY");
             paramData.put("fee_type", "CNY");
-            paramData.put("total_fee", WxPayUtil.subZeroAndDot(String.valueOf(Float.parseFloat(product.getTotalFee()) * 100)));
+            paramData.put("total_fee", String.valueOf(NumberUtil.multiply100(new BigDecimal(product.getTotalFee())).longValue()));
             paramData.put("spbill_create_ip", product.getSpbillCreateIp());
             paramData.put("spbill_create_ip", product.getSpbillCreateIp());
             paramData.put("notify_url", notifyUrl);
             paramData.put("notify_url", notifyUrl);
             paramData.put("trade_type", tradeType);
             paramData.put("trade_type", tradeType);