Ver Fonte

Merge branch 'package' into dev

wcc há 1 ano atrás
pai
commit
33aa466355
69 ficheiros alterados com 4588 adições e 8826 exclusões
  1. 45 1
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/controller/BackPolicyController.java
  2. 7 3
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/controller/OceanengineLogController.java
  3. 7 3
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/controller/TencentLogController.java
  4. 7 3
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/controller/TencentMiniGameLogController.java
  5. 36 6
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/pojo/dto/GameBackPolicyDTO.java
  6. 30 2
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/pojo/entity/GameBackPolicy.java
  7. 4 0
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/pojo/entity/GameOceanengineOrderLog.java
  8. 4 0
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/pojo/entity/GameTencentMiniGameOrder.java
  9. 4 0
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/pojo/entity/GameTencentOrder.java
  10. 11 3
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/pojo/enums/BackUnitEnum.java
  11. 47 3
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/pojo/vo/GameBackPolicyVO.java
  12. 1 1
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/rpc/impl/TencentMiniGameBackRpcImpl.java
  13. 1 1
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/rpc/impl/TencentUserActionBackRpcImpl.java
  14. 1 1
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/rpc/impl/TtMiniGameBackRpcImpl.java
  15. 2 2
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/service/IGameOceanengineOrderLogService.java
  16. 2 2
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/service/IGameTencentMiniGameOrderService.java
  17. 2 2
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/service/IGameTencentOrderService.java
  18. 58 2
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/service/impl/GameBackPolicyServiceImpl.java
  19. 175 29
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/service/impl/GameOceanengineOrderLogServiceImpl.java
  20. 173 37
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/service/impl/GameTencentMiniGameOrderServiceImpl.java
  21. 172 35
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/service/impl/GameTencentOrderServiceImpl.java
  22. 193 90
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/utils/BackPolicyUtil.java
  23. 22 8
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/component/DataPowerComponent.java
  24. 13 12
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/controller/AdsMediaDataController.java
  25. 11 0
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/controller/AdsOrderDetailController.java
  26. 7 7
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/controller/GameDataController.java
  27. 64 0
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/controller/PlayerDataController.java
  28. 21 0
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/AdsOrderDetailDTO.java
  29. 3 2
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/AdsOrderDetailListDTO.java
  30. 3 2
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/AdsOrderDetailTotalDTO.java
  31. 6 0
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/GameDataDayDTO.java
  32. 9 4
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/GameDataDayTotalDTO.java
  33. 6 0
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/GameDataTotalDTO.java
  34. 6 0
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/GameDataTotalTotalDTO.java
  35. 29 0
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/PlayerDataListDTO.java
  36. 28 0
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/PlayerDataListTotalDTO.java
  37. 29 0
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/PlayerRoleDataListDTO.java
  38. 28 0
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/PlayerRoleDataListTotalDTO.java
  39. 46 0
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/entity/AdsGameAccountDayn.java
  40. 52 0
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/entity/AdsGamePitcherAccountDayn.java
  41. 17 0
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/entity/AdsOrderDetail.java
  42. 47 0
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/entity/AdsPitcherAccountDayn.java
  43. 86 0
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/entity/TPayCallCpLog.java
  44. 16 0
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/vo/AdsOrderDetailVO.java
  45. 24 1524
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/vo/GameDataDayTotalVO.java
  46. 24 1512
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/vo/GameDataDayVO.java
  47. 0 505
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/vo/GameDataTotalTotalVO.java
  48. 0 505
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/vo/GameDataTotalVO.java
  49. 145 1286
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/vo/GameMediaDataTotalVO.java
  50. 46 0
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/vo/OrderCPDetailVO.java
  51. 145 1287
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/vo/PitcherGameMediaDataTotalVO.java
  52. 145 1286
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/vo/PitcherMediaDataTotalVO.java
  53. 9 0
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/vo/PlayerDataVO.java
  54. 9 0
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/vo/PlayerRoleDataVO.java
  55. 4 0
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/IAdsOrderDetailService.java
  56. 46 0
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/IPlayerDataService.java
  57. 26 25
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/AccountAgentDayServiceImpl.java
  58. 5 4
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/AdsAccountRechargeRankingServiceImpl.java
  59. 3 2
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/AdsAgentRechargeRankingServiceImpl.java
  60. 57 15
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/AdsOrderDetailService.java
  61. 374 389
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/GameDataServiceImpl.java
  62. 4 4
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/GameServerServiceImpl.java
  63. 4 4
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/IActiveDataServiceImpl.java
  64. 1849 138
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/IMediaDataServiceImpl.java
  65. 8 13
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/OverallSummaryServiceImpl.java
  66. 40 40
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/PitcherDataServiceImpl.java
  67. 61 0
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/PlayerDataServiceImpl.java
  68. 22 22
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/PromotionDayServiceImpl.java
  69. 7 4
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/RankingServiceImpl.java

+ 45 - 1
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/controller/BackPolicyController.java

@@ -10,10 +10,12 @@ import com.zanxiang.module.util.exception.BaseException;
 import com.zanxiang.module.util.pojo.ResultVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
+import java.math.BigDecimal;
 import java.util.List;
 
 @RestController
@@ -64,7 +66,7 @@ public class BackPolicyController {
     private void checkDTO(GameBackPolicyDTO dto) {
         BackUnitEnum backUnit = BackUnitEnum.getByValue(dto.getBackUnit());
         if (backUnit == null) {
-            dto.setBackUnit(BackUnitEnum.UNIT_ONCE.getValue());
+            throw new BaseException("错误的回传单位:" + dto.getBackUnit());
         }
         if (dto.getFirstMinMoney().compareTo(dto.getFirstMaxMoney()) >= 0) {
             throw new BaseException("首充的大额金额必须大于小额金额");
@@ -86,5 +88,47 @@ public class BackPolicyController {
                 throw new BaseException("首充的大额金额必须大于小额金额");
             }
         }
+        checkDownLevel(dto.getFirstDownLevel());
+        checkDownLevel(dto.getRechargeDownLevel());
+        checkDownLevel(dto.getMarkUpDownLevel());
+        if (dto.getFirstBackCountOfUser() != null && dto.getFirstBackCountOfUser() < 1) {
+            throw new BaseException("单用户最大回传次数不能小于 1");
+        }
+        if (dto.getRechargeBackCountOfUser() != null && dto.getRechargeBackCountOfUser() < 1) {
+            throw new BaseException("单用户最大回传次数不能小于 1");
+        }
+        if (dto.getMarkUpBackCountOfUser() != null && dto.getMarkUpBackCountOfUser() < 1) {
+            throw new BaseException("单用户最大回传次数不能小于 1");
+        }
+    }
+
+    private void checkDownLevel(List<GameBackPolicyVO.PolicyDownLevel> downLevelList) {
+        if (CollectionUtils.isEmpty(downLevelList)) {
+            return;
+        }
+        downLevelList.sort((val1, val2) -> val1.getMinMoney().compareTo(val2.getMinMoney()));
+        BigDecimal compareMoney = null;
+        for (GameBackPolicyVO.PolicyDownLevel downLevel : downLevelList) {
+            if (downLevel.getMinMoney() == null
+                    || downLevel.getMaxMoney() == null
+                    || downLevel.getBackMoney() == null) {
+                throw new BaseException("降档策略校验失败:金额不能为空");
+            }
+            if (downLevel.getMinMoney().compareTo(BigDecimal.ZERO) <= 0
+                    || downLevel.getMaxMoney().compareTo(BigDecimal.ZERO) <= 0
+                    || downLevel.getBackMoney().compareTo(BigDecimal.ZERO) <= 0) {
+                throw new BaseException("降档策略校验失败:金额必须大于 0");
+            }
+            if (downLevel.getMinMoney().compareTo(downLevel.getMaxMoney()) > 0) {
+                throw new BaseException("降档策略校验失败:最小金额(" + downLevel.getMinMoney() + ")> 最大金额(" + downLevel.getMaxMoney() + ")");
+            }
+            if (compareMoney == null) {
+                compareMoney = downLevel.getMaxMoney();
+            } else {
+                if (compareMoney.compareTo(downLevel.getMinMoney()) >= 0) {
+                    throw new BaseException("降档策略校验失败:金额区间内不能有交集!!!");
+                }
+            }
+        }
     }
 }

+ 7 - 3
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/controller/OceanengineLogController.java

@@ -8,6 +8,7 @@ import com.zanxiang.game.back.serve.pojo.vo.GameOceanengineOrderLogVO;
 import com.zanxiang.game.back.serve.pojo.vo.GameOceanengineUserLogVO;
 import com.zanxiang.game.back.serve.service.IGameOceanengineOrderLogService;
 import com.zanxiang.game.back.serve.service.IGameOceanengineUserLogService;
+import com.zanxiang.module.util.exception.BaseException;
 import com.zanxiang.module.util.pojo.ResultVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -37,10 +38,13 @@ public class OceanengineLogController {
     }
 
     @PreAuthorize(permissionKey = "gameBack:oceanengine:orderReport")
-    @PostMapping("/orderReport/{ids}")
+    @PostMapping("/orderReport/{ids}/{backMoney}")
     @ApiOperation(value = "头条订单手动上报")
-    public ResultVO<Boolean> oceanengineOrderReport(@PathVariable("ids") List<Long> ids) {
-        return ResultVO.ok(oceanengineOrderLogService.oceanengineOrderReport(ids));
+    public ResultVO<Boolean> oceanengineOrderReport(@PathVariable("ids") List<Long> ids, @PathVariable("backMoney") Long backMoney) {
+        if (backMoney < 1) {
+            throw new BaseException("回传金额错误!");
+        }
+        return ResultVO.ok(oceanengineOrderLogService.oceanengineOrderReport(ids, backMoney));
     }
 
     @PreAuthorize(permissionKey = "gameBack:oceanengine:userLogs")

+ 7 - 3
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/controller/TencentLogController.java

@@ -8,6 +8,7 @@ import com.zanxiang.game.back.serve.pojo.vo.GameTencentOrderVO;
 import com.zanxiang.game.back.serve.pojo.vo.GameTencentUserVO;
 import com.zanxiang.game.back.serve.service.IGameTencentOrderService;
 import com.zanxiang.game.back.serve.service.IGameTencentUserService;
+import com.zanxiang.module.util.exception.BaseException;
 import com.zanxiang.module.util.pojo.ResultVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -37,10 +38,13 @@ public class TencentLogController {
     }
 
     @PreAuthorize(permissionKey = "gameBack:tencent:orderReport")
-    @PostMapping("/orderReport/{ids}")
+    @PostMapping("/orderReport/{ids}/{backMoney}")
     @ApiOperation(value = "腾讯订单手动上报")
-    public ResultVO<Boolean> tencentOrderReport(@PathVariable("ids") List<Long> ids) {
-        return ResultVO.ok(tencentOrderService.tencentOrderReport(ids));
+    public ResultVO<Boolean> tencentOrderReport(@PathVariable("ids") List<Long> ids, @PathVariable("backMoney") Long backMoney) {
+        if(backMoney < 1) {
+            throw new BaseException("回传金额错误!");
+        }
+        return ResultVO.ok(tencentOrderService.tencentOrderReport(ids, backMoney));
     }
 
     @PreAuthorize(permissionKey = "gameBack:tencent:userLogs")

+ 7 - 3
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/controller/TencentMiniGameLogController.java

@@ -8,6 +8,7 @@ import com.zanxiang.game.back.serve.pojo.vo.GameTencentMiniGameOrderVO;
 import com.zanxiang.game.back.serve.pojo.vo.GameTencentMiniGameUserVO;
 import com.zanxiang.game.back.serve.service.IGameTencentMiniGameOrderService;
 import com.zanxiang.game.back.serve.service.IGameTencentMiniGameUserService;
+import com.zanxiang.module.util.exception.BaseException;
 import com.zanxiang.module.util.pojo.ResultVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -37,10 +38,13 @@ public class TencentMiniGameLogController {
     }
 
     @PreAuthorize(permissionKey = "gameBack:tencentMiniGame:orderReport")
-    @PostMapping("/orderReport/{ids}")
+    @PostMapping("/orderReport/{ids}/{backMoney}")
     @ApiOperation(value = "腾讯订单手动上报")
-    public ResultVO<Boolean> tencentOrderReport(@PathVariable("ids") List<Long> ids) {
-        return ResultVO.ok(gameTencentMiniGameOrderService.doReport(ids));
+    public ResultVO<Boolean> tencentOrderReport(@PathVariable("ids") List<Long> ids, @PathVariable("backMoney") Long backMoney) {
+        if (backMoney < 1) {
+            throw new BaseException("回传金额错误!");
+        }
+        return ResultVO.ok(gameTencentMiniGameOrderService.doReport(ids, backMoney));
     }
 
     @PreAuthorize(permissionKey = "gameBack:tencentMiniGame:userLogs")

+ 36 - 6
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/pojo/dto/GameBackPolicyDTO.java

@@ -3,6 +3,7 @@ package com.zanxiang.game.back.serve.pojo.dto;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
+import com.zanxiang.game.back.serve.pojo.vo.GameBackPolicyVO;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.AllArgsConstructor;
 import lombok.Builder;
@@ -14,6 +15,7 @@ import javax.validation.constraints.NotNull;
 import java.io.Serializable;
 import java.math.BigDecimal;
 import java.time.LocalDateTime;
+import java.util.List;
 
 /**
  * <p>
@@ -94,6 +96,17 @@ public class GameBackPolicyDTO implements Serializable {
     @ApiModelProperty("首充-其它金额回传概率/比例")
     private String firstOtherMoneyRate;
 
+    /**
+     * 首充-其它金额回传概率/比例
+     */
+    @ApiModelProperty("首充-降档规则")
+    private List<GameBackPolicyVO.PolicyDownLevel> firstDownLevel;
+    /**
+     * 首充-按用户订单数卡单
+     */
+    @ApiModelProperty("首充-按用户订单数卡单")
+    private Integer firstBackCountOfUser;
+
     /**
      * 次单-小额判定金额(小于等于)
      */
@@ -150,15 +163,20 @@ public class GameBackPolicyDTO implements Serializable {
     @ApiModelProperty("次单-其它金额回传概率/比例")
     private String rechargeOtherMoneyRate;
 
+    @ApiModelProperty("注册充值回传的最大间隔时间(超时不回传)")
+    private Long regPayIntervalTime;
+
     /**
-     * 降档级别
+     * 首充-其它金额回传概率/比例
      */
-    @NotNull
-    @ApiModelProperty("降档级别")
-    private Integer levelDown;
+    @ApiModelProperty("次单-降档规则")
+    private List<GameBackPolicyVO.PolicyDownLevel> rechargeDownLevel;
 
-    @ApiModelProperty("注册充值回传的最大间隔时间(超时不回传)")
-    private Long regPayIntervalTime;
+    /**
+     * 次单-按用户订单数卡单
+     */
+    @ApiModelProperty("次单-按用户订单数卡单")
+    private Integer rechargeBackCountOfUser;
 
     /**
      * 是否补单
@@ -214,5 +232,17 @@ public class GameBackPolicyDTO implements Serializable {
     @ApiModelProperty("补单-其它金额回传概率/比例")
     private String markUpOrderOtherMoneyRate;
 
+    /**
+     * 首充-其它金额回传概率/比例
+     */
+    @ApiModelProperty("补单-降档规则")
+    private List<GameBackPolicyVO.PolicyDownLevel> markUpDownLevel;
+
+    /**
+     * 补单-按用户订单数卡单
+     */
+    @ApiModelProperty("补单-按用户订单数卡单")
+    private Integer markUpBackCountOfUser;
+
 
 }

+ 30 - 2
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/pojo/entity/GameBackPolicy.java

@@ -7,7 +7,10 @@ import com.baomidou.mybatisplus.annotation.TableName;
 import java.io.Serializable;
 import java.math.BigDecimal;
 import java.time.LocalDateTime;
+import java.util.List;
 
+import com.zanxiang.game.back.serve.pojo.vo.GameBackPolicyVO;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.*;
 import lombok.experimental.Accessors;
 
@@ -77,6 +80,16 @@ public class GameBackPolicy implements Serializable {
      */
     private String firstOtherMoneyRate;
 
+    /**
+     * 首单-降档规则
+     */
+    private String firstDownLevel;
+
+    /**
+     * 首充-按用户订单数卡单
+     */
+    private Integer firstBackCountOfUser;
+
     /**
      * 次单/日-小额判定金额(小于等于)
      */
@@ -118,9 +131,14 @@ public class GameBackPolicy implements Serializable {
     private String rechargeOtherMoneyRate;
 
     /**
-     * 降档级别
+     * 次单-降档规则
      */
-    private Integer levelDown;
+    private String rechargeDownLevel;
+
+    /**
+     * 次单-按用户订单数卡单
+     */
+    private Integer rechargeBackCountOfUser;
 
     private LocalDateTime createTime;
 
@@ -181,5 +199,15 @@ public class GameBackPolicy implements Serializable {
      */
     private String markUpOrderOtherMoneyRate;
 
+    /**
+     * 补单-降档规则
+     */
+    private String markUpDownLevel;
+
+    /**
+     * 补单-按用户订单数卡单
+     */
+    private Integer markUpBackCountOfUser;
+
 
 }

+ 4 - 0
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/pojo/entity/GameOceanengineOrderLog.java

@@ -93,4 +93,8 @@ public class GameOceanengineOrderLog implements Serializable {
 
     private Boolean isFirstOrder;
 
+    private Long backMoney;
+
+    private String backMsg;
+
 }

+ 4 - 0
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/pojo/entity/GameTencentMiniGameOrder.java

@@ -106,4 +106,8 @@ public class GameTencentMiniGameOrder implements Serializable {
     private String roleName;
 
     private Boolean isFirstOrder;
+
+    private Long backMoney;
+
+    private String backMsg;
 }

+ 4 - 0
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/pojo/entity/GameTencentOrder.java

@@ -118,4 +118,8 @@ public class GameTencentOrder implements Serializable {
     private String roleName;
 
     private Boolean isFirstOrder;
+
+    private Long backMoney;
+
+    private String backMsg;
 }

+ 11 - 3
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/pojo/enums/BackUnitEnum.java

@@ -7,13 +7,21 @@ import java.util.Objects;
 @Getter
 public enum BackUnitEnum {
     /**
-     * 未回传
+     * 首单/次单
      */
     UNIT_ONCE(1),
     /**
-     * 回传成功
+     * 首日/次日
      */
-    UNIT_DAY(2);
+    UNIT_DAY(2),
+    /**
+     * 24小时、其它时间
+     */
+    UNIT_TIME_DAY(3),
+    /**
+     * 48、其它时间
+     */
+    UNIT_TIME_2DAY(4);
 
     private final Integer value;
 

+ 47 - 3
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/pojo/vo/GameBackPolicyVO.java

@@ -9,6 +9,7 @@ import lombok.NoArgsConstructor;
 import java.io.Serializable;
 import java.math.BigDecimal;
 import java.time.LocalDateTime;
+import java.util.List;
 
 /**
  * <p>
@@ -82,6 +83,18 @@ public class GameBackPolicyVO implements Serializable {
     @ApiModelProperty("首充-其它金额回传概率/比例")
     private String firstOtherMoneyRate;
 
+    /**
+     * 首充-降档规则
+     */
+    @ApiModelProperty("首充-降档规则")
+    private List<PolicyDownLevel> firstDownLevel;
+
+    /**
+     * 首充-按用户订单数卡单
+     */
+    @ApiModelProperty("首充-按用户订单数卡单")
+    private Integer firstBackCountOfUser;
+
     /**
      * 次单-小额判定金额(小于等于)
      */
@@ -131,10 +144,16 @@ public class GameBackPolicyVO implements Serializable {
     private String rechargeOtherMoneyRate;
 
     /**
-     * 降档级别
+     * 次单-降档规则
      */
-    @ApiModelProperty("降档级别")
-    private Integer levelDown;
+    @ApiModelProperty("次单-降档规则")
+    private List<PolicyDownLevel> rechargeDownLevel;
+
+    /**
+     * 次单-按用户订单数卡单
+     */
+    @ApiModelProperty("次单-按用户订单数卡单")
+    private Integer rechargeBackCountOfUser;
 
     private LocalDateTime createTime;
 
@@ -199,5 +218,30 @@ public class GameBackPolicyVO implements Serializable {
     @ApiModelProperty("补单-其它金额回传概率/比例")
     private String markUpOrderOtherMoneyRate;
 
+    /**
+     * 补单-降档规则
+     */
+    @ApiModelProperty("补单-降档规则")
+    private List<PolicyDownLevel> markUpDownLevel;
+
+    /**
+     * 补单-按用户订单数卡单
+     */
+    @ApiModelProperty("补单-按用户订单数卡单")
+    private Integer markUpBackCountOfUser;
+
+    @Data
+    @NoArgsConstructor
+    @AllArgsConstructor
+    @Builder
+    public static class PolicyDownLevel {
+
+        private BigDecimal minMoney;
+
+        private BigDecimal maxMoney;
+
+        private BigDecimal backMoney;
+    }
+
 
 }

+ 1 - 1
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/rpc/impl/TencentMiniGameBackRpcImpl.java

@@ -61,7 +61,7 @@ public class TencentMiniGameBackRpcImpl implements ITencentMiniGameBackRpc {
                 .isFirstOrder(isFirstOrder)
                 .build();
         gameTencentMiniGameOrderService.save(orderLog);
-        return ResultVO.ok(gameTencentMiniGameOrderService.orderBack(orderLog, false));
+        return ResultVO.ok(gameTencentMiniGameOrderService.orderBack(orderLog, false, null));
     }
 
     @Override

+ 1 - 1
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/rpc/impl/TencentUserActionBackRpcImpl.java

@@ -64,7 +64,7 @@ public class TencentUserActionBackRpcImpl implements ITencentUserActionBackRpc {
                 .isFirstOrder(isFirstOrder)
                 .build();
         gameTencentOrderService.save(gameTencentOrder);
-        return ResultVO.ok(gameTencentOrderService.orderBack(gameTencentOrder, false));
+        return ResultVO.ok(gameTencentOrderService.orderBack(gameTencentOrder, false, null));
     }
 
     @Override

+ 1 - 1
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/rpc/impl/TtMiniGameBackRpcImpl.java

@@ -83,6 +83,6 @@ public class TtMiniGameBackRpcImpl implements ITtMiniGameBackRpc {
         ) == null;
         orderLog.setIsFirstOrder(isFirstOrder);
         gameOceanengineOrderLogService.save(orderLog);
-        return ResultVO.ok(gameOceanengineOrderLogService.callback(orderLog, false));
+        return ResultVO.ok(gameOceanengineOrderLogService.callback(orderLog, false, null));
     }
 }

+ 2 - 2
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/service/IGameOceanengineOrderLogService.java

@@ -10,9 +10,9 @@ import java.util.List;
 
 public interface IGameOceanengineOrderLogService extends IService<GameOceanengineOrderLog> {
 
-    boolean callback(GameOceanengineOrderLog orderLog, boolean mustBack);
+    boolean callback(GameOceanengineOrderLog orderLog, boolean mustBack, Long backMoneyOfInput);
 
     IPage<GameOceanengineOrderLogVO> oceanengineOrderLogList(GameOceanengineOrderLogDTO dto);
 
-    boolean oceanengineOrderReport(List<Long> ids);
+    boolean oceanengineOrderReport(List<Long> ids, Long backMoney);
 }

+ 2 - 2
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/service/IGameTencentMiniGameOrderService.java

@@ -10,9 +10,9 @@ import java.util.List;
 
 public interface IGameTencentMiniGameOrderService extends IService<GameTencentMiniGameOrder> {
 
-    boolean orderBack(GameTencentMiniGameOrder orderLog, boolean mustBack);
+    boolean orderBack(GameTencentMiniGameOrder orderLog, boolean mustBack, Long backMoneyOfInput);
 
     IPage<GameTencentMiniGameOrderVO> listOfPage(GameTencentMiniGameOrderDTO dto);
 
-    boolean doReport(List<Long> orderLogIds);
+    boolean doReport(List<Long> orderLogIds, Long backMoney);
 }

+ 2 - 2
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/service/IGameTencentOrderService.java

@@ -19,9 +19,9 @@ import java.util.List;
  */
 public interface IGameTencentOrderService extends IService<GameTencentOrder> {
 
-    boolean orderBack(GameTencentOrder tencentOrder, boolean mustBack);
+    boolean orderBack(GameTencentOrder tencentOrder, boolean mustBack, Long backMoneyOfInput);
 
     IPage<GameTencentOrderVO> tencentOrderLogList(GameTencentOrderDTO dto);
 
-    boolean tencentOrderReport(List<Long> ids);
+    boolean tencentOrderReport(List<Long> ids, Long backMoney);
 }

+ 58 - 2
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/service/impl/GameBackPolicyServiceImpl.java

@@ -21,6 +21,7 @@ import com.zanxiang.module.util.NumberUtil;
 import com.zanxiang.module.util.bean.BeanUtil;
 import com.zanxiang.module.util.exception.BaseException;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.dubbo.config.annotation.DubboReference;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -28,7 +29,11 @@ import org.springframework.stereotype.Service;
 
 import java.math.BigDecimal;
 import java.time.LocalDateTime;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
 import java.util.List;
+import java.util.function.Function;
 import java.util.stream.Collectors;
 
 /**
@@ -87,6 +92,8 @@ public class GameBackPolicyServiceImpl extends ServiceImpl<GameBackPolicyMapper,
                 .firstMaxMoneyRate(dto.getFirstMaxMoneyRate())
                 .firstOtherMoneyType(dto.getFirstOtherMoneyType())
                 .firstOtherMoneyRate(dto.getFirstOtherMoneyRate())
+                .firstDownLevel(downLevelToString(dto.getFirstDownLevel()))
+                .firstBackCountOfUser(dto.getFirstBackCountOfUser())
                 .rechargeMinMoney(NumberUtil.multiply100(dto.getRechargeMinMoney()).longValue())
                 .rechargeMinMoneyType(dto.getRechargeMinMoneyType())
                 .rechargeMinMoneyRate(dto.getRechargeMinMoneyRate())
@@ -95,7 +102,8 @@ public class GameBackPolicyServiceImpl extends ServiceImpl<GameBackPolicyMapper,
                 .rechargeMaxMoneyRate(dto.getRechargeMaxMoneyRate())
                 .rechargeOtherMoneyType(dto.getRechargeOtherMoneyType())
                 .rechargeOtherMoneyRate(dto.getRechargeOtherMoneyRate())
-                .levelDown(dto.getLevelDown())
+                .rechargeDownLevel(downLevelToString(dto.getRechargeDownLevel()))
+                .rechargeBackCountOfUser(dto.getRechargeBackCountOfUser())
                 .createBy(SecurityUtil.getUserId())
                 .createTime(LocalDateTime.now())
                 .regPayIntervalTime(dto.getRegPayIntervalTime())
@@ -109,6 +117,8 @@ public class GameBackPolicyServiceImpl extends ServiceImpl<GameBackPolicyMapper,
                 .markUpOrderMaxMoneyRate(dto.getMarkUpOrderMaxMoneyRate())
                 .markUpOrderOtherMoneyType(dto.getFirstOtherMoneyType())
                 .markUpOrderOtherMoneyRate(dto.getMarkUpOrderMaxMoneyRate())
+                .markUpDownLevel(downLevelToString(dto.getMarkUpDownLevel()))
+                .markUpBackCountOfUser(dto.getMarkUpBackCountOfUser())
                 .build();
         return gameBackPolicyService.save(backPolicy);
     }
@@ -130,6 +140,8 @@ public class GameBackPolicyServiceImpl extends ServiceImpl<GameBackPolicyMapper,
                 .firstMaxMoneyRate(dto.getFirstMaxMoneyRate())
                 .firstOtherMoneyType(dto.getFirstOtherMoneyType())
                 .firstOtherMoneyRate(dto.getFirstOtherMoneyRate())
+                .firstDownLevel(downLevelToString(dto.getFirstDownLevel()))
+                .firstBackCountOfUser(dto.getFirstBackCountOfUser())
                 .rechargeMinMoney(NumberUtil.multiply100(dto.getRechargeMinMoney()).longValue())
                 .rechargeMinMoneyType(dto.getRechargeMinMoneyType())
                 .rechargeMinMoneyRate(dto.getRechargeMinMoneyRate())
@@ -138,7 +150,8 @@ public class GameBackPolicyServiceImpl extends ServiceImpl<GameBackPolicyMapper,
                 .rechargeMaxMoneyRate(dto.getRechargeMaxMoneyRate())
                 .rechargeOtherMoneyType(dto.getRechargeOtherMoneyType())
                 .rechargeOtherMoneyRate(dto.getRechargeOtherMoneyRate())
-                .levelDown(dto.getLevelDown())
+                .rechargeDownLevel(downLevelToString(dto.getRechargeDownLevel()))
+                .rechargeBackCountOfUser(dto.getRechargeBackCountOfUser())
                 .regPayIntervalTime(dto.getRegPayIntervalTime())
                 .createBy(old.getCreateBy())
                 .createTime(old.getCreateTime())
@@ -154,6 +167,8 @@ public class GameBackPolicyServiceImpl extends ServiceImpl<GameBackPolicyMapper,
                 .markUpOrderMaxMoneyRate(dto.getMarkUpOrderMaxMoneyRate())
                 .markUpOrderOtherMoneyType(dto.getFirstOtherMoneyType())
                 .markUpOrderOtherMoneyRate(dto.getMarkUpOrderMaxMoneyRate())
+                .markUpDownLevel(downLevelToString(dto.getMarkUpDownLevel()))
+                .markUpBackCountOfUser(dto.getMarkUpBackCountOfUser())
                 .build();
 
         return gameBackPolicyService.updateById(backPolicy);
@@ -187,6 +202,24 @@ public class GameBackPolicyServiceImpl extends ServiceImpl<GameBackPolicyMapper,
         if (gameBackPolicy.getMarkUpOrderMaxMoney() != null) {
             vo.setMarkUpOrderMaxMoney(NumberUtil.divide100(new BigDecimal(gameBackPolicy.getMarkUpOrderMaxMoney())));
         }
+        if (StringUtils.isNotBlank(gameBackPolicy.getFirstDownLevel())) {
+            vo.setFirstDownLevel(Arrays.stream(gameBackPolicy.getFirstDownLevel().split(","))
+                    .map(this::transformDownLevel)
+                    .collect(Collectors.toList())
+            );
+        }
+        if (StringUtils.isNotBlank(gameBackPolicy.getRechargeDownLevel())) {
+            vo.setRechargeDownLevel(Arrays.stream(gameBackPolicy.getRechargeDownLevel().split(","))
+                    .map(this::transformDownLevel)
+                    .collect(Collectors.toList())
+            );
+        }
+        if (StringUtils.isNotBlank(gameBackPolicy.getMarkUpDownLevel())) {
+            vo.setMarkUpDownLevel(Arrays.stream(gameBackPolicy.getMarkUpDownLevel().split(","))
+                    .map(this::transformDownLevel)
+                    .collect(Collectors.toList())
+            );
+        }
         return vo;
     }
 
@@ -198,4 +231,27 @@ public class GameBackPolicyServiceImpl extends ServiceImpl<GameBackPolicyMapper,
         vo.setCreateName(sysUserRpc.getById(gameBackPolicy.getCreateBy()).getData().getNickname());
         return vo;
     }
+
+    private GameBackPolicyVO.PolicyDownLevel transformDownLevel(String downLevel) {
+        String[] tmp = downLevel.split("_");
+        return GameBackPolicyVO.PolicyDownLevel.builder()
+                .minMoney(NumberUtil.divide100(new BigDecimal(Long.parseLong(tmp[0]))))
+                .maxMoney(NumberUtil.divide100(new BigDecimal(Long.parseLong(tmp[1]))))
+                .backMoney(NumberUtil.divide100(new BigDecimal(Long.parseLong(tmp[2]))))
+                .build();
+    }
+
+    private String downLevelToString(List<GameBackPolicyVO.PolicyDownLevel> downLevelList) {
+        if (CollectionUtils.isEmpty(downLevelList)) {
+            return null;
+        }
+        downLevelList.sort((val1, val2) -> val1.getMinMoney().compareTo(val2.getMinMoney()));
+        return StringUtils.join(downLevelList.stream().map(this::downLevelToString).collect(Collectors.toList()), ",");
+    }
+
+    private String downLevelToString(GameBackPolicyVO.PolicyDownLevel downLevel) {
+        return NumberUtil.multiply100(downLevel.getMinMoney()).longValue() + "_" +
+                NumberUtil.multiply100(downLevel.getMaxMoney()).longValue() + "_" +
+                NumberUtil.multiply100(downLevel.getBackMoney()).longValue();
+    }
 }

+ 175 - 29
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/service/impl/GameOceanengineOrderLogServiceImpl.java

@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.sd4324530.jtuple.Tuple3;
+import com.github.sd4324530.jtuple.Tuples;
 import com.zanxiang.game.back.base.pojo.enums.OrderStatusEnum;
 import com.zanxiang.game.back.serve.dao.mapper.GameOceanengineOrderLogMapper;
 import com.zanxiang.game.back.serve.oceanengine.MiniGameCallback;
@@ -12,6 +14,7 @@ import com.zanxiang.game.back.serve.oceanengine.OceanengineCallbackException;
 import com.zanxiang.game.back.serve.pojo.dto.GameOceanengineOrderLogDTO;
 import com.zanxiang.game.back.serve.pojo.entity.*;
 import com.zanxiang.game.back.serve.pojo.enums.BackStatusEnum;
+import com.zanxiang.game.back.serve.pojo.enums.BackUnitEnum;
 import com.zanxiang.game.back.serve.pojo.vo.GameOceanengineOrderLogVO;
 import com.zanxiang.game.back.serve.service.IGameBackPolicyService;
 import com.zanxiang.game.back.serve.service.IGameOceanengineBackLogService;
@@ -58,50 +61,191 @@ public class GameOceanengineOrderLogServiceImpl extends ServiceImpl<GameOceaneng
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public boolean callback(GameOceanengineOrderLog orderLog, boolean mustBack) {
+    public boolean callback(GameOceanengineOrderLog orderLog, boolean mustBack, Long backMoneyOfInput) {
         boolean doBack = false;
+        Long backMoney;
+        String backMsg;
         if (mustBack) {
             doBack = true;
+            backMoney = backMoneyOfInput;
+            backMsg = "手动触发的回传";
         } else {
             if (!Objects.equals(orderLog.getOrderStatus(), OrderStatusEnum.SUCCESS_PAY.getValue())) {
                 // 头条只要回传支付订单
-                return false;
+                return true;
             }
-            if (orderLog.getBackPolicyId() == null) {
-                // 没有回传策略,则直接全量回传
-                doBack = true;
-            } else {
-                GameBackPolicy gameBackPolicy = gameBackPolicyService.getById(orderLog.getBackPolicyId());
-                doBack = BackPolicyUtil.backOrder(orderLog.getOrderNo(), gameBackPolicy, orderLog.getAmount(),
-                        orderLog.getIsFirstOrder(),
-                        orderLog.getPayTime(), orderLog.getRegTime(),
-                        (backUnit, isFirstOrder, firstDay, markUpTime) -> Long.valueOf(list(new LambdaQueryWrapper<GameOceanengineOrderLog>()
+            GameBackPolicy gameBackPolicy = gameBackPolicyService.getById(orderLog.getBackPolicyId());
+            Tuple3<Boolean, Long, String> backInfo = BackPolicyUtil.backOrder(orderLog.getOrderNo(), gameBackPolicy, orderLog.getAmount(),
+                    orderLog.getIsFirstOrder(),
+                    orderLog.getPayTime(), orderLog.getRegTime(),
+                    orderLog.getOpenId(),
+                    new BackPolicyUtil.IBackPolicyCheck() {
+                        @Override
+                        public long backCountForFixedRate(int numberOfRound, BackUnitEnum backUnit, Boolean firstPolicy) {
+                            numberOfRound = numberOfRound - 1;
+                            if (backUnit == BackUnitEnum.UNIT_ONCE) {
+                                return list(new LambdaQueryWrapper<GameOceanengineOrderLog>()
                                         .eq(GameOceanengineOrderLog::getGameId, orderLog.getGameId())
                                         .eq(GameOceanengineOrderLog::getAppId, orderLog.getAppId())
                                         .eq(GameOceanengineOrderLog::getAccountId, orderLog.getAccountId())
                                         .eq(GameOceanengineOrderLog::getBackPolicyId, gameBackPolicy.getId())
                                         .eq(GameOceanengineOrderLog::getOrderStatus, OrderStatusEnum.SUCCESS_PAY.getValue())
-                                        .eq(isFirstOrder != null, GameOceanengineOrderLog::getIsFirstOrder, isFirstOrder)
-                                        .apply(firstDay != null && firstDay, "date(reg_time) = date(pay_time)")
-                                        .apply(firstDay != null && !firstDay, "date(reg_time) != date(pay_time)")
-                                        .apply(markUpTime != null, "TIMESTAMPDIFF(MINUTE, reg_time, pay_time) > {0}", markUpTime)
+                                        .eq(GameOceanengineOrderLog::getIsFirstOrder, firstPolicy)
                                         .ne(GameOceanengineOrderLog::getOrderNo, orderLog.getOrderNo())
                                         .orderByDesc(GameOceanengineOrderLog::getCreateTime)
-                                        .last("limit " + backUnit)
-                                ).stream().filter(log -> log.getBackStatus().equals(BackStatusEnum.SUCCESS.getBackStatus())).count()
-                        ).intValue());
-                orderLog.setAmount(BackPolicyUtil.lowRechargeLevel(orderLog.getAmount(), gameBackPolicy.getLevelDown()));
-            }
+                                        .last("limit " + numberOfRound)
+                                ).stream().filter(log -> log.getBackStatus().equals(BackStatusEnum.SUCCESS.getBackStatus())).count();
+                            } else if (backUnit == BackUnitEnum.UNIT_DAY) {
+                                return list(new LambdaQueryWrapper<GameOceanengineOrderLog>()
+                                        .eq(GameOceanengineOrderLog::getGameId, orderLog.getGameId())
+                                        .eq(GameOceanengineOrderLog::getAppId, orderLog.getAppId())
+                                        .eq(GameOceanengineOrderLog::getAccountId, orderLog.getAccountId())
+                                        .eq(GameOceanengineOrderLog::getBackPolicyId, gameBackPolicy.getId())
+                                        .eq(GameOceanengineOrderLog::getOrderStatus, OrderStatusEnum.SUCCESS_PAY.getValue())
+                                        .apply(firstPolicy, "date(reg_time) = date(pay_time)")
+                                        .apply(!firstPolicy, "date(reg_time) != date(pay_time)")
+                                        .ne(GameOceanengineOrderLog::getOrderNo, orderLog.getOrderNo())
+                                        .orderByDesc(GameOceanengineOrderLog::getCreateTime)
+                                        .last("limit " + numberOfRound)
+                                ).stream().filter(log -> log.getBackStatus().equals(BackStatusEnum.SUCCESS.getBackStatus())).count();
+                            } else if (backUnit == BackUnitEnum.UNIT_TIME_DAY) {
+                                return list(new LambdaQueryWrapper<GameOceanengineOrderLog>()
+                                        .eq(GameOceanengineOrderLog::getGameId, orderLog.getGameId())
+                                        .eq(GameOceanengineOrderLog::getAppId, orderLog.getAppId())
+                                        .eq(GameOceanengineOrderLog::getAccountId, orderLog.getAccountId())
+                                        .eq(GameOceanengineOrderLog::getBackPolicyId, gameBackPolicy.getId())
+                                        .eq(GameOceanengineOrderLog::getOrderStatus, OrderStatusEnum.SUCCESS_PAY.getValue())
+                                        .apply(firstPolicy, "TIMESTAMPDIFF(HOUR, reg_time, pay_time) < 24")
+                                        .apply(!firstPolicy, "TIMESTAMPDIFF(HOUR, reg_time, pay_time) >= 24")
+                                        .ne(GameOceanengineOrderLog::getOrderNo, orderLog.getOrderNo())
+                                        .orderByDesc(GameOceanengineOrderLog::getCreateTime)
+                                        .last("limit " + numberOfRound)
+                                ).stream().filter(log -> log.getBackStatus().equals(BackStatusEnum.SUCCESS.getBackStatus())).count();
+                            } else if (backUnit == BackUnitEnum.UNIT_TIME_2DAY) {
+                                return list(new LambdaQueryWrapper<GameOceanengineOrderLog>()
+                                        .eq(GameOceanengineOrderLog::getGameId, orderLog.getGameId())
+                                        .eq(GameOceanengineOrderLog::getAppId, orderLog.getAppId())
+                                        .eq(GameOceanengineOrderLog::getAccountId, orderLog.getAccountId())
+                                        .eq(GameOceanengineOrderLog::getBackPolicyId, gameBackPolicy.getId())
+                                        .eq(GameOceanengineOrderLog::getOrderStatus, OrderStatusEnum.SUCCESS_PAY.getValue())
+                                        .apply(firstPolicy, "TIMESTAMPDIFF(HOUR, reg_time, pay_time) < 48")
+                                        .apply(!firstPolicy, "TIMESTAMPDIFF(HOUR, reg_time, pay_time) >= 48")
+                                        .ne(GameOceanengineOrderLog::getOrderNo, orderLog.getOrderNo())
+                                        .orderByDesc(GameOceanengineOrderLog::getCreateTime)
+                                        .last("limit " + numberOfRound)
+                                ).stream().filter(log -> log.getBackStatus().equals(BackStatusEnum.SUCCESS.getBackStatus())).count();
+                            } else {
+                                throw new RuntimeException("不支持的回传单位[" + backUnit.getValue() + "]");
+                            }
+                        }
+
+                        @Override
+                        public long backCountForUser(BackUnitEnum backUnit, String userId, Boolean firstPolicy) {
+                            if (backUnit == BackUnitEnum.UNIT_ONCE) {
+                                if (firstPolicy) {
+                                    // 首单直接返回 0,必定回传
+                                    return 0;
+                                }
+                                return count(new LambdaQueryWrapper<GameOceanengineOrderLog>()
+                                        .eq(GameOceanengineOrderLog::getGameId, orderLog.getGameId())
+                                        .eq(GameOceanengineOrderLog::getAppId, orderLog.getAppId())
+                                        .eq(GameOceanengineOrderLog::getAccountId, orderLog.getAccountId())
+                                        .eq(GameOceanengineOrderLog::getBackPolicyId, gameBackPolicy.getId())
+                                        .eq(GameOceanengineOrderLog::getOrderStatus, OrderStatusEnum.SUCCESS_PAY.getValue())
+                                        .eq(GameOceanengineOrderLog::getBackStatus, BackStatusEnum.SUCCESS.getBackStatus())
+                                        .eq(GameOceanengineOrderLog::getOpenId, userId)
+                                        .eq(GameOceanengineOrderLog::getIsFirstOrder, firstPolicy)
+                                        .ne(GameOceanengineOrderLog::getOrderNo, orderLog.getOrderNo())
+                                );
+                            } else if (backUnit == BackUnitEnum.UNIT_DAY) {
+                                return count(new LambdaQueryWrapper<GameOceanengineOrderLog>()
+                                        .eq(GameOceanengineOrderLog::getGameId, orderLog.getGameId())
+                                        .eq(GameOceanengineOrderLog::getAppId, orderLog.getAppId())
+                                        .eq(GameOceanengineOrderLog::getAccountId, orderLog.getAccountId())
+                                        .eq(GameOceanengineOrderLog::getBackPolicyId, gameBackPolicy.getId())
+                                        .eq(GameOceanengineOrderLog::getOrderStatus, OrderStatusEnum.SUCCESS_PAY.getValue())
+                                        .eq(GameOceanengineOrderLog::getBackStatus, BackStatusEnum.SUCCESS.getBackStatus())
+                                        .eq(GameOceanengineOrderLog::getOpenId, userId)
+                                        .apply(firstPolicy, "date(reg_time) = date(pay_time)")
+                                        .apply(!firstPolicy, "date(reg_time) != date(pay_time)")
+                                        .ne(GameOceanengineOrderLog::getOrderNo, orderLog.getOrderNo())
+                                );
+                            } else if (backUnit == BackUnitEnum.UNIT_TIME_DAY) {
+                                return count(new LambdaQueryWrapper<GameOceanengineOrderLog>()
+                                        .eq(GameOceanengineOrderLog::getGameId, orderLog.getGameId())
+                                        .eq(GameOceanengineOrderLog::getAppId, orderLog.getAppId())
+                                        .eq(GameOceanengineOrderLog::getAccountId, orderLog.getAccountId())
+                                        .eq(GameOceanengineOrderLog::getBackPolicyId, gameBackPolicy.getId())
+                                        .eq(GameOceanengineOrderLog::getOrderStatus, OrderStatusEnum.SUCCESS_PAY.getValue())
+                                        .eq(GameOceanengineOrderLog::getBackStatus, BackStatusEnum.SUCCESS.getBackStatus())
+                                        .eq(GameOceanengineOrderLog::getOpenId, userId)
+                                        .apply(firstPolicy, "TIMESTAMPDIFF(HOUR, reg_time, pay_time) < 24")
+                                        .apply(!firstPolicy, "TIMESTAMPDIFF(HOUR, reg_time, pay_time) >= 24")
+                                        .ne(GameOceanengineOrderLog::getOrderNo, orderLog.getOrderNo())
+                                );
+                            } else if (backUnit == BackUnitEnum.UNIT_TIME_2DAY) {
+                                return count(new LambdaQueryWrapper<GameOceanengineOrderLog>()
+                                        .eq(GameOceanengineOrderLog::getGameId, orderLog.getGameId())
+                                        .eq(GameOceanengineOrderLog::getAppId, orderLog.getAppId())
+                                        .eq(GameOceanengineOrderLog::getAccountId, orderLog.getAccountId())
+                                        .eq(GameOceanengineOrderLog::getBackPolicyId, gameBackPolicy.getId())
+                                        .eq(GameOceanengineOrderLog::getOrderStatus, OrderStatusEnum.SUCCESS_PAY.getValue())
+                                        .eq(GameOceanengineOrderLog::getBackStatus, BackStatusEnum.SUCCESS.getBackStatus())
+                                        .eq(GameOceanengineOrderLog::getOpenId, userId)
+                                        .apply(firstPolicy, "TIMESTAMPDIFF(HOUR, reg_time, pay_time) < 48")
+                                        .apply(!firstPolicy, "TIMESTAMPDIFF(HOUR, reg_time, pay_time) >= 48")
+                                        .ne(GameOceanengineOrderLog::getOrderNo, orderLog.getOrderNo())
+                                );
+                            } else {
+                                throw new RuntimeException("不支持的回传单位[" + backUnit.getValue() + "]");
+                            }
+                        }
+
+                        @Override
+                        public long markUpOfFixedRate(int numberOfRound, Long markUpTime) {
+                            numberOfRound = numberOfRound - 1;
+                            return list(new LambdaQueryWrapper<GameOceanengineOrderLog>()
+                                    .eq(GameOceanengineOrderLog::getGameId, orderLog.getGameId())
+                                    .eq(GameOceanengineOrderLog::getAppId, orderLog.getAppId())
+                                    .eq(GameOceanengineOrderLog::getAccountId, orderLog.getAccountId())
+                                    .eq(GameOceanengineOrderLog::getBackPolicyId, gameBackPolicy.getId())
+                                    .eq(GameOceanengineOrderLog::getOrderStatus, OrderStatusEnum.SUCCESS_PAY.getValue())
+                                    .apply("TIMESTAMPDIFF(MINUTE, reg_time, pay_time) > {0}", markUpTime)
+                                    .ne(GameOceanengineOrderLog::getOrderNo, orderLog.getOrderNo())
+                                    .orderByDesc(GameOceanengineOrderLog::getCreateTime)
+                                    .last("limit " + numberOfRound)
+                            ).stream().filter(log -> log.getBackStatus().equals(BackStatusEnum.SUCCESS.getBackStatus())).count();
+                        }
+
+                        @Override
+                        public long markUpForUser(String userId, Long markUpTime) {
+                            return count(new LambdaQueryWrapper<GameOceanengineOrderLog>()
+                                    .eq(GameOceanengineOrderLog::getGameId, orderLog.getGameId())
+                                    .eq(GameOceanengineOrderLog::getAppId, orderLog.getAppId())
+                                    .eq(GameOceanengineOrderLog::getAccountId, orderLog.getAccountId())
+                                    .eq(GameOceanengineOrderLog::getBackPolicyId, gameBackPolicy.getId())
+                                    .eq(GameOceanengineOrderLog::getOrderStatus, OrderStatusEnum.SUCCESS_PAY.getValue())
+                                    .eq(GameOceanengineOrderLog::getBackStatus, BackStatusEnum.SUCCESS.getBackStatus())
+                                    .eq(GameOceanengineOrderLog::getOpenId, userId)
+                                    .apply("TIMESTAMPDIFF(MINUTE, reg_time, pay_time) > {0}", markUpTime)
+                                    .ne(GameOceanengineOrderLog::getOrderNo, orderLog.getOrderNo())
+                            );
+                        }
+                    });
+            doBack = backInfo.first;
+            backMoney = backInfo.second;
+            backMsg = backInfo.third;
         }
+        BackStatusEnum backStatus = BackStatusEnum.NO;
         if (doBack) {
-            BackStatusEnum backStatus = doCallback(orderLog);
-            update(new LambdaUpdateWrapper<GameOceanengineOrderLog>()
-                    .set(GameOceanengineOrderLog::getBackStatus, backStatus.getBackStatus())
-                    .eq(GameOceanengineOrderLog::getId, orderLog.getId())
-            );
-            return true;
+            backStatus = doCallback(orderLog);
         }
-        return false;
+        return update(new LambdaUpdateWrapper<GameOceanengineOrderLog>()
+                .set(GameOceanengineOrderLog::getBackStatus, backStatus.getBackStatus())
+                .set(GameOceanengineOrderLog::getBackMoney, backMoney)
+                .set(GameOceanengineOrderLog::getBackMsg, backMsg)
+                .eq(GameOceanengineOrderLog::getId, orderLog.getId())
+        );
     }
 
     @Override
@@ -159,8 +303,10 @@ public class GameOceanengineOrderLogServiceImpl extends ServiceImpl<GameOceaneng
     }
 
     @Override
-    public boolean oceanengineOrderReport(List<Long> ids) {
-        listByIds(ids).forEach(orderLog -> callback(orderLog, true));
+    public boolean oceanengineOrderReport(List<Long> ids, Long backMoney) {
+        listByIds(ids).stream()
+                .filter(order -> !Objects.equals(order.getBackStatus(), BackStatusEnum.SUCCESS.getBackStatus()))
+                .forEach(orderLog -> callback(orderLog, true, backMoney));
         return true;
     }
 

+ 173 - 37
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/service/impl/GameTencentMiniGameOrderServiceImpl.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.sd4324530.jtuple.Tuple3;
 import com.zanxiang.advertising.tencent.base.AdvertisingTencentServer;
 import com.zanxiang.advertising.tencent.base.rpc.IUserActionSetRpc;
 import com.zanxiang.erp.base.ErpServer;
@@ -13,9 +14,9 @@ import com.zanxiang.game.back.base.pojo.enums.OrderStatusEnum;
 import com.zanxiang.game.back.serve.dao.mapper.GameTencentMiniGameOrderMapper;
 import com.zanxiang.game.back.serve.pojo.dto.GameTencentMiniGameOrderDTO;
 import com.zanxiang.game.back.serve.pojo.entity.GameBackPolicy;
-import com.zanxiang.game.back.serve.pojo.entity.GameOceanengineOrderLog;
 import com.zanxiang.game.back.serve.pojo.entity.GameTencentMiniGameOrder;
 import com.zanxiang.game.back.serve.pojo.enums.BackStatusEnum;
+import com.zanxiang.game.back.serve.pojo.enums.BackUnitEnum;
 import com.zanxiang.game.back.serve.pojo.vo.GameTencentMiniGameOrderVO;
 import com.zanxiang.game.back.serve.service.IGameBackPolicyService;
 import com.zanxiang.game.back.serve.service.IGameTencentMiniGameBackLogService;
@@ -61,57 +62,196 @@ public class GameTencentMiniGameOrderServiceImpl extends ServiceImpl<GameTencent
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public boolean orderBack(GameTencentMiniGameOrder orderLog, boolean mustBack) {
+    public boolean orderBack(GameTencentMiniGameOrder orderLog, boolean mustBack, Long backMoneyOfInput) {
         if (StringUtils.isBlank(orderLog.getClickId())) {
             // 没有点击 id(之后做监测链接,从监测链接里面找)
             return false;
         }
         boolean doBack = false;
+        Long backMoney;
+        String backMsg;
         if (mustBack) {
             doBack = true;
+            backMoney = backMoneyOfInput;
+            backMsg = "手动触发的回传";
         } else {
             if (!Objects.equals(orderLog.getOrderStatus(), OrderStatusEnum.SUCCESS_PAY.getValue())) {
                 // 只要回传 支付行为
-                return false;
+                return true;
             }
-            if (orderLog.getBackPolicyId() == null) {
-                // 没有回传策略,则直接全量回传
-                doBack = true;
-            } else {
-                GameBackPolicy gameBackPolicy = gameBackPolicyService.getById(orderLog.getBackPolicyId());
-                // 此处是否是首单用 limit 2。因为在执行判断之前订单已入库,所以库里只有一笔才是首单
-                doBack = BackPolicyUtil.backOrder(orderLog.getOrderId(), gameBackPolicy, orderLog.getRechargeMoney(),
-                        orderLog.getIsFirstOrder(), orderLog.getPayTime(), orderLog.getRegisterTime(),
-                        (backUnit, isFirstOrder, firstDay, markUpTime) -> Long.valueOf(list(new LambdaQueryWrapper<GameTencentMiniGameOrder>()
+            GameBackPolicy gameBackPolicy = gameBackPolicyService.getById(orderLog.getBackPolicyId());
+            // 此处是否是首单用 limit 2。因为在执行判断之前订单已入库,所以库里只有一笔才是首单
+            Tuple3<Boolean, Long, String> backInfo = BackPolicyUtil.backOrder(orderLog.getOrderId(), gameBackPolicy, orderLog.getRechargeMoney(),
+                    orderLog.getIsFirstOrder(), orderLog.getPayTime(), orderLog.getRegisterTime(), orderLog.getWechatOpenid(),
+                    new BackPolicyUtil.IBackPolicyCheck() {
+                        @Override
+                        public long backCountForFixedRate(int numberOfRound, BackUnitEnum backUnit, Boolean firstPolicy) {
+                            numberOfRound = numberOfRound - 1;
+                            if (backUnit == BackUnitEnum.UNIT_ONCE) {
+                                return list(new LambdaQueryWrapper<GameTencentMiniGameOrder>()
                                         .eq(GameTencentMiniGameOrder::getGameId, orderLog.getGameId())
                                         .eq(GameTencentMiniGameOrder::getWechatAppId, orderLog.getWechatAppId())
                                         .eq(GameTencentMiniGameOrder::getAdAccountId, orderLog.getAdAccountId())
+                                        .eq(GameTencentMiniGameOrder::getBackPolicyId, gameBackPolicy.getId())
                                         .eq(GameTencentMiniGameOrder::getOrderStatus, OrderStatusEnum.SUCCESS_PAY.getValue())
+                                        .eq(GameTencentMiniGameOrder::getIsFirstOrder, firstPolicy)
+                                        .ne(GameTencentMiniGameOrder::getOrderId, orderLog.getOrderId())
+                                        .orderByDesc(GameTencentMiniGameOrder::getCreateTime)
+                                        .last("limit " + numberOfRound)
+                                ).stream().filter(log -> log.getBackStatus().equals(BackStatusEnum.SUCCESS.getBackStatus())).count();
+                            } else if (backUnit == BackUnitEnum.UNIT_DAY) {
+                                return list(new LambdaQueryWrapper<GameTencentMiniGameOrder>()
+                                        .eq(GameTencentMiniGameOrder::getGameId, orderLog.getGameId())
+                                        .eq(GameTencentMiniGameOrder::getWechatAppId, orderLog.getWechatAppId())
+                                        .eq(GameTencentMiniGameOrder::getAdAccountId, orderLog.getAdAccountId())
                                         .eq(GameTencentMiniGameOrder::getBackPolicyId, gameBackPolicy.getId())
-                                        .eq(isFirstOrder != null, GameTencentMiniGameOrder::getIsFirstOrder, isFirstOrder)
-                                        .apply(firstDay != null && firstDay, "date(register_time) = date(pay_time)")
-                                        .apply(firstDay != null && !firstDay, "date(register_time) != date(pay_time)")
-                                        .apply(markUpTime != null, "TIMESTAMPDIFF(MINUTE, register_time, pay_time) > {0}", markUpTime)
+                                        .eq(GameTencentMiniGameOrder::getOrderStatus, OrderStatusEnum.SUCCESS_PAY.getValue())
+                                        .apply(firstPolicy, "date(recharge_time) = date(pay_time)")
+                                        .apply(!firstPolicy, "date(recharge_time) != date(pay_time)")
                                         .ne(GameTencentMiniGameOrder::getOrderId, orderLog.getOrderId())
                                         .orderByDesc(GameTencentMiniGameOrder::getCreateTime)
-                                        .last("limit " + backUnit)
-                                ).stream().filter(log -> log.getBackStatus().equals(BackStatusEnum.SUCCESS.getBackStatus())).count()
-                        ).intValue());
-                orderLog.setRechargeMoney(BackPolicyUtil.lowRechargeLevel(orderLog.getRechargeMoney(), gameBackPolicy.getLevelDown()));
-            }
+                                        .last("limit " + numberOfRound)
+                                ).stream().filter(log -> log.getBackStatus().equals(BackStatusEnum.SUCCESS.getBackStatus())).count();
+                            } else if (backUnit == BackUnitEnum.UNIT_TIME_DAY) {
+                                return list(new LambdaQueryWrapper<GameTencentMiniGameOrder>()
+                                        .eq(GameTencentMiniGameOrder::getGameId, orderLog.getGameId())
+                                        .eq(GameTencentMiniGameOrder::getWechatAppId, orderLog.getWechatAppId())
+                                        .eq(GameTencentMiniGameOrder::getAdAccountId, orderLog.getAdAccountId())
+                                        .eq(GameTencentMiniGameOrder::getBackPolicyId, gameBackPolicy.getId())
+                                        .eq(GameTencentMiniGameOrder::getOrderStatus, OrderStatusEnum.SUCCESS_PAY.getValue())
+                                        .apply(firstPolicy, "TIMESTAMPDIFF(HOUR, recharge_time, pay_time) < 24")
+                                        .apply(!firstPolicy, "TIMESTAMPDIFF(HOUR, recharge_time, pay_time) >= 24")
+                                        .ne(GameTencentMiniGameOrder::getOrderId, orderLog.getOrderId())
+                                        .orderByDesc(GameTencentMiniGameOrder::getCreateTime)
+                                        .last("limit " + numberOfRound)
+                                ).stream().filter(log -> log.getBackStatus().equals(BackStatusEnum.SUCCESS.getBackStatus())).count();
+                            } else if (backUnit == BackUnitEnum.UNIT_TIME_2DAY) {
+                                return list(new LambdaQueryWrapper<GameTencentMiniGameOrder>()
+                                        .eq(GameTencentMiniGameOrder::getGameId, orderLog.getGameId())
+                                        .eq(GameTencentMiniGameOrder::getWechatAppId, orderLog.getWechatAppId())
+                                        .eq(GameTencentMiniGameOrder::getAdAccountId, orderLog.getAdAccountId())
+                                        .eq(GameTencentMiniGameOrder::getBackPolicyId, gameBackPolicy.getId())
+                                        .eq(GameTencentMiniGameOrder::getOrderStatus, OrderStatusEnum.SUCCESS_PAY.getValue())
+                                        .apply(firstPolicy, "TIMESTAMPDIFF(HOUR, recharge_time, pay_time) < 48")
+                                        .apply(!firstPolicy, "TIMESTAMPDIFF(HOUR, recharge_time, pay_time) >= 48")
+                                        .ne(GameTencentMiniGameOrder::getOrderId, orderLog.getOrderId())
+                                        .orderByDesc(GameTencentMiniGameOrder::getCreateTime)
+                                        .last("limit " + numberOfRound)
+                                ).stream().filter(log -> log.getBackStatus().equals(BackStatusEnum.SUCCESS.getBackStatus())).count();
+                            } else {
+                                throw new RuntimeException("不支持的回传单位[" + backUnit.getValue() + "]");
+                            }
+                        }
+
+                        @Override
+                        public long backCountForUser(BackUnitEnum backUnit, String userId, Boolean firstPolicy) {
+                            if (backUnit == BackUnitEnum.UNIT_ONCE) {
+                                if (firstPolicy) {
+                                    // 首单直接返回 0,必定回传
+                                    return 0;
+                                }
+                                return count(new LambdaQueryWrapper<GameTencentMiniGameOrder>()
+                                        .eq(GameTencentMiniGameOrder::getGameId, orderLog.getGameId())
+                                        .eq(GameTencentMiniGameOrder::getWechatAppId, orderLog.getWechatAppId())
+                                        .eq(GameTencentMiniGameOrder::getAdAccountId, orderLog.getAdAccountId())
+                                        .eq(GameTencentMiniGameOrder::getBackPolicyId, gameBackPolicy.getId())
+                                        .eq(GameTencentMiniGameOrder::getOrderStatus, OrderStatusEnum.SUCCESS_PAY.getValue())
+                                        .eq(GameTencentMiniGameOrder::getBackStatus, BackStatusEnum.SUCCESS.getBackStatus())
+                                        .eq(GameTencentMiniGameOrder::getWechatOpenid, userId)
+                                        .eq(GameTencentMiniGameOrder::getIsFirstOrder, firstPolicy)
+                                        .ne(GameTencentMiniGameOrder::getOrderId, orderLog.getOrderId())
+                                );
+                            } else if (backUnit == BackUnitEnum.UNIT_DAY) {
+                                return count(new LambdaQueryWrapper<GameTencentMiniGameOrder>()
+                                        .eq(GameTencentMiniGameOrder::getGameId, orderLog.getGameId())
+                                        .eq(GameTencentMiniGameOrder::getWechatAppId, orderLog.getWechatAppId())
+                                        .eq(GameTencentMiniGameOrder::getAdAccountId, orderLog.getAdAccountId())
+                                        .eq(GameTencentMiniGameOrder::getBackPolicyId, gameBackPolicy.getId())
+                                        .eq(GameTencentMiniGameOrder::getOrderStatus, OrderStatusEnum.SUCCESS_PAY.getValue())
+                                        .eq(GameTencentMiniGameOrder::getBackStatus, BackStatusEnum.SUCCESS.getBackStatus())
+                                        .eq(GameTencentMiniGameOrder::getWechatOpenid, userId)
+                                        .apply(firstPolicy, "date(recharge_time) = date(pay_time)")
+                                        .apply(!firstPolicy, "date(recharge_time) != date(pay_time)")
+                                        .ne(GameTencentMiniGameOrder::getOrderId, orderLog.getOrderId())
+                                );
+                            } else if (backUnit == BackUnitEnum.UNIT_TIME_DAY) {
+                                return count(new LambdaQueryWrapper<GameTencentMiniGameOrder>()
+                                        .eq(GameTencentMiniGameOrder::getGameId, orderLog.getGameId())
+                                        .eq(GameTencentMiniGameOrder::getWechatAppId, orderLog.getWechatAppId())
+                                        .eq(GameTencentMiniGameOrder::getAdAccountId, orderLog.getAdAccountId())
+                                        .eq(GameTencentMiniGameOrder::getBackPolicyId, gameBackPolicy.getId())
+                                        .eq(GameTencentMiniGameOrder::getOrderStatus, OrderStatusEnum.SUCCESS_PAY.getValue())
+                                        .eq(GameTencentMiniGameOrder::getBackStatus, BackStatusEnum.SUCCESS.getBackStatus())
+                                        .eq(GameTencentMiniGameOrder::getWechatOpenid, userId)
+                                        .apply(firstPolicy, "TIMESTAMPDIFF(HOUR, recharge_time, pay_time) < 24")
+                                        .apply(!firstPolicy, "TIMESTAMPDIFF(HOUR, recharge_time, pay_time) >= 24")
+                                        .ne(GameTencentMiniGameOrder::getOrderId, orderLog.getOrderId())
+                                );
+                            } else if (backUnit == BackUnitEnum.UNIT_TIME_2DAY) {
+                                return count(new LambdaQueryWrapper<GameTencentMiniGameOrder>()
+                                        .eq(GameTencentMiniGameOrder::getGameId, orderLog.getGameId())
+                                        .eq(GameTencentMiniGameOrder::getWechatAppId, orderLog.getWechatAppId())
+                                        .eq(GameTencentMiniGameOrder::getAdAccountId, orderLog.getAdAccountId())
+                                        .eq(GameTencentMiniGameOrder::getBackPolicyId, gameBackPolicy.getId())
+                                        .eq(GameTencentMiniGameOrder::getOrderStatus, OrderStatusEnum.SUCCESS_PAY.getValue())
+                                        .eq(GameTencentMiniGameOrder::getBackStatus, BackStatusEnum.SUCCESS.getBackStatus())
+                                        .eq(GameTencentMiniGameOrder::getWechatOpenid, userId)
+                                        .apply(firstPolicy, "TIMESTAMPDIFF(HOUR, recharge_time, pay_time) < 48")
+                                        .apply(!firstPolicy, "TIMESTAMPDIFF(HOUR, recharge_time, pay_time) >= 48")
+                                        .ne(GameTencentMiniGameOrder::getOrderId, orderLog.getOrderId())
+                                );
+                            } else {
+                                throw new RuntimeException("不支持的回传单位[" + backUnit.getValue() + "]");
+                            }
+                        }
+
+                        @Override
+                        public long markUpOfFixedRate(int numberOfRound, Long markUpTime) {
+                            numberOfRound = numberOfRound - 1;
+                            return list(new LambdaQueryWrapper<GameTencentMiniGameOrder>()
+                                    .eq(GameTencentMiniGameOrder::getGameId, orderLog.getGameId())
+                                    .eq(GameTencentMiniGameOrder::getWechatAppId, orderLog.getWechatAppId())
+                                    .eq(GameTencentMiniGameOrder::getAdAccountId, orderLog.getAdAccountId())
+                                    .eq(GameTencentMiniGameOrder::getBackPolicyId, gameBackPolicy.getId())
+                                    .eq(GameTencentMiniGameOrder::getOrderStatus, OrderStatusEnum.SUCCESS_PAY.getValue())
+                                    .apply("TIMESTAMPDIFF(MINUTE, recharge_time, pay_time) > {0}", markUpTime)
+                                    .ne(GameTencentMiniGameOrder::getOrderId, orderLog.getOrderId())
+                                    .orderByDesc(GameTencentMiniGameOrder::getCreateTime)
+                                    .last("limit " + numberOfRound)
+                            ).stream().filter(log -> log.getBackStatus().equals(BackStatusEnum.SUCCESS.getBackStatus())).count();
+                        }
+
+                        @Override
+                        public long markUpForUser(String userId, Long markUpTime) {
+                            return count(new LambdaQueryWrapper<GameTencentMiniGameOrder>()
+                                    .eq(GameTencentMiniGameOrder::getGameId, orderLog.getGameId())
+                                    .eq(GameTencentMiniGameOrder::getWechatAppId, orderLog.getWechatAppId())
+                                    .eq(GameTencentMiniGameOrder::getAdAccountId, orderLog.getAdAccountId())
+                                    .eq(GameTencentMiniGameOrder::getBackPolicyId, gameBackPolicy.getId())
+                                    .eq(GameTencentMiniGameOrder::getOrderStatus, OrderStatusEnum.SUCCESS_PAY.getValue())
+                                    .eq(GameTencentMiniGameOrder::getBackStatus, BackStatusEnum.SUCCESS.getBackStatus())
+                                    .eq(GameTencentMiniGameOrder::getWechatOpenid, userId)
+                                    .apply("TIMESTAMPDIFF(MINUTE, recharge_time, pay_time) > {0}", markUpTime)
+                                    .ne(GameTencentMiniGameOrder::getOrderId, orderLog.getOrderId())
+                            );
+                        }
+                    });
+            doBack = backInfo.first;
+            backMoney = backInfo.second;
+            backMsg = backInfo.third;
         }
+        BackStatusEnum backStatus = BackStatusEnum.NO;
         if (doBack) {
-            BackStatusEnum backStatus = gameTencentMiniGameBackLogService.orderBack(orderLog);
-            update(new LambdaUpdateWrapper<GameTencentMiniGameOrder>()
-                    .set(GameTencentMiniGameOrder::getBackStatus, backStatus.getBackStatus())
-                    .eq(GameTencentMiniGameOrder::getId, orderLog.getId())
-            );
-            return true;
+            backStatus = gameTencentMiniGameBackLogService.orderBack(orderLog);
         }
-        return false;
+        return update(new LambdaUpdateWrapper<GameTencentMiniGameOrder>()
+                .set(GameTencentMiniGameOrder::getBackStatus, backStatus.getBackStatus())
+                .set(GameTencentMiniGameOrder::getBackMoney, backMoney)
+                .set(GameTencentMiniGameOrder::getBackMsg, backMsg)
+                .eq(GameTencentMiniGameOrder::getId, orderLog.getId())
+        );
     }
 
-
     @Override
     public IPage<GameTencentMiniGameOrderVO> listOfPage(GameTencentMiniGameOrderDTO dto) {
         IPage<GameTencentMiniGameOrder> page = page(dto.toPage(), new LambdaQueryWrapper<GameTencentMiniGameOrder>()
@@ -138,14 +278,10 @@ public class GameTencentMiniGameOrderServiceImpl extends ServiceImpl<GameTencent
     }
 
     @Override
-    public boolean doReport(List<Long> orderLogIds) {
-        listByIds(orderLogIds).forEach(orderLog -> {
-            BackStatusEnum backStatus = gameTencentMiniGameBackLogService.orderBack(orderLog);
-            update(new LambdaUpdateWrapper<GameTencentMiniGameOrder>()
-                    .set(GameTencentMiniGameOrder::getBackStatus, backStatus.getBackStatus())
-                    .eq(GameTencentMiniGameOrder::getId, orderLog.getId())
-            );
-        });
+    public boolean doReport(List<Long> orderLogIds, Long backMoney) {
+        listByIds(orderLogIds).stream()
+                .filter(order -> !Objects.equals(order.getBackStatus(), BackStatusEnum.SUCCESS.getBackStatus()))
+                .forEach(orderLog -> orderBack(orderLog, true, backMoney));
         return true;
     }
 

+ 172 - 35
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/service/impl/GameTencentOrderServiceImpl.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.github.sd4324530.jtuple.Tuple3;
 import com.zanxiang.advertising.tencent.base.AdvertisingTencentServer;
 import com.zanxiang.advertising.tencent.base.pojo.dto.DataReportOfAppIdRpcDTO;
 import com.zanxiang.advertising.tencent.base.pojo.dto.UserActionRpcDTO;
@@ -14,12 +15,11 @@ import com.zanxiang.game.back.base.pojo.enums.OrderStatusEnum;
 import com.zanxiang.game.back.serve.pojo.dto.GameTencentOrderDTO;
 import com.zanxiang.game.back.serve.pojo.entity.GameBackPolicy;
 import com.zanxiang.game.back.serve.pojo.entity.GameTencentBackLog;
-import com.zanxiang.game.back.serve.pojo.entity.GameTencentMiniGameOrder;
 import com.zanxiang.game.back.serve.pojo.entity.GameTencentOrder;
 import com.zanxiang.game.back.serve.dao.mapper.GameTencentOrderMapper;
 import com.zanxiang.game.back.serve.pojo.enums.ActionTypeEnum;
 import com.zanxiang.game.back.serve.pojo.enums.BackStatusEnum;
-import com.zanxiang.game.back.serve.pojo.vo.GameTencentMiniGameOrderVO;
+import com.zanxiang.game.back.serve.pojo.enums.BackUnitEnum;
 import com.zanxiang.game.back.serve.pojo.vo.GameTencentOrderVO;
 import com.zanxiang.game.back.serve.service.IGameBackPolicyService;
 import com.zanxiang.game.back.serve.service.IGameTencentBackLogService;
@@ -75,49 +75,190 @@ public class GameTencentOrderServiceImpl extends ServiceImpl<GameTencentOrderMap
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public boolean orderBack(GameTencentOrder orderLog, boolean mustBack) {
+    public boolean orderBack(GameTencentOrder orderLog, boolean mustBack, Long backMoneyOfInput) {
         boolean doBack = false;
+        Long backMoney;
+        String backMsg;
         if (mustBack) {
             doBack = true;
+            backMoney = backMoneyOfInput;
+            backMsg = "手动触发的回传";
         } else {
             if (!Objects.equals(orderLog.getOrderStatus(), OrderStatusEnum.SUCCESS_PAY.getValue())) {
                 // 只要回传 支付行为
                 return false;
             }
-            if (orderLog.getBackPolicyId() == null) {
-                // 没有回传策略,则直接全量回传
-                doBack = true;
-            } else {
-                GameBackPolicy gameBackPolicy = gameBackPolicyService.getById(orderLog.getBackPolicyId());
-                doBack = BackPolicyUtil.backOrder(orderLog.getOrderId(), gameBackPolicy, orderLog.getRechargeMoney(),
-                        orderLog.getIsFirstOrder(), orderLog.getPayTime(), orderLog.getRegisterTime(),
-                        (backUnit, isFirstOrder, firstDay, markUpTime) -> Long.valueOf(list(new LambdaQueryWrapper<GameTencentOrder>()
+            GameBackPolicy gameBackPolicy = gameBackPolicyService.getById(orderLog.getBackPolicyId());
+            Tuple3<Boolean, Long, String> backInfo = BackPolicyUtil.backOrder(orderLog.getOrderId(), gameBackPolicy, orderLog.getRechargeMoney(),
+                    orderLog.getIsFirstOrder(), orderLog.getPayTime(), orderLog.getRegisterTime(),
+                    orderLog.getWechatOpenid(),
+                    new BackPolicyUtil.IBackPolicyCheck() {
+                        @Override
+                        public long backCountForFixedRate(int numberOfRound, BackUnitEnum backUnit, Boolean firstPolicy) {
+                            numberOfRound = numberOfRound - 1;
+                            if (backUnit == BackUnitEnum.UNIT_ONCE) {
+                                return list(new LambdaQueryWrapper<GameTencentOrder>()
                                         .eq(GameTencentOrder::getGameId, orderLog.getGameId())
                                         .eq(GameTencentOrder::getWechatAppId, orderLog.getWechatAppId())
                                         .eq(GameTencentOrder::getAdAccountId, orderLog.getAdAccountId())
                                         .eq(GameTencentOrder::getBackPolicyId, gameBackPolicy.getId())
                                         .eq(GameTencentOrder::getOrderStatus, OrderStatusEnum.SUCCESS_PAY.getValue())
-                                        .eq(isFirstOrder != null, GameTencentOrder::getIsFirstOrder, isFirstOrder)
-                                        .apply(firstDay != null && firstDay, "date(register_time) = date(pay_time)")
-                                        .apply(firstDay != null && !firstDay, "date(register_time) != date(pay_time)")
-                                        .apply(markUpTime != null, "TIMESTAMPDIFF(MINUTE, register_time, pay_time) > {0}", markUpTime)
+                                        .eq(GameTencentOrder::getIsFirstOrder, firstPolicy)
                                         .ne(GameTencentOrder::getOrderId, orderLog.getOrderId())
                                         .orderByDesc(GameTencentOrder::getCreateTime)
-                                        .last("limit " + backUnit)
-                                ).stream().filter(log -> log.getIsBack().equals(BackStatusEnum.SUCCESS.getBackStatus())).count()
-                        ).intValue());
-                orderLog.setRechargeMoney(BackPolicyUtil.lowRechargeLevel(orderLog.getRechargeMoney(), gameBackPolicy.getLevelDown()));
-            }
+                                        .last("limit " + numberOfRound)
+                                ).stream().filter(log -> log.getIsBack().equals(BackStatusEnum.SUCCESS.getBackStatus())).count();
+                            } else if (backUnit == BackUnitEnum.UNIT_DAY) {
+                                return list(new LambdaQueryWrapper<GameTencentOrder>()
+                                        .eq(GameTencentOrder::getGameId, orderLog.getGameId())
+                                        .eq(GameTencentOrder::getWechatAppId, orderLog.getWechatAppId())
+                                        .eq(GameTencentOrder::getAdAccountId, orderLog.getAdAccountId())
+                                        .eq(GameTencentOrder::getBackPolicyId, gameBackPolicy.getId())
+                                        .eq(GameTencentOrder::getOrderStatus, OrderStatusEnum.SUCCESS_PAY.getValue())
+                                        .apply(firstPolicy, "date(recharge_time) = date(pay_time)")
+                                        .apply(!firstPolicy, "date(recharge_time) != date(pay_time)")
+                                        .ne(GameTencentOrder::getOrderId, orderLog.getOrderId())
+                                        .orderByDesc(GameTencentOrder::getCreateTime)
+                                        .last("limit " + numberOfRound)
+                                ).stream().filter(log -> log.getIsBack().equals(BackStatusEnum.SUCCESS.getBackStatus())).count();
+                            } else if (backUnit == BackUnitEnum.UNIT_TIME_DAY) {
+                                return list(new LambdaQueryWrapper<GameTencentOrder>()
+                                        .eq(GameTencentOrder::getGameId, orderLog.getGameId())
+                                        .eq(GameTencentOrder::getWechatAppId, orderLog.getWechatAppId())
+                                        .eq(GameTencentOrder::getAdAccountId, orderLog.getAdAccountId())
+                                        .eq(GameTencentOrder::getBackPolicyId, gameBackPolicy.getId())
+                                        .eq(GameTencentOrder::getOrderStatus, OrderStatusEnum.SUCCESS_PAY.getValue())
+                                        .apply(firstPolicy, "TIMESTAMPDIFF(HOUR, recharge_time, pay_time) < 24")
+                                        .apply(!firstPolicy, "TIMESTAMPDIFF(HOUR, recharge_time, pay_time) >= 24")
+                                        .ne(GameTencentOrder::getOrderId, orderLog.getOrderId())
+                                        .orderByDesc(GameTencentOrder::getCreateTime)
+                                        .last("limit " + numberOfRound)
+                                ).stream().filter(log -> log.getIsBack().equals(BackStatusEnum.SUCCESS.getBackStatus())).count();
+                            } else if (backUnit == BackUnitEnum.UNIT_TIME_2DAY) {
+                                return list(new LambdaQueryWrapper<GameTencentOrder>()
+                                        .eq(GameTencentOrder::getGameId, orderLog.getGameId())
+                                        .eq(GameTencentOrder::getWechatAppId, orderLog.getWechatAppId())
+                                        .eq(GameTencentOrder::getAdAccountId, orderLog.getAdAccountId())
+                                        .eq(GameTencentOrder::getBackPolicyId, gameBackPolicy.getId())
+                                        .eq(GameTencentOrder::getOrderStatus, OrderStatusEnum.SUCCESS_PAY.getValue())
+                                        .apply(firstPolicy, "TIMESTAMPDIFF(HOUR, recharge_time, pay_time) < 48")
+                                        .apply(!firstPolicy, "TIMESTAMPDIFF(HOUR, recharge_time, pay_time) >= 48")
+                                        .ne(GameTencentOrder::getOrderId, orderLog.getOrderId())
+                                        .orderByDesc(GameTencentOrder::getCreateTime)
+                                        .last("limit " + numberOfRound)
+                                ).stream().filter(log -> log.getIsBack().equals(BackStatusEnum.SUCCESS.getBackStatus())).count();
+                            } else {
+                                throw new RuntimeException("不支持的回传单位[" + backUnit.getValue() + "]");
+                            }
+                        }
+
+                        @Override
+                        public long backCountForUser(BackUnitEnum backUnit, String userId, Boolean firstPolicy) {
+                            if (backUnit == BackUnitEnum.UNIT_ONCE) {
+                                if (firstPolicy) {
+                                    // 首单直接返回 0,必定回传
+                                    return 0;
+                                }
+                                return count(new LambdaQueryWrapper<GameTencentOrder>()
+                                        .eq(GameTencentOrder::getGameId, orderLog.getGameId())
+                                        .eq(GameTencentOrder::getWechatAppId, orderLog.getWechatAppId())
+                                        .eq(GameTencentOrder::getAdAccountId, orderLog.getAdAccountId())
+                                        .eq(GameTencentOrder::getBackPolicyId, gameBackPolicy.getId())
+                                        .eq(GameTencentOrder::getOrderStatus, OrderStatusEnum.SUCCESS_PAY.getValue())
+                                        .eq(GameTencentOrder::getIsBack, BackStatusEnum.SUCCESS.getBackStatus())
+                                        .eq(GameTencentOrder::getWechatOpenid, userId)
+                                        .eq(GameTencentOrder::getIsFirstOrder, firstPolicy)
+                                        .ne(GameTencentOrder::getOrderId, orderLog.getOrderId())
+                                );
+                            } else if (backUnit == BackUnitEnum.UNIT_DAY) {
+                                return count(new LambdaQueryWrapper<GameTencentOrder>()
+                                        .eq(GameTencentOrder::getGameId, orderLog.getGameId())
+                                        .eq(GameTencentOrder::getWechatAppId, orderLog.getWechatAppId())
+                                        .eq(GameTencentOrder::getAdAccountId, orderLog.getAdAccountId())
+                                        .eq(GameTencentOrder::getBackPolicyId, gameBackPolicy.getId())
+                                        .eq(GameTencentOrder::getOrderStatus, OrderStatusEnum.SUCCESS_PAY.getValue())
+                                        .eq(GameTencentOrder::getIsBack, BackStatusEnum.SUCCESS.getBackStatus())
+                                        .eq(GameTencentOrder::getWechatOpenid, userId)
+                                        .apply(firstPolicy, "date(recharge_time) = date(pay_time)")
+                                        .apply(!firstPolicy, "date(recharge_time) != date(pay_time)")
+                                        .ne(GameTencentOrder::getOrderId, orderLog.getOrderId())
+                                );
+                            } else if (backUnit == BackUnitEnum.UNIT_TIME_DAY) {
+                                return count(new LambdaQueryWrapper<GameTencentOrder>()
+                                        .eq(GameTencentOrder::getGameId, orderLog.getGameId())
+                                        .eq(GameTencentOrder::getWechatAppId, orderLog.getWechatAppId())
+                                        .eq(GameTencentOrder::getAdAccountId, orderLog.getAdAccountId())
+                                        .eq(GameTencentOrder::getBackPolicyId, gameBackPolicy.getId())
+                                        .eq(GameTencentOrder::getOrderStatus, OrderStatusEnum.SUCCESS_PAY.getValue())
+                                        .eq(GameTencentOrder::getIsBack, BackStatusEnum.SUCCESS.getBackStatus())
+                                        .eq(GameTencentOrder::getWechatOpenid, userId)
+                                        .apply(firstPolicy, "TIMESTAMPDIFF(HOUR, recharge_time, pay_time) < 24")
+                                        .apply(!firstPolicy, "TIMESTAMPDIFF(HOUR, recharge_time, pay_time) >= 24")
+                                        .ne(GameTencentOrder::getOrderId, orderLog.getOrderId())
+                                );
+                            } else if (backUnit == BackUnitEnum.UNIT_TIME_2DAY) {
+                                return count(new LambdaQueryWrapper<GameTencentOrder>()
+                                        .eq(GameTencentOrder::getGameId, orderLog.getGameId())
+                                        .eq(GameTencentOrder::getWechatAppId, orderLog.getWechatAppId())
+                                        .eq(GameTencentOrder::getAdAccountId, orderLog.getAdAccountId())
+                                        .eq(GameTencentOrder::getBackPolicyId, gameBackPolicy.getId())
+                                        .eq(GameTencentOrder::getOrderStatus, OrderStatusEnum.SUCCESS_PAY.getValue())
+                                        .eq(GameTencentOrder::getIsBack, BackStatusEnum.SUCCESS.getBackStatus())
+                                        .eq(GameTencentOrder::getWechatOpenid, userId)
+                                        .apply(firstPolicy, "TIMESTAMPDIFF(HOUR, recharge_time, pay_time) < 48")
+                                        .apply(!firstPolicy, "TIMESTAMPDIFF(HOUR, recharge_time, pay_time) >= 48")
+                                        .ne(GameTencentOrder::getOrderId, orderLog.getOrderId())
+                                );
+                            } else {
+                                throw new RuntimeException("不支持的回传单位[" + backUnit.getValue() + "]");
+                            }
+                        }
+
+                        @Override
+                        public long markUpOfFixedRate(int numberOfRound, Long markUpTime) {
+                            numberOfRound = numberOfRound - 1;
+                            return list(new LambdaQueryWrapper<GameTencentOrder>()
+                                    .eq(GameTencentOrder::getGameId, orderLog.getGameId())
+                                    .eq(GameTencentOrder::getWechatAppId, orderLog.getWechatAppId())
+                                    .eq(GameTencentOrder::getAdAccountId, orderLog.getAdAccountId())
+                                    .eq(GameTencentOrder::getBackPolicyId, gameBackPolicy.getId())
+                                    .eq(GameTencentOrder::getOrderStatus, OrderStatusEnum.SUCCESS_PAY.getValue())
+                                    .apply("TIMESTAMPDIFF(MINUTE, recharge_time, pay_time) > {0}", markUpTime)
+                                    .ne(GameTencentOrder::getOrderId, orderLog.getOrderId())
+                                    .orderByDesc(GameTencentOrder::getCreateTime)
+                                    .last("limit " + numberOfRound)
+                            ).stream().filter(log -> log.getIsBack().equals(BackStatusEnum.SUCCESS.getBackStatus())).count();
+                        }
+
+                        @Override
+                        public long markUpForUser(String userId, Long markUpTime) {
+                            return count(new LambdaQueryWrapper<GameTencentOrder>()
+                                    .eq(GameTencentOrder::getGameId, orderLog.getGameId())
+                                    .eq(GameTencentOrder::getWechatAppId, orderLog.getWechatAppId())
+                                    .eq(GameTencentOrder::getAdAccountId, orderLog.getAdAccountId())
+                                    .eq(GameTencentOrder::getBackPolicyId, gameBackPolicy.getId())
+                                    .eq(GameTencentOrder::getOrderStatus, OrderStatusEnum.SUCCESS_PAY.getValue())
+                                    .eq(GameTencentOrder::getIsBack, BackStatusEnum.SUCCESS.getBackStatus())
+                                    .eq(GameTencentOrder::getWechatOpenid, userId)
+                                    .apply("TIMESTAMPDIFF(MINUTE, recharge_time, pay_time) > {0}", markUpTime)
+                                    .ne(GameTencentOrder::getOrderId, orderLog.getOrderId())
+                            );
+                        }
+                    });
+            doBack = backInfo.first;
+            backMoney = backInfo.second;
+            backMsg = backInfo.third;
         }
+        BackStatusEnum backStatus = BackStatusEnum.NO;
         if (doBack) {
-            BackStatusEnum backStatus = doCallback(orderLog);
-            update(new LambdaUpdateWrapper<GameTencentOrder>()
-                    .set(GameTencentOrder::getIsBack, backStatus.getBackStatus())
-                    .eq(GameTencentOrder::getId, orderLog.getId())
-            );
-            return true;
+            backStatus = doCallback(orderLog);
         }
-        return false;
+        return update(new LambdaUpdateWrapper<GameTencentOrder>()
+                .set(GameTencentOrder::getIsBack, backStatus.getBackStatus())
+                .set(GameTencentOrder::getBackMoney, backMoney)
+                .set(GameTencentOrder::getBackMsg, backMsg)
+                .eq(GameTencentOrder::getId, orderLog.getId())
+        );
     }
 
 
@@ -175,14 +316,10 @@ public class GameTencentOrderServiceImpl extends ServiceImpl<GameTencentOrderMap
     }
 
     @Override
-    public boolean tencentOrderReport(List<Long> ids) {
-        listByIds(ids).forEach(orderLog -> {
-            BackStatusEnum backStatus = doCallback(orderLog);
-            update(new LambdaUpdateWrapper<GameTencentOrder>()
-                    .set(GameTencentOrder::getIsBack, backStatus.getBackStatus())
-                    .eq(GameTencentOrder::getId, orderLog.getId())
-            );
-        });
+    public boolean tencentOrderReport(List<Long> ids, Long backMoney) {
+        listByIds(ids).stream()
+                .filter(order -> !Objects.equals(order.getIsBack(), BackStatusEnum.SUCCESS.getBackStatus()))
+                .forEach(orderLog -> orderBack(orderLog, true, backMoney));
         return true;
     }
 

+ 193 - 90
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/utils/BackPolicyUtil.java

@@ -1,18 +1,23 @@
 package com.zanxiang.game.back.serve.utils;
 
 import com.github.sd4324530.jtuple.Tuple2;
+import com.github.sd4324530.jtuple.Tuple3;
 import com.github.sd4324530.jtuple.Tuples;
 import com.zanxiang.game.back.serve.pojo.entity.GameBackPolicy;
 import com.zanxiang.game.back.serve.pojo.enums.BackUnitEnum;
+import com.zanxiang.game.back.serve.pojo.vo.GameBackPolicyVO;
 import com.zanxiang.module.util.DateUtil;
 import com.zanxiang.module.util.JsonUtil;
 import com.zanxiang.module.util.NumberUtil;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.lang3.RandomUtils;
+import org.apache.commons.lang3.StringUtils;
 
 import java.math.BigDecimal;
 import java.time.LocalDateTime;
 import java.util.Arrays;
+import java.util.List;
 import java.util.Objects;
 import java.util.function.Function;
 
@@ -27,24 +32,26 @@ public class BackPolicyUtil {
     /**
      * 订单回传
      *
-     * @param gameBackPolicy   回传策略
-     * @param rechargeMoney    充值金额
-     * @param lastBackFunction 在指定最近订单数量内是否有订单回传过
-     * @return <是否回传, 回传金额>
+     * @return <是否回传,回传金额,回传描述>
      */
-    public static boolean backOrder(String orderId, GameBackPolicy gameBackPolicy, long rechargeMoney, boolean isFirstOrder, LocalDateTime payTime, LocalDateTime regTime, LastBackFunction lastBackFunction) {
+    public static Tuple3<Boolean, Long, String> backOrder(String orderId, GameBackPolicy gameBackPolicy,
+                                                          long rechargeMoney, boolean isFirstOrder,
+                                                          LocalDateTime payTime, LocalDateTime regTime,
+                                                          String userId, IBackPolicyCheck backPolicyCheck) {
         if (null == gameBackPolicy) {
-            log.error("订单 id[{}]通过回传策略[null]判断后,是否回传:{}.", orderId, true);
-            return true;
+            log.error("订单 id[{}]找不到回传策略,默认回传", orderId);
+            return Tuples.tuple(Boolean.TRUE, rechargeMoney, "没有回传策略");
         }
         BackUnitEnum backUnit = gameBackPolicy.getBackUnit() == null ? BackUnitEnum.UNIT_ONCE : BackUnitEnum.getByValue(gameBackPolicy.getBackUnit());
 
-        Boolean firstPolicy = null, firstDay = null;
+        Boolean firstPolicy = null;
         Long markUpTime = null;
         Integer backType;
         String backRate;
         if (gameBackPolicy.getRegPayIntervalTime() != null
                 && ((DateUtil.localDateTimeToSecond(payTime) - DateUtil.localDateTimeToSecond(regTime)) / 60) > gameBackPolicy.getRegPayIntervalTime()) {
+            // 补单
+            log.error("订单 id[{}]通过回传策略[{}]判断后,超过注册充值间隔时间,走补单逻辑 {}.", orderId, gameBackPolicy.getId(), gameBackPolicy.getRegPayIntervalTime());
             if (gameBackPolicy.getMarkUpOrder() != null && gameBackPolicy.getMarkUpOrder()) {
                 markUpTime = gameBackPolicy.getRegPayIntervalTime();
                 if (rechargeMoney <= gameBackPolicy.getMarkUpOrderMinMoney()) {
@@ -59,93 +66,153 @@ public class BackPolicyUtil {
                     backType = gameBackPolicy.getMarkUpOrderOtherMoneyType();
                     backRate = gameBackPolicy.getMarkUpOrderOtherMoneyRate();
                 }
-                log.error("订单 id[{}]通过回传策略[{}]判断后,超过注册充值间隔时间,走补单逻辑 {}.", orderId, gameBackPolicy.getId(), gameBackPolicy.getRegPayIntervalTime());
-            } else {
-                log.error("订单 id[{}]通过回传策略[{}]判断后,超过注册充值间隔时间,不回穿 {}.", orderId, gameBackPolicy.getId(), gameBackPolicy.getRegPayIntervalTime());
-                return false;
-            }
-        } else {
-            if (backUnit == BackUnitEnum.UNIT_ONCE) {
-                if (isFirstOrder) {
-                    firstPolicy = true;
-                    if (rechargeMoney <= gameBackPolicy.getFirstMinMoney()) {
-                        // 小额
-                        backType = gameBackPolicy.getFirstMinMoneyType();
-                        backRate = gameBackPolicy.getFirstMinMoneyRate();
-                    } else if (rechargeMoney >= gameBackPolicy.getFirstMaxMoney()) {
-                        // 大额
-                        backType = gameBackPolicy.getFirstMaxMoneyType();
-                        backRate = gameBackPolicy.getFirstMaxMoneyRate();
-                    } else {
-                        backType = gameBackPolicy.getFirstOtherMoneyType();
-                        backRate = gameBackPolicy.getFirstOtherMoneyRate();
+                String backMsg = "";
+                if (Objects.equals(backType, GameBackPolicy.POLICY_TYPE_FIXED_RATE)) {
+                    // 固定比例回传
+                    String[] temp = backRate.split(":");
+                    int backCount = Integer.parseInt(temp[0]);
+                    int ignoreCount = Integer.parseInt(temp[1]);
+                    if (backCount == 0) {
+                        log.error("订单 id[{}]通过回传策略[{}]判断后,不回传,原因:回传比例 {}", orderId, gameBackPolicy.getId(), backRate);
+                        return Tuples.tuple(Boolean.FALSE, downLevel(rechargeMoney, gameBackPolicy.getMarkUpDownLevel()), "补单-按比例回传,回传比例为 0,全部不回传");
                     }
-                    log.error("订单 id[{}]通过回传策略[{}]判断后,正常回传. 首单:{}, backType: {}, backRate: {}", orderId, gameBackPolicy.getId(), true, backType, backRate);
-                } else {
-                    firstPolicy = false;
-                    if (rechargeMoney <= gameBackPolicy.getRechargeMinMoney()) {
-                        // 小额
-                        backType = gameBackPolicy.getRechargeMinMoneyType();
-                        backRate = gameBackPolicy.getRechargeMinMoneyRate();
-                    } else if (rechargeMoney >= gameBackPolicy.getRechargeMaxMoney()) {
-                        // 大额
-                        backType = gameBackPolicy.getRechargeMaxMoneyType();
-                        backRate = gameBackPolicy.getRechargeMaxMoneyRate();
-                    } else {
-                        backType = gameBackPolicy.getRechargeOtherMoneyType();
-                        backRate = gameBackPolicy.getRechargeOtherMoneyRate();
+                    if (ignoreCount == 0) {
+                        log.error("订单 id[{}]通过回传策略[{}]判断后,回传,原因:回传比例 {}", orderId, gameBackPolicy.getId(), backRate);
+                        return Tuples.tuple(Boolean.TRUE, downLevel(rechargeMoney, gameBackPolicy.getMarkUpDownLevel()), "补单-按比例回传,忽略比例为 0,全部回传");
                     }
-                    log.error("订单 id[{}]通过回传策略[{}]判断后,正常回传. 首单:{}, backType: {}, backRate: {}", orderId, gameBackPolicy.getId(), false, backType, backRate);
-                }
-            } else if (backUnit == BackUnitEnum.UNIT_DAY) {
-                long intervalDays = DateUtil.intervalOfDays(regTime.toLocalDate(), payTime.toLocalDate());
-                if (intervalDays == 0) {
-                    firstDay = true;
-                    if (rechargeMoney <= gameBackPolicy.getFirstMinMoney()) {
-                        // 小额
-                        backType = gameBackPolicy.getFirstMinMoneyType();
-                        backRate = gameBackPolicy.getFirstMinMoneyRate();
-                    } else if (rechargeMoney >= gameBackPolicy.getFirstMaxMoney()) {
-                        // 大额
-                        backType = gameBackPolicy.getFirstMaxMoneyType();
-                        backRate = gameBackPolicy.getFirstMaxMoneyRate();
-                    } else {
-                        backType = gameBackPolicy.getFirstOtherMoneyType();
-                        backRate = gameBackPolicy.getFirstOtherMoneyRate();
+                    long isBackCount = backPolicyCheck.markUpOfFixedRate(backCount + ignoreCount, markUpTime);
+                    backMsg = "补单-按比例回传,每 " + (backCount + ignoreCount) + "笔回传 " + backCount + "笔,当前第 " + (isBackCount + 1) + "笔";
+                    if (isBackCount >= backCount) {
+                        log.error("订单 id[{}]通过回传策略[{}]判断后,不回传,原因:{}", orderId, gameBackPolicy.getId(), backMsg);
+                        return Tuples.tuple(Boolean.FALSE, downLevel(rechargeMoney, gameBackPolicy.getMarkUpDownLevel()), backMsg);
                     }
-                    log.error("订单 id[{}]通过回传策略[{}]判断后,正常回传. 首日:{}, backType: {}, backRate: {}", orderId, gameBackPolicy.getId(), true, backType, backRate);
-                } else {
-                    firstDay = false;
-                    if (rechargeMoney <= gameBackPolicy.getRechargeMinMoney()) {
-                        // 小额
-                        backType = gameBackPolicy.getRechargeMinMoneyType();
-                        backRate = gameBackPolicy.getRechargeMinMoneyRate();
-                    } else if (rechargeMoney >= gameBackPolicy.getRechargeMaxMoney()) {
-                        // 大额
-                        backType = gameBackPolicy.getRechargeMaxMoneyType();
-                        backRate = gameBackPolicy.getRechargeMaxMoneyRate();
-                    } else {
-                        backType = gameBackPolicy.getRechargeOtherMoneyType();
-                        backRate = gameBackPolicy.getRechargeOtherMoneyRate();
+                } else if (Objects.equals(backType, GameBackPolicy.POLICY_TYPE_RANDOM_RATE)) {
+                    // 随机概率回传
+                    boolean isBack = RandomUtils.nextInt(0, 100) < NumberUtil.multiply100(new BigDecimal(backRate)).intValue();
+                    backMsg = "补单-随机概率回传(" + backRate + ")";
+                    if (!isBack) {
+                        log.error("订单 id[{}]通过回传策略[{}]判断后,不回传,原因:{}", orderId, gameBackPolicy.getId(), backMsg);
+                        return Tuples.tuple(Boolean.FALSE, downLevel(rechargeMoney, gameBackPolicy.getMarkUpDownLevel()), backMsg);
                     }
-                    log.error("订单 id[{}]通过回传策略[{}]判断后,正常回传. 首日:{}, backType: {}, backRate: {}", orderId, gameBackPolicy.getId(), false, backType, backRate);
+                } else {
+                    throw new RuntimeException("回传策略[" + gameBackPolicy.getId() + "]配置错误,未知的回传类型:" + backType);
+                }
+                if (gameBackPolicy.getMarkUpBackCountOfUser() == null) {
+                    backMsg = backMsg + ",未配置单用户最大回传笔数";
+                    log.error("订单 id[{}]通过回传策略[{}]判断后,回传,原因:回传概率 {}", orderId, gameBackPolicy.getId(), backMsg);
+                    return Tuples.tuple(Boolean.TRUE, downLevel(rechargeMoney, gameBackPolicy.getMarkUpDownLevel()), backMsg);
                 }
+                long userBackCount = backPolicyCheck.markUpForUser(userId, markUpTime);
+                backMsg = backMsg + ",单用户最大回传 " + gameBackPolicy.getMarkUpBackCountOfUser() + "笔,当前已回传 " + userBackCount + "笔";
+                log.error("订单 id[{}]通过回传策略[{}]判断后,是否回传:{},原因:{}", orderId, gameBackPolicy.getId(), userBackCount < gameBackPolicy.getMarkUpBackCountOfUser(), backMsg);
+                return Tuples.tuple(userBackCount < gameBackPolicy.getMarkUpBackCountOfUser(), downLevel(rechargeMoney, gameBackPolicy.getMarkUpDownLevel()), backMsg);
+            } else {
+                log.error("订单 id[{}]通过回传策略[{}]判断后,不回传,原因:超过注册充值间隔时间但是未开启补单", orderId, gameBackPolicy.getId());
+                return Tuples.tuple(Boolean.FALSE, downLevel(rechargeMoney, gameBackPolicy.getMarkUpDownLevel()), "回传策略未开启补单");
+            }
+        }
+
+        // 正常判断
+        if (backUnit == BackUnitEnum.UNIT_ONCE) {
+            firstPolicy = isFirstOrder;
+        } else if (backUnit == BackUnitEnum.UNIT_DAY) {
+            long intervalDays = DateUtil.intervalOfDays(regTime.toLocalDate(), payTime.toLocalDate());
+            firstPolicy = intervalDays == 0;
+        } else if (backUnit == BackUnitEnum.UNIT_TIME_DAY) {
+            long intervalHours = DateUtil.intervalOfHour(regTime, payTime);
+            firstPolicy = intervalHours < 24;
+        } else if (backUnit == BackUnitEnum.UNIT_TIME_2DAY) {
+            long intervalHours = DateUtil.intervalOfHour(regTime, payTime);
+            firstPolicy = intervalHours < 48;
+        } else {
+            throw new RuntimeException("未知的回传单位:" + backUnit);
+        }
+        if (firstPolicy) {
+            if (rechargeMoney <= gameBackPolicy.getFirstMinMoney()) {
+                // 小额
+                backType = gameBackPolicy.getFirstMinMoneyType();
+                backRate = gameBackPolicy.getFirstMinMoneyRate();
+            } else if (rechargeMoney >= gameBackPolicy.getFirstMaxMoney()) {
+                // 大额
+                backType = gameBackPolicy.getFirstMaxMoneyType();
+                backRate = gameBackPolicy.getFirstMaxMoneyRate();
+            } else {
+                backType = gameBackPolicy.getFirstOtherMoneyType();
+                backRate = gameBackPolicy.getFirstOtherMoneyRate();
+            }
+            log.error("订单 id[{}]通过回传策略[{}]判断后走首日逻辑:backType: {}, backRate: {}", orderId, gameBackPolicy.getId(), backType, backRate);
+        } else {
+            if (rechargeMoney <= gameBackPolicy.getRechargeMinMoney()) {
+                // 小额
+                backType = gameBackPolicy.getRechargeMinMoneyType();
+                backRate = gameBackPolicy.getRechargeMinMoneyRate();
+            } else if (rechargeMoney >= gameBackPolicy.getRechargeMaxMoney()) {
+                // 大额
+                backType = gameBackPolicy.getRechargeMaxMoneyType();
+                backRate = gameBackPolicy.getRechargeMaxMoneyRate();
             } else {
-                throw new RuntimeException("未知的回传单位:" + backUnit);
+                backType = gameBackPolicy.getRechargeOtherMoneyType();
+                backRate = gameBackPolicy.getRechargeOtherMoneyRate();
             }
+            log.error("订单 id[{}]通过回传策略[{}]判断后走次日逻辑, backType: {}, backRate: {}", orderId, gameBackPolicy.getId(), backType, backRate);
         }
+        Integer maxBackCountOfUser = firstPolicy ? gameBackPolicy.getFirstBackCountOfUser() : gameBackPolicy.getRechargeBackCountOfUser();
+        String backMsg = firstPolicy ? "首-" : "次-";
+        String downLevelString = firstPolicy ? gameBackPolicy.getFirstDownLevel() : gameBackPolicy.getRechargeDownLevel();
         if (Objects.equals(backType, GameBackPolicy.POLICY_TYPE_FIXED_RATE)) {
+            // 固定比例回传
+            String[] temp = backRate.split(":");
+            int backCount = Integer.parseInt(temp[0]);
+            int ignoreCount = Integer.parseInt(temp[1]);
+            if (backCount == 0) {
+                backMsg = backMsg + "按比例回传,回传比例为 0,全部不回传";
+                log.error("订单 id[{}]通过回传策略[{}]判断后,不回传,原因:{}", orderId, gameBackPolicy.getId(), backMsg);
+                return Tuples.tuple(Boolean.FALSE, downLevel(rechargeMoney, downLevelString), backMsg);
+            }
+            if (ignoreCount == 0) {
+                backMsg = backMsg + "按比例回传,忽略比例为 0,全部回传";
+                log.error("订单 id[{}]通过回传策略[{}]判断后,回传,原因:{}", orderId, gameBackPolicy.getId(), backMsg);
+                return Tuples.tuple(Boolean.TRUE, downLevel(rechargeMoney, downLevelString), backMsg);
+            }
+            long isBackCount = backPolicyCheck.backCountForFixedRate(backCount + ignoreCount, backUnit, firstPolicy);
+            backMsg = backMsg + "按比例回传,每 " + (backCount + ignoreCount) + "笔回传 " + backCount + "笔,当前第 " + (isBackCount + 1) + "笔";
+            if (isBackCount >= backCount) {
+                log.error("订单 id[{}]通过回传策略[{}]判断后,不回传,原因:{}", orderId, gameBackPolicy.getId(), backMsg);
+                return Tuples.tuple(Boolean.FALSE, downLevel(rechargeMoney, downLevelString), backMsg);
+            }
+        } else if (Objects.equals(backType, GameBackPolicy.POLICY_TYPE_RANDOM_RATE)) {
+            // 随机概率回传
+            boolean isBack = RandomUtils.nextInt(0, 100) < NumberUtil.multiply100(new BigDecimal(backRate)).intValue();
+            backMsg = backMsg + "补单-随机概率回传(" + backRate + ")";
+            if (!isBack) {
+                log.error("订单 id[{}]通过回传策略[{}]判断后,不回传,原因:{}", orderId, gameBackPolicy.getId(), backMsg);
+                return Tuples.tuple(Boolean.FALSE, downLevel(rechargeMoney, downLevelString), backMsg);
+            }
+        } else {
+            throw new RuntimeException("回传策略[" + gameBackPolicy.getId() + "]配置错误,未知的回传类型:" + backType);
+        }
+
+        if (maxBackCountOfUser == null) {
+            backMsg = backMsg + ",未配置单用户最大回传笔数";
+            log.error("订单 id[{}]通过回传策略[{}]判断后,回传,原因:回传概率 {}", orderId, gameBackPolicy.getId(), backMsg);
+            return Tuples.tuple(Boolean.TRUE, downLevel(rechargeMoney, downLevelString), backMsg);
+        }
+        long userBackCount = backPolicyCheck.backCountForUser(backUnit, userId, firstPolicy);
+        backMsg = backMsg + ",单用户最大回传 " + maxBackCountOfUser + "笔,当前已回传 " + userBackCount + "笔";
+        log.error("订单 id[{}]通过回传策略[{}]判断后,是否回传:{},原因:{}", orderId, gameBackPolicy.getId(), userBackCount < maxBackCountOfUser, backMsg);
+        return Tuples.tuple(userBackCount < maxBackCountOfUser, downLevel(rechargeMoney, downLevelString), backMsg);
+        /*if (Objects.equals(backType, GameBackPolicy.POLICY_TYPE_FIXED_RATE)) {
             // 固定比例回传
             String[] temp = backRate.split(":");
             int backCount = Integer.parseInt(temp[0]);
             int ignoreCount = Integer.parseInt(temp[1]);
             if (backCount == 0) {
                 log.error("订单 id[{}]通过回传策略[{}]判断后,是否回传:{}.", orderId, gameBackPolicy.getId(), false);
-                return false;
+                return Tuples.tuple(Boolean.FALSE, rechargeMoney, "按比例回传,回传比例为 0,全部不回传");
             }
             if (ignoreCount == 0) {
                 log.error("订单 id[{}]通过回传策略[{}]判断后,是否回传:{}.", orderId, gameBackPolicy.getId(), true);
-                return true;
+                return Tuples.tuple(Boolean.TRUE, rechargeMoney, "按比例回传,忽略比例为 0,全部回传");
             }
             int isBackCount = lastBackFunction.getLastBackCount(backCount + ignoreCount - 1, firstPolicy, firstDay, markUpTime);
             log.error("订单 id[{}]通过回传策略[{}]判断后,是否回传:{}.", orderId, gameBackPolicy.getId(), (isBackCount < backCount));
@@ -154,10 +221,27 @@ public class BackPolicyUtil {
             // 随机概率回传
             boolean isBack = RandomUtils.nextInt(0, 100) < NumberUtil.multiply100(new BigDecimal(backRate)).intValue();
             log.error("订单 id[{}]通过回传策略[{}]判断后,是否回传:{}.", orderId, gameBackPolicy.getId(), isBack);
-            return isBack;
+            return Tuples.tuple(isBack, rechargeMoney, "按概率 " + backRate + "判断");
         } else {
             throw new RuntimeException("回传策略[" + gameBackPolicy.getId() + "]配置错误,未知的回传类型:" + backType);
+        }*/
+    }
+
+    private static Long downLevel(Long rechargeMoney, String downLevelStr) {
+        if (StringUtils.isBlank(downLevelStr)) {
+            return rechargeMoney;
         }
+        String[] downLevelList = downLevelStr.split(",");
+        for (String downLevel : downLevelList) {
+            String[] tmp = downLevel.split("_");
+            long minMoney = Long.parseLong(tmp[0]);
+            long maxMoney = Long.parseLong(tmp[1]);
+            Long backMoney = Long.parseLong(tmp[2]);
+            if (rechargeMoney >= minMoney && rechargeMoney <= maxMoney) {
+                return backMoney;
+            }
+        }
+        return rechargeMoney;
     }
 
     private static Tuple2<Integer, Integer> approximate(int molecular, int denominator) {
@@ -180,23 +264,42 @@ public class BackPolicyUtil {
     /**
      * 降档
      */
-    public static long lowRechargeLevel(long rechargeMoney, Integer levelDown) {
-        if (levelDown == null || levelDown == 0) {
+    public static long lowRechargeLevel(long rechargeMoney, String levelDownStr) {
+        if (StringUtils.isBlank(levelDownStr)) {
+            // 无需降档
             return rechargeMoney;
         }
-        int level = RECHARGE_LEVEL.length - 1;
-        for (int i = 0; i < RECHARGE_LEVEL.length; i++) {
-            if (rechargeMoney <= RECHARGE_LEVEL[i]) {
-                level = i;
-                break;
+        String[] levelDownStrList = levelDownStr.split(",");
+        for (String levelDown : levelDownStrList) {
+            String[] tmp = levelDown.split("_");
+            long min = Long.parseLong(tmp[0]), max = Long.parseLong(tmp[1]), back = Long.parseLong(tmp[2]);
+            if (rechargeMoney >= min && rechargeMoney <= max) {
+                return back;
             }
         }
-        level = level - levelDown;
-        level = level < 0 ? 0 : Math.min(level, RECHARGE_LEVEL.length - 1);
-        return RECHARGE_LEVEL[level];
+        // 没有匹配金额规则,直接返回
+        return rechargeMoney;
     }
 
-    public interface LastBackFunction {
-        int getLastBackCount(int backUnit, Boolean isFirstOrder, Boolean firstDay, Long markUpTime);
+    public interface IBackPolicyCheck {
+        /**
+         * 按比例回传时单次循环已经回传的人数
+         */
+        long backCountForFixedRate(int numberOfRound, BackUnitEnum backUnit, Boolean firstPolicy);
+
+        /**
+         * 单个用户已回传订单数
+         */
+        long backCountForUser(BackUnitEnum backUnit, String userId, Boolean firstPolicy);
+
+        /**
+         * 补单,按比例回传时单次循环已经回传的人数
+         */
+        long markUpOfFixedRate(int numberOfRound, Long markUpTime);
+
+        /**
+         * 补单,单个用户已回传订单数
+         */
+        long markUpForUser(String userId, Long markUpTime);
     }
 }

+ 22 - 8
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/component/DataPowerComponent.java

@@ -1,15 +1,19 @@
 package com.zanxiang.game.data.serve.component;
 
-import com.github.sd4324530.jtuple.Tuple2;
 import com.zanxiang.erp.base.ErpServer;
-import com.zanxiang.erp.base.rpc.ISysUserGroupRpc;
+import com.zanxiang.erp.base.rpc.ISysGameUserGroupRpc;
 import com.zanxiang.erp.security.util.SecurityUtil;
 import com.zanxiang.game.module.base.ServerInfo;
 import com.zanxiang.game.module.base.rpc.GameAuthRpc;
+import com.zanxiang.module.util.JsonUtil;
+import com.zanxiang.module.util.exception.BaseException;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
 import org.apache.dubbo.config.annotation.DubboReference;
 import org.springframework.stereotype.Component;
 
+import java.util.ArrayList;
+import java.util.Collection;
 import java.util.List;
 
 @Slf4j
@@ -17,7 +21,7 @@ import java.util.List;
 public class DataPowerComponent {
 
     @DubboReference(providedBy = ErpServer.SERVER_DUBBO_NAME)
-    private ISysUserGroupRpc sysUserGroupRpc;
+    private ISysGameUserGroupRpc sysGameUserGroupRpc;
 
     @DubboReference(providedBy = ServerInfo.SERVER_DUBBO_NAME)
     private GameAuthRpc gameAuthRpc;
@@ -25,16 +29,22 @@ public class DataPowerComponent {
     /**
      * 获取当前登录用户有权限查看的用户列表
      * 1:普通用户-投手:自己
-     * 1:普通用户-运营:自己
+     * 1:普通用户-运营:null-->表示不按权限做
      * 2:投手组长:自己+组员
      * 3:管理员:自己+组员
      * 4:超管:null-->有权限看所有数据
      */
-    public long[] getSubUserIdList() {
+    public List<Long> getSubUserIdList() {
         if (SecurityUtil.isAdmin()) {
             return null;
         }
-        return sysUserGroupRpc.memberUserId(SecurityUtil.getCompanyId(), SecurityUtil.getUserId()).getData().stream().mapToLong(Long::longValue).toArray();
+        Collection<Long> subUserIds = sysGameUserGroupRpc.memberUserIds(SecurityUtil.getCompanyId(), SecurityUtil.getUserId()).getData();
+        if (subUserIds.size() > 1) {
+            // 自然量
+            subUserIds.add(-2L);
+        }
+        log.error("1111--------->" + JsonUtil.toString(subUserIds));
+        return new ArrayList<>(subUserIds);
     }
 
 
@@ -46,10 +56,14 @@ public class DataPowerComponent {
      * 4:管理员:自己+组员投的游戏列表
      * 5:超管:null-->表示不用此字段做游戏过滤
      */
-    public long[] getSubGameIdList() {
+    public List<Long> getSubGameIdList() {
         if (SecurityUtil.isAdmin()) {
             return null;
         }
-        return gameAuthRpc.getGameAuthByUserIds().getData().getGameIdList().stream().mapToLong(Long::longValue).toArray();
+        List<Long> gameIdList = gameAuthRpc.getGameAuthByUserIds().getData().getGameIdList();
+        if(CollectionUtils.isEmpty(gameIdList)) {
+            throw new BaseException("没有游戏查看权限,请联系管理员指派游戏权限");
+        }
+        return gameIdList;
     }
 }

+ 13 - 12
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/controller/AdsMediaDataController.java

@@ -1,5 +1,6 @@
 package com.zanxiang.game.data.serve.controller;
 
+import com.zanxiang.erp.security.annotation.PreAuthorize;
 import com.zanxiang.game.data.serve.pojo.dto.*;
 import com.zanxiang.game.data.serve.pojo.vo.*;
 import com.zanxiang.game.data.serve.service.IMediaDataService;
@@ -29,84 +30,84 @@ public class AdsMediaDataController {
     private IMediaDataService iMediaDataService;
 
     @ApiOperation(value = "推广媒体每日数据")
-    //@PreAuthorize(permissionKey = "media:pitcherGameMedia:day")
+    @PreAuthorize(permissionKey = "media:pitcherGameMedia:day")
     @PostMapping("/pitcherGame/day")
     public ResultVO<Page<PitcherGameMediaDataDayVO>> getPitcherGameMediaDataDay(@RequestBody PitcherGameMediaDataDayDTO dto) {
         return ResultVO.ok(iMediaDataService.getPitcherGameMediaDataDay(dto));
     }
 
     @ApiOperation(value = "推广媒体每日数据总计")
-    //@PreAuthorize(permissionKey = "media:pitcherGameMedia:dayTotal")
+    @PreAuthorize(permissionKey = "media:pitcherGameMedia:dayTotal")
     @PostMapping("/pitcherGame/dayTotal")
     public ResultVO<PitcherGameMediaDataDayVO> getPitcherGameMediaDataDayTotal(@RequestBody PitcherGameMediaDataDayTotalDTO dto) {
         return ResultVO.ok(iMediaDataService.getPitcherGameMediaDataDayTotal(dto));
     }
 
     @ApiOperation(value = "推广媒体总数据")
-    //@PreAuthorize(permissionKey = "media:pitcherGameMedia:total")
+    @PreAuthorize(permissionKey = "media:pitcherGameMedia:total")
     @PostMapping("/pitcherGame/total")
     public ResultVO<Page<PitcherGameMediaDataTotalVO>> getPitcherGameMediaDataTotal(@RequestBody PitcherGameMediaDataTotalDTO dto) {
         return ResultVO.ok(iMediaDataService.getPitcherGameMediaDataTotal(dto));
     }
 
     @ApiOperation(value = "推广媒体总数据总计")
-    //@PreAuthorize(permissionKey = "media:pitcherGameMedia:totalSum")
+    @PreAuthorize(permissionKey = "media:pitcherGameMedia:totalSum")
     @PostMapping("/pitcherGame/totalSum")
     public ResultVO<PitcherGameMediaDataTotalVO> getPitcherGameMediaDataTotalSum(@RequestBody PitcherGameMediaDataTotalSumDTO dto) {
         return ResultVO.ok(iMediaDataService.getPitcherGameMediaDataTotalSum(dto));
     }
 
     @ApiOperation(value = "投手媒体每日数据")
-    //@PreAuthorize(permissionKey = "media:pitcherMedia:day")
+    @PreAuthorize(permissionKey = "media:pitcherMedia:day")
     @PostMapping("/pitcher/day")
     public ResultVO<Page<PitcherMediaDataDayVO>> getPitcherMediaDataDay(@RequestBody PitcherMediaDataDayDTO dto) {
         return ResultVO.ok(iMediaDataService.getPitcherMediaDataDay(dto));
     }
 
     @ApiOperation(value = "投手媒体每日数据总计")
-    //@PreAuthorize(permissionKey = "media:pitcherMedia:dayTotal")
+    @PreAuthorize(permissionKey = "media:pitcherMedia:dayTotal")
     @PostMapping("/pitcher/dayTotal")
     public ResultVO<PitcherMediaDataDayVO> getPitcherMediaDataDayTotal(@RequestBody PitcherMediaDataDayTotalDTO dto) {
         return ResultVO.ok(iMediaDataService.getPitcherMediaDataDayTotal(dto));
     }
 
     @ApiOperation(value = "投手媒体总数据")
-    //@PreAuthorize(permissionKey = "media:pitcherMedia:total")
+    @PreAuthorize(permissionKey = "media:pitcherMedia:total")
     @PostMapping("/pitcher/total")
     public ResultVO<Page<PitcherMediaDataTotalVO>> getPitcherMediaDataTotal(@RequestBody PitcherMediaDataTotalDTO dto) {
         return ResultVO.ok(iMediaDataService.getPitcherMediaDataTotal(dto));
     }
 
     @ApiOperation(value = "投手媒体总数据总计")
-    //@PreAuthorize(permissionKey = "media:pitcherMedia:totalSum")
+    @PreAuthorize(permissionKey = "media:pitcherMedia:totalSum")
     @PostMapping("/pitcher/totalSum")
     public ResultVO<PitcherMediaDataTotalVO> getPitcherMediaDataTotalSum(@RequestBody PitcherMediaDataTotalSumDTO dto) {
         return ResultVO.ok(iMediaDataService.getPitcherMediaDataTotalSum(dto));
     }
 
     @ApiOperation(value = "游戏媒体每日数据")
-    //@PreAuthorize(permissionKey = "media:gameMedia:day")
+    @PreAuthorize(permissionKey = "media:gameMedia:day")
     @PostMapping("/game/day")
     public ResultVO<Page<GameMediaDataDayVO>> getGameMediaDataDay(@RequestBody GameMediaDataDayDTO dto) {
         return ResultVO.ok(iMediaDataService.getGameMediaDataDay(dto));
     }
 
     @ApiOperation(value = "游戏媒体每日数据总计")
-    //@PreAuthorize(permissionKey = "media:gameMedia:dayTotal")
+    @PreAuthorize(permissionKey = "media:gameMedia:dayTotal")
     @PostMapping("/game/dayTotal")
     public ResultVO<GameMediaDataDayVO> getGameMediaDataDayTotal(@RequestBody GameMediaDataDayTotalDTO dto) {
         return ResultVO.ok(iMediaDataService.getGameMediaDataDayTotal(dto));
     }
 
     @ApiOperation(value = "游戏媒体总数据")
-    //@PreAuthorize(permissionKey = "media:gameMedia:total")
+    @PreAuthorize(permissionKey = "media:gameMedia:total")
     @PostMapping("/game/total")
     public ResultVO<Page<GameMediaDataTotalVO>> getGameMediaDataTotal(@RequestBody GameMediaDataTotalDTO dto) {
         return ResultVO.ok(iMediaDataService.getGameMediaDataTotal(dto));
     }
 
     @ApiOperation(value = "游戏媒体总数据总计")
-    //@PreAuthorize(permissionKey = "media:gameMedia:totalSum")
+    @PreAuthorize(permissionKey = "media:gameMedia:totalSum")
     @PostMapping("/game/totalSum")
     public ResultVO<GameMediaDataTotalVO> getGameMediaDataTotalSum(@RequestBody GameMediaDataTotalSumDTO dto) {
         return ResultVO.ok(iMediaDataService.getGameMediaDataTotalSum(dto));

+ 11 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/controller/AdsOrderDetailController.java

@@ -1,10 +1,12 @@
 package com.zanxiang.game.data.serve.controller;
 
 import com.zanxiang.erp.security.annotation.PreAuthorize;
+import com.zanxiang.game.data.serve.pojo.dto.AdsOrderDetailDTO;
 import com.zanxiang.game.data.serve.pojo.dto.AdsOrderDetailListDTO;
 import com.zanxiang.game.data.serve.pojo.dto.AdsOrderDetailTotalDTO;
 import com.zanxiang.game.data.serve.pojo.vo.AdsOrderDetailTotalVO;
 import com.zanxiang.game.data.serve.pojo.vo.AdsOrderDetailVO;
+import com.zanxiang.game.data.serve.pojo.vo.OrderCPDetailVO;
 import com.zanxiang.game.data.serve.service.IAdsOrderDetailService;
 import com.zanxiang.game.data.serve.utils.Page;
 import com.zanxiang.module.util.pojo.ResultVO;
@@ -43,4 +45,13 @@ public class AdsOrderDetailController {
     public ResultVO<AdsOrderDetailTotalVO> orderTotal(@Validated @RequestBody AdsOrderDetailTotalDTO dto) {
         return ResultVO.ok(gameOrderService.orderTotal(dto));
     }
+
+    @PreAuthorize(permissionKey = "gameData:order:detail")
+    @ApiOperation(value = "订单详情")
+    @PostMapping("/detail")
+    public ResultVO<Page<OrderCPDetailVO>> getOrderDetailList(@RequestBody AdsOrderDetailDTO dto) {
+        return ResultVO.ok(gameOrderService.getOrderDetailList(dto));
+    }
+
+
 }

+ 7 - 7
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/controller/GameDataController.java

@@ -54,13 +54,6 @@ public class GameDataController {
         return ResultVO.ok(gameDataService.getGameDataDayTotal(dto));
     }
 
-    @ApiOperation(value = "h5游戏充值")
-    @PreAuthorize(permissionKey = "gameData:adsGameDay:h5")
-    @PostMapping("/h5")
-    public ResultVO<Page<GameDataH5VO>> getH5Recharge(@RequestBody GameDataH5DTO dto) {
-        return ResultVO.ok(gameDataService.getH5Recharge(dto));
-    }
-
     @ApiOperation(value = "游戏总数据")
     @PreAuthorize(permissionKey = "gameData:adsGameDay:total")
     @PostMapping("/total")
@@ -76,6 +69,13 @@ public class GameDataController {
         return ResultVO.ok(gameDataService.getGameDataTotalTotal(dto));
     }
 
+    @ApiOperation(value = "h5游戏充值")
+    @PreAuthorize(permissionKey = "gameData:adsGameDay:h5")
+    @PostMapping("/h5")
+    public ResultVO<Page<GameDataH5VO>> getH5Recharge(@RequestBody GameDataH5DTO dto) {
+        return ResultVO.ok(gameDataService.getH5Recharge(dto));
+    }
+
     @ApiOperation(value = "每日流水贡献")
     @PreAuthorize(permissionKey = "gameData:adsGameDay:water")
     @PostMapping("/water")

+ 64 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/controller/PlayerDataController.java

@@ -0,0 +1,64 @@
+package com.zanxiang.game.data.serve.controller;
+
+import com.zanxiang.game.data.serve.pojo.dto.PlayerDataListDTO;
+import com.zanxiang.game.data.serve.pojo.dto.PlayerDataListTotalDTO;
+import com.zanxiang.game.data.serve.pojo.dto.PlayerRoleDataListDTO;
+import com.zanxiang.game.data.serve.pojo.dto.PlayerRoleDataListTotalDTO;
+import com.zanxiang.game.data.serve.pojo.vo.PlayerDataVO;
+import com.zanxiang.game.data.serve.pojo.vo.PlayerRoleDataVO;
+import com.zanxiang.game.data.serve.service.IPlayerDataService;
+import com.zanxiang.game.data.serve.utils.Page;
+import com.zanxiang.module.util.pojo.ResultVO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author tianhua
+ * @time 2023/9/6
+ * @Description 玩家数据控制层
+ **/
+@Api(tags = "玩家数据")
+@RestController
+@RequestMapping("/player")
+@Slf4j
+public class PlayerDataController {
+
+    @Autowired
+    private IPlayerDataService playerDataService;
+
+    @ApiOperation("玩家列表")
+    //@PreAuthorize(permissionKey = "playerData:player:list")
+    @PostMapping("/list")
+    public ResultVO<Page<PlayerDataVO>> getPlayerDataList(@RequestBody PlayerDataListDTO dto) {
+        return ResultVO.ok(playerDataService.getPlayerDataList(dto));
+    }
+
+    @ApiOperation("玩家列表总计一栏")
+    //@PreAuthorize(permissionKey = "playerData:player:listTotal")
+    @PostMapping("/listTotal")
+    public ResultVO<PlayerDataVO> getPlayerDataListTotal(@RequestBody PlayerDataListTotalDTO dto) {
+        return ResultVO.ok(playerDataService.getPlayerDataListTotal(dto));
+    }
+
+    @ApiOperation("玩家角色列表")
+    //@PreAuthorize(permissionKey = "playerData:role:list")
+    @PostMapping("/role/list")
+    public ResultVO<Page<PlayerRoleDataVO>> getPlayerRoleDataList(@RequestBody PlayerRoleDataListDTO dto) {
+        return ResultVO.ok(playerDataService.getPlayerRoleDataList(dto));
+    }
+
+    @ApiOperation("玩家角色列表总计一栏")
+    //@PreAuthorize(permissionKey = "playerData:role:listTotal")
+    @PostMapping("/role/listTotal")
+    public ResultVO<PlayerRoleDataVO> getPlayerRoleDataListTotal(@RequestBody PlayerRoleDataListTotalDTO dto) {
+        return ResultVO.ok(playerDataService.getPlayerRoleDataListTotal(dto));
+    }
+
+
+}

+ 21 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/AdsOrderDetailDTO.java

@@ -0,0 +1,21 @@
+package com.zanxiang.game.data.serve.pojo.dto;
+
+import com.zanxiang.game.data.serve.pojo.base.BasePage;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @author tianhua
+ * @time 2023/9/6
+ * @Description 操作里面的订单详情(主要查询cp回调信息)
+ **/
+@Data
+public class AdsOrderDetailDTO extends BasePage {
+
+    /**
+     * 商户订单号
+     */
+    @ApiModelProperty(notes = "商户订单号")
+    private String orderId;
+
+}

+ 3 - 2
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/AdsOrderDetailListDTO.java

@@ -7,6 +7,7 @@ import lombok.Data;
 import org.springframework.format.annotation.DateTimeFormat;
 
 import java.time.LocalDate;
+import java.util.List;
 
 @Data
 public class AdsOrderDetailListDTO extends BasePage {
@@ -63,13 +64,13 @@ public class AdsOrderDetailListDTO extends BasePage {
      * 充值游戏id
      */
     @ApiModelProperty(notes = "充值游戏id")
-    private String gameId;
+    private List<Long> gameId;
 
     /**
      * 注册渠道对应的id --> agentId
      */
     @ApiModelProperty(notes = "注册渠道对应的id")
-    private String[] channelId;
+    private List<String> channelId;
 
     /**
      * 归因推广账号

+ 3 - 2
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/AdsOrderDetailTotalDTO.java

@@ -6,6 +6,7 @@ import lombok.Data;
 import org.springframework.format.annotation.DateTimeFormat;
 
 import java.time.LocalDate;
+import java.util.List;
 
 @Data
 public class AdsOrderDetailTotalDTO {
@@ -62,13 +63,13 @@ public class AdsOrderDetailTotalDTO {
      * 充值游戏id
      */
     @ApiModelProperty(notes = "充值游戏id")
-    private String gameId;
+    private List<Long> gameId;
 
     /**
      * 注册渠道对应的id --> agentId
      */
     @ApiModelProperty(notes = "注册渠道对应的id")
-    private String[] channelId;
+    private List<String> channelId;
 
     /**
      * 归因推广账号

+ 6 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/GameDataDayDTO.java

@@ -56,6 +56,12 @@ public class GameDataDayDTO extends BasePage {
     @ApiModelProperty(notes = "注册结束时间")
     private LocalDate registeredEndDate;
 
+    /**
+     * 选择展示数据种类
+     */
+    @ApiModelProperty(notes = "选择展示数据种类:buy -> 买量 ; nature -> 自然量 ; total -> 总量")
+    private String tableTypes;
+
     /**
      * 排序字段
      */

+ 9 - 4
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/GameDataDayTotalDTO.java

@@ -43,6 +43,12 @@ public class GameDataDayTotalDTO {
     @ApiModelProperty(notes = "注册开始时间")
     private LocalDate registeredBeginDate;
 
+    /**
+     * 注册时间(结束)
+     */
+    @ApiModelProperty(notes = "注册结束时间")
+    private LocalDate registeredEndDate;
+
     /**
      * SDK来源
      */
@@ -50,10 +56,9 @@ public class GameDataDayTotalDTO {
     private String sourceSystem;
 
     /**
-     * 注册时间(结束)
+     * 选择展示数据种类
      */
-    @ApiModelProperty(notes = "注册结束时间")
-    private LocalDate registeredEndDate;
-
+    @ApiModelProperty(notes = "选择展示数据种类:buy -> 买量 ; nature -> 自然量 ; total -> 总量")
+    private String tableTypes;
 
 }

+ 6 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/GameDataTotalDTO.java

@@ -81,4 +81,10 @@ public class GameDataTotalDTO extends BasePage {
     @ApiModelProperty(notes = "排序方式:升序asc;降序desc")
     private String sortType;
 
+    /**
+     * 选择展示数据种类
+     */
+    @ApiModelProperty(notes = "选择展示数据种类:buy -> 买量 ; nature -> 自然量 ; total -> 总量")
+    private String tableTypes;
+
 }

+ 6 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/GameDataTotalTotalDTO.java

@@ -67,4 +67,10 @@ public class GameDataTotalTotalDTO {
     @ApiModelProperty(value = "SDK来源")
     private String sourceSystem;
 
+    /**
+     * 选择展示数据种类
+     */
+    @ApiModelProperty(notes = "选择展示数据种类:buy -> 买量 ; nature -> 自然量 ; total -> 总量")
+    private String tableTypes;
+
 }

+ 29 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/PlayerDataListDTO.java

@@ -0,0 +1,29 @@
+package com.zanxiang.game.data.serve.pojo.dto;
+
+import com.zanxiang.game.data.serve.pojo.base.BasePage;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.time.LocalDate;
+
+/**
+ * @author tianhua
+ * @time 2023/9/6
+ * @Description 前端玩家列表查询参数实体
+ **/
+@Data
+public class PlayerDataListDTO extends BasePage {
+
+    /**
+     * 注册开始时间
+     */
+    @ApiModelProperty("注册开始时间")
+    private LocalDate beginDate;
+
+    /**
+     * 注册结束时间
+     */
+    @ApiModelProperty("注册结束时间")
+    private LocalDate endDate;
+
+}

+ 28 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/PlayerDataListTotalDTO.java

@@ -0,0 +1,28 @@
+package com.zanxiang.game.data.serve.pojo.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.time.LocalDate;
+
+/**
+ * @author tianhua
+ * @time 2023/9/6
+ * @Description 前端玩家列表总计查询参数实体
+ **/
+@Data
+public class PlayerDataListTotalDTO {
+
+    /**
+     * 注册开始时间
+     */
+    @ApiModelProperty("注册开始时间")
+    private LocalDate beginDate;
+
+    /**
+     * 注册结束时间
+     */
+    @ApiModelProperty("注册结束时间")
+    private LocalDate endDate;
+
+}

+ 29 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/PlayerRoleDataListDTO.java

@@ -0,0 +1,29 @@
+package com.zanxiang.game.data.serve.pojo.dto;
+
+import com.zanxiang.game.data.serve.pojo.base.BasePage;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.time.LocalDate;
+
+/**
+ * @author tianhua
+ * @time 2023/9/6
+ * @Description 前端玩家角色列表查询参数实体
+ **/
+@Data
+public class PlayerRoleDataListDTO extends BasePage {
+
+    /**
+     * 注册开始时间
+     */
+    @ApiModelProperty("注册开始时间")
+    private LocalDate beginDate;
+
+    /**
+     * 注册结束时间
+     */
+    @ApiModelProperty("注册结束时间")
+    private LocalDate endDate;
+
+}

+ 28 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/PlayerRoleDataListTotalDTO.java

@@ -0,0 +1,28 @@
+package com.zanxiang.game.data.serve.pojo.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.time.LocalDate;
+
+/**
+ * @author tianhua
+ * @time 2023/9/6
+ * @Description 前端玩家角色列表总计查询参数实体
+ **/
+@Data
+public class PlayerRoleDataListTotalDTO {
+
+    /**
+     * 注册开始时间
+     */
+    @ApiModelProperty("注册开始时间")
+    private LocalDate beginDate;
+
+    /**
+     * 注册结束时间
+     */
+    @ApiModelProperty("注册结束时间")
+    private LocalDate endDate;
+
+}

+ 46 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/entity/AdsGameAccountDayn.java

@@ -0,0 +1,46 @@
+package com.zanxiang.game.data.serve.pojo.entity;
+
+import lombok.Data;
+import org.nutz.dao.entity.annotation.Column;
+import org.nutz.dao.entity.annotation.PK;
+import org.nutz.dao.entity.annotation.Table;
+
+import java.io.Serializable;
+import java.time.LocalDate;
+
+@Data
+@Table(AdsGameAccountDayn.TABLE_NAME)
+@PK({"dt", "gameId", "accountType", "sourceSystem"})
+public class AdsGameAccountDayn implements Serializable {
+    private static final long serialVersionUID = 1L;
+    public static final String TABLE_NAME = "ads_game_account_dayn";
+     
+    /**
+    * 注册时间
+    */
+    private LocalDate dt;
+    
+    /**
+    * 游戏ID
+    */
+    private String gameId;
+    
+    /**
+    * 媒体
+    */
+    private String accountType;
+    
+    /**
+    * SDK来源
+    */
+    private String sourceSystem;
+    
+    /**
+    * 每一天的的充值金额,充值次数,充值人数
+    */
+    @Column
+    private String dayn;
+
+}
+
+

+ 52 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/entity/AdsGamePitcherAccountDayn.java

@@ -0,0 +1,52 @@
+package com.zanxiang.game.data.serve.pojo.entity;
+
+import lombok.Data;
+import org.nutz.dao.entity.annotation.Column;
+import org.nutz.dao.entity.annotation.PK;
+import org.nutz.dao.entity.annotation.Table;
+
+import java.io.Serializable;
+import java.time.LocalDate;
+
+@Data
+@Table(AdsGamePitcherAccountDayn.TABLE_NAME)
+@PK({"dt", "gameId", "pitcherId", "accountType", "sourceSystem"})
+public class AdsGamePitcherAccountDayn implements Serializable {
+    private static final long serialVersionUID = 1L;
+    public static final String TABLE_NAME = "ads_game_pitcher_account_dayn";
+     
+    /**
+    * 注册时间
+    */
+    private LocalDate dt;
+    
+    /**
+    * 游戏ID
+    */
+    private String gameId;
+    
+    /**
+    * 投手ID
+    */
+    private String pitcherId;
+    
+    /**
+    * 媒体
+    */
+    private String accountType;
+    
+    /**
+    * SDK来源
+    */
+    private String sourceSystem;
+    
+    /**
+    * 每一天的的充值金额,充值次数,充值人数
+    */    
+    @Column
+    private String dayn;
+    
+
+}
+
+

+ 17 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/entity/AdsOrderDetail.java

@@ -58,6 +58,12 @@ public class AdsOrderDetail implements Serializable {
     @Column
     private String cpName;
 
+    /**
+     * CP通知状态,1为待处理,2为成功,-1为失败
+     */
+    @Column
+    private String cpStatus;
+
     /**
      * 第三方支付订单号
      */
@@ -184,6 +190,12 @@ public class AdsOrderDetail implements Serializable {
     @Column
     private String orderGameClassify;
 
+    /**
+     * 游戏商品id
+     */
+    @Column
+    private String productId;
+
     /**
      * 游戏商品名称
      */
@@ -291,5 +303,10 @@ public class AdsOrderDetail implements Serializable {
     @Column
     private String isFirstRecharge;
 
+    /**
+     * cp最后通知时间
+     */
+    @Column
+    private LocalDateTime lastCpNotifyTime;
 
 }

+ 47 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/entity/AdsPitcherAccountDayn.java

@@ -0,0 +1,47 @@
+package com.zanxiang.game.data.serve.pojo.entity;
+
+import lombok.Data;
+import org.nutz.dao.entity.annotation.Column;
+import org.nutz.dao.entity.annotation.PK;
+import org.nutz.dao.entity.annotation.Table;
+
+import java.io.Serializable;
+import java.time.LocalDate;
+
+@Data
+@Table(AdsPitcherAccountDayn.TABLE_NAME)
+@PK({"dt", "pitcherId", "accountType", "sourceSystem"})
+public class AdsPitcherAccountDayn implements Serializable {
+    private static final long serialVersionUID = 1L;
+    public static final String TABLE_NAME = "ads_pitcher_account_dayn";
+     
+    /**
+    * 注册时间
+    */
+    private LocalDate dt;
+    
+    /**
+    * 投手ID
+    */
+    private String pitcherId;
+    
+    /**
+    * 媒体
+    */
+    private String accountType;
+    
+    /**
+    * SDK来源
+    */
+    private String sourceSystem;
+    
+    /**
+    * 每一天的的充值金额,充值次数,充值人数
+    */    
+    @Column
+    private String dayn;
+    
+
+}
+
+

+ 86 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/entity/TPayCallCpLog.java

@@ -0,0 +1,86 @@
+package com.zanxiang.game.data.serve.pojo.entity;
+
+import lombok.Data;
+import org.nutz.dao.entity.annotation.Column;
+import org.nutz.dao.entity.annotation.PK;
+import org.nutz.dao.entity.annotation.Table;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+@Data
+@Table(TPayCallCpLog.TABLE_NAME)
+@PK({"id"})
+public class TPayCallCpLog implements Serializable {
+    private static final long serialVersionUID = 1L;
+    public static final String TABLE_NAME = "dm_game_order.t_pay_call_cp_log";
+     
+    /**
+    * 自增ID
+    */
+    private Long id;
+    
+    /**
+    * 订单号
+    */    
+    @Column
+    private String orderId;
+    
+    /**
+    * CP订单号
+    */    
+    @Column
+    private String cpOrderId;
+    
+    /**
+    * 充值成功标志,1为待处理,2为成功,3为失败
+    */    
+    @Column
+    private Integer status;
+    
+    /**
+    * 充值回调标志,1为待处理,2为成功,3为失败
+    */    
+    @Column
+    private Integer cpStatus;
+    
+    /**
+    * CP回调地址
+    */    
+    @Column
+    private String cpPaybackUrl;
+    
+    /**
+    * CP回调参数
+    */    
+    @Column
+    private String params;
+    
+    /**
+    * CP附加参数
+    */    
+    @Column
+    private String ext;
+    
+    /**
+    * 通知次数
+    */    
+    @Column
+    private Integer notifyCnt;
+    
+    /**
+    * 创建时间
+    */    
+    @Column
+    private LocalDateTime createTime;
+    
+    /**
+    * 更新时间
+    */    
+    @Column
+    private LocalDateTime updateTime;
+    
+  
+}
+
+

+ 16 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/vo/AdsOrderDetailVO.java

@@ -25,6 +25,12 @@ public class AdsOrderDetailVO {
     @ApiModelProperty(notes = "CP名称")
     private String cpName;
 
+    /**
+     * CP通知状态,1为待处理,2为成功,-1为失败
+     */
+    @ApiModelProperty(notes = "CP通知状态,1为待处理,2为成功,-1为失败")
+    private String cpStatus;
+
     @ApiModelProperty(notes = "第三方支付订单号")
     private String merchantOrderNo;
 
@@ -88,6 +94,9 @@ public class AdsOrderDetailVO {
     @ApiModelProperty(notes = "充值游戏类型")
     private String orderGameClassify;
 
+    @ApiModelProperty(notes = "游戏商品id(产品Id)")
+    private String productId;
+
     @ApiModelProperty(notes = "游戏商品名称")
     private String productName;
 
@@ -141,4 +150,11 @@ public class AdsOrderDetailVO {
 
     @ApiModelProperty(notes = "是否首充:1是,0否")
     private String isFirstRecharge;
+
+    /**
+     * cp最后通知时间
+     */
+    @ApiModelProperty(notes = "cp最后通知时间")
+    private LocalDateTime lastCpNotifyTime;
+
 }

Diff do ficheiro suprimidas por serem muito extensas
+ 24 - 1524
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/vo/GameDataDayTotalVO.java


Diff do ficheiro suprimidas por serem muito extensas
+ 24 - 1512
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/vo/GameDataDayVO.java


+ 0 - 505
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/vo/GameDataTotalTotalVO.java

@@ -25,414 +25,12 @@ public class GameDataTotalTotalVO {
     @ApiModelProperty(value = "消耗")
     private BigDecimal cost;
 
-    /**
-     * 买量注册人数
-     */
-    @ApiModelProperty(value = "注册人数(买量)")
-    private Long buyRegNum;
-
-    /**
-     * 自然量注册人数
-     */
-    @ApiModelProperty(value = "注册人数(自然量)")
-    private Long natureRegNum;
-
     /**
      * 注册人数(总)
      */
     @ApiModelProperty(value = "注册人数(总量)")
     private Long regNum;
 
-    /**
-     * 新用户充值次数(买量)
-     */
-    @ApiModelProperty(value = "新用户充值次数(买量)")
-    private Long buyNewUserAmountCount;
-
-    /**
-     * 新用户充值人数(买量)
-     */
-    @ApiModelProperty(value = "新用户充值人数(买量)")
-    private Long buyNewUserAmountNum;
-
-    /**
-     * 新用户充值金额(买量)
-     */
-    @ApiModelProperty(value = "新用户充值金额(买量)")
-    private BigDecimal buyNewUserAmount;
-
-    /**
-     * 首日新用户充值次数(买量)
-     */
-    @ApiModelProperty(value = "首日新用户充值次数(买量)")
-    private Long buyFirstNewUserAmountCount;
-
-    /**
-     * 首日新用户充值人数(买量)
-     */
-    @ApiModelProperty(value = "首日新用户充值人数(买量)")
-    private Long buyFirstNewUserAmountNum;
-
-    /**
-     * 首日新用户充值金额(买量)
-     */
-    @ApiModelProperty(value = "首日新用户充值金额(买量)")
-    private BigDecimal buyFirstNewUserAmount;
-
-    /**
-     * 老用户充值次数(买量)
-     */
-    @ApiModelProperty(value = "老用户充值次数(买量)")
-    private Long buyOldUserCount;
-
-    /**
-     * 老用户充值人数(买量)
-     */
-    @ApiModelProperty(value = "老用户充值人数(买量)")
-    private Long buyOldUserNum;
-
-    /**
-     * 老用户充值金额(买量)
-     */
-    @ApiModelProperty(value = "老用户充值金额(买量)")
-    private BigDecimal buyOldUserAmount;
-
-    /**
-     * 账面充值次数(买量)
-     */
-    @ApiModelProperty(value = "账面充值次数(买量)")
-    private Long buyAmountCount;
-
-    /**
-     * 账面充值人数(买量)
-     */
-    @ApiModelProperty(value = "账面充值人数(买量)")
-    private Long buyAmountNum;
-
-    /**
-     * 账面充值金额(买量)
-     */
-    @ApiModelProperty(value = "账面充值金额(买量)")
-    private BigDecimal buyAmount;
-
-    /**
-     * 新用户累计充值次数(买量)
-     */
-    @ApiModelProperty(value = "新用户累计充值次数(买量)")
-    private Long buyNewUserTotalAmountCount;
-
-    /**
-     * 新用户累计充值人数(买量)
-     */
-    @ApiModelProperty(value = "新用户累计充值人数(买量)")
-    private Long buyNewUserTotalAmountNum;
-
-    /**
-     * 新用户累计充值金额(买量)
-     */
-    @ApiModelProperty(value = "新用户累计充值金额(买量)")
-    private BigDecimal buyNewUserTotalAmount;
-
-    /**
-     * 首日Roi(买量)
-     */
-    @ApiModelProperty(value = "首日Roi(买量)")
-    private BigDecimal buyFirstRoi;
-
-    @ApiModelProperty(value = "首日付费率(买量)")
-    private BigDecimal buyFirstAmountRate;
-
-    /**
-     * 当天付费率(买量)
-     */
-    @ApiModelProperty(value = "当天付费率(买量)")
-    private BigDecimal buyTodayAmountRate;
-
-    /**
-     * 新用户付费率(买量)
-     */
-    @ApiModelProperty(value = "新用户付费率(买量)")
-    private BigDecimal buyNewUserRoi;
-
-    /**
-     * 新用户付费比(买量)
-     */
-    @ApiModelProperty(value = "新用户付费比(买量)")
-    private BigDecimal buyNewUserRate;
-
-    /**
-     * 首日客单价(买量)
-     */
-    @ApiModelProperty(value = "首日客单价(买量)")
-    private BigDecimal buyFirstAvgAmount;
-
-    /**
-     * 当天客单价(买量)
-     */
-    @ApiModelProperty(value = "当天客单价(买量)")
-    private BigDecimal buyTodayAvgAmount;
-
-    /**
-     * 账面客单价(买量)
-     */
-    @ApiModelProperty(value = "账面客单价(买量)")
-    private BigDecimal buyAvgAmount;
-
-    /**
-     * 新用户客单价(买量)
-     */
-    @ApiModelProperty(value = "新用户客单价(买量)")
-    private BigDecimal buyNewUserAvgAmount;
-
-    /**
-     * 复充率(买量)
-     */
-    @ApiModelProperty(value = "复充率(买量)")
-    private BigDecimal buyUserAgainRate;
-
-    /**
-     * 新用户复充率(买量)
-     */
-    @ApiModelProperty(value = "新用户复充率(买量)")
-    private BigDecimal buyNewUserAgainRate;
-
-    /**
-     * 当天复充率(买量)
-     */
-    @ApiModelProperty(value = "当天复充率(买量)")
-    private BigDecimal buyTodayAgainRate;
-
-    /**
-     * 新用户复充人数(买量)(前端不需要显示)
-     */
-    @ApiModelProperty(value = "新用户复充人数(买量)(前端不需要显示)")
-    private Long buyNewUserAgainNum;
-
-    /**
-     * 新增注册ARPU(买量)
-     */
-    @ApiModelProperty(value = "新增注册ARPU(买量)")
-    private BigDecimal buyRegUserArpu;
-
-    /**
-     * 首日付费ARPU(买量)
-     */
-    @ApiModelProperty(value = "首日付费ARPU(买量)")
-    private BigDecimal buyFirstAmountArpu;
-
-    /**
-     * 当天付费ARPU(买量)
-     */
-    @ApiModelProperty(value = "当天付费ARPU(买量)")
-    private BigDecimal buyTodayAmountArpu;
-
-    /**
-     * 账面ARPU(买量)
-     */
-    @ApiModelProperty(value = "账面ARPU(买量)")
-    private BigDecimal buyAmountArpu;
-
-    /**
-     * 新用户付费ARPU(买量)
-     */
-    @ApiModelProperty(value = "新用户付费ARPU(买量)")
-    private BigDecimal buyNewUserAmountArpu;
-
-    /**
-     * 新用户充值次数(自然量)
-     */
-    @ApiModelProperty(value = "新用户充值次数(自然量)")
-    private Long natureNewUserAmountCount;
-
-    /**
-     * 新用户充值人数(自然量)
-     */
-    @ApiModelProperty(value = "新用户充值人数(自然量)")
-    private Long natureNewUserAmountNum;
-
-    /**
-     * 新用户充值金额(自然量)
-     */
-    @ApiModelProperty(value = "新用户充值金额(自然量)")
-    private BigDecimal natureNewUserAmount;
-
-    /**
-     * 首日新用户充值次数(自然量)
-     */
-    @ApiModelProperty(value = "首日新用户充值次数(自然量)")
-    private Long natureFirstNewUserAmountCount;
-
-    /**
-     * 首日新用户充值人数(自然量)
-     */
-    @ApiModelProperty(value = "首日新用户充值人数(自然量)")
-    private Long natureFirstNewUserAmountNum;
-
-    /**
-     * 首日新用户充值金额(自然量)
-     */
-    @ApiModelProperty(value = "首日新用户充值金额(自然量)")
-    private BigDecimal natureFirstNewUserAmount;
-
-    /**
-     * 老用户充值次数(自然量)
-     */
-    @ApiModelProperty(value = "老用户充值次数(自然量)")
-    private Long natureOldUserCount;
-
-    /**
-     * 老用户充值人数(自然量)
-     */
-    @ApiModelProperty(value = "老用户充值人数(自然量)")
-    private Long natureOldUserNum;
-
-    /**
-     * 老用户充值金额(自然量)
-     */
-    @ApiModelProperty(value = "老用户充值金额(自然量)")
-    private BigDecimal natureOldUserAmount;
-
-    /**
-     * 账面充值次数(自然量)
-     */
-    @ApiModelProperty(value = "账面充值次数(自然量)")
-    private Long natureAmountCount;
-
-    /**
-     * 账面充值人数(自然量)
-     */
-    @ApiModelProperty(value = "账面充值人数(自然量)")
-    private Long natureAmountNum;
-
-    /**
-     * 账面充值金额(自然量)
-     */
-    @ApiModelProperty(value = "账面充值金额(自然量)")
-    private BigDecimal natureAmount;
-
-    /**
-     * 新用户累计充值次数(自然量)
-     */
-    @ApiModelProperty(value = "新用户累计充值次数(自然量)")
-    private Long natureNewUserTotalAmountCount;
-
-    /**
-     * 新用户累计充值人数(自然量)
-     */
-    @ApiModelProperty(value = "新用户累计充值人数(自然量)")
-    private Long natureNewUserTotalAmountNum;
-
-    /**
-     * 新用户累计充值金额(自然量)
-     */
-    @ApiModelProperty(value = "新用户累计充值金额(自然量)")
-    private BigDecimal natureNewUserTotalAmount;
-
-    /**
-     * 首日Roi(自然量)
-     */
-    @ApiModelProperty(value = "首日Roi(自然量)")
-    private BigDecimal natureFirstRoi;
-
-    @ApiModelProperty(value = "首日付费率")
-    private BigDecimal natureFirstAmountRate;
-
-    /**
-     * 当天付费率(自然量)
-     */
-    @ApiModelProperty(value = "当天付费率(自然量)")
-    private BigDecimal natureTodayAmountRate;
-
-    /**
-     * 新用户付费率(自然量)
-     */
-    @ApiModelProperty(value = "新用户付费率(自然量)")
-    private BigDecimal natureNewUserRoi;
-
-    /**
-     * 新用户付费比(自然量)
-     */
-    @ApiModelProperty(value = "新用户付费比(自然量)")
-    private BigDecimal natureNewUserRate;
-
-    /**
-     * 首日客单价(自然量)
-     */
-    @ApiModelProperty(value = "首日客单价(自然量)")
-    private BigDecimal natureFirstAvgAmount;
-
-    /**
-     * 当天客单价(自然量)
-     */
-    @ApiModelProperty(value = "当天客单价(自然量)")
-    private BigDecimal natureTodayAvgAmount;
-
-    /**
-     * 账面客单价(自然量)
-     */
-    @ApiModelProperty(value = "账面客单价(自然量)")
-    private BigDecimal natureAvgAmount;
-
-    /**
-     * 新用户客单价(自然量)
-     */
-    @ApiModelProperty(value = "新用户客单价(自然量)")
-    private BigDecimal natureNewUserAvgAmount;
-
-    /**
-     * 复充率(自然量)
-     */
-    @ApiModelProperty(value = "复充率(自然量)")
-    private BigDecimal natureUserAgainRate;
-
-    /**
-     * 新用户复充率(自然量)
-     */
-    @ApiModelProperty(value = "新用户复充率(自然量)")
-    private BigDecimal natureNewUserAgainRate;
-
-    /**
-     * 当天复充率(自然量)
-     */
-    @ApiModelProperty(value = "当天复充率(自然量)")
-    private BigDecimal natureTodayAgainRate;
-
-    /**
-     * 新用户复充人数(自然量)(前端不需要显示)
-     */
-    @ApiModelProperty(value = "新用户复充人数(自然量)(前端不需要显示)")
-    private Long natureNewUserAgainNum;
-
-    /**
-     * 新增注册ARPU(自然量)
-     */
-    @ApiModelProperty(value = "新增注册ARPU(自然量)")
-    private BigDecimal natureRegUserArpu;
-
-    /**
-     * 首日付费ARPU(自然量)
-     */
-    @ApiModelProperty(value = "首日付费ARPU(自然量)")
-    private BigDecimal natureFirstAmountArpu;
-
-    /**
-     * 当天付费ARPU(自然量)
-     */
-    @ApiModelProperty(value = "当天付费ARPU(自然量)")
-    private BigDecimal natureTodayAmountArpu;
-
-    /**
-     * 账面ARPU(自然量)
-     */
-    @ApiModelProperty(value = "账面ARPU(自然量)")
-    private BigDecimal natureAmountArpu;
-
-    /**
-     * 新用户付费ARPU(自然量)
-     */
-    @ApiModelProperty(value = "新用户付费ARPU(自然量)")
-    private BigDecimal natureNewUserAmountArpu;
-
     /**
      * 新用户充值次数(总量)
      */
@@ -647,43 +245,6 @@ public class GameDataTotalTotalVO {
     @ApiModelProperty(value = "新用户充值成本(总量) = 消耗 / 新用户充值人数")
     private BigDecimal newUserRechargeCost;
 
-    @ApiModelProperty(value = "注册成本(买量) = 消耗 / 注册人数")
-    private BigDecimal buyRegCost;
-
-    @ApiModelProperty(value = "总回收率(买量) = 新用户累计充值金额 / 消耗")
-    private BigDecimal buyTotalRoi;
-
-    @ApiModelProperty(value = "首日充值成本(买量) = 消耗 / 首日新用户充值人数")
-    private BigDecimal buyFirstNewUserRechargeCost;
-
-    @ApiModelProperty(value = "总充值成本(买量) = 消耗 / 新用户累计充值人数")
-    private BigDecimal buyTotalRechargeCost;
-
-    @ApiModelProperty(value = "新用户回收率(买量) = 新用户充值今日 / 消耗")
-    private BigDecimal buyNewUserRechargeRate;
-
-    @ApiModelProperty(value = "新用户充值成本(买量) = 消耗 / 新用户充值人数")
-    private BigDecimal buyNewUserRechargeCost;
-
-    @ApiModelProperty(value = "注册成本(自然量) = 消耗 / 注册人数")
-    private BigDecimal natureRegCost;
-
-    @ApiModelProperty(value = "总回收率(自然量) = 新用户累计充值金额 / 消耗")
-    private BigDecimal natureTotalRoi;
-
-    @ApiModelProperty(value = "首日充值成本(自然量) = 消耗 / 首日新用户充值人数")
-    private BigDecimal natureFirstNewUserRechargeCost;
-
-    @ApiModelProperty(value = "总充值成本(自然量) = 消耗 / 新用户累计充值人数")
-    private BigDecimal natureTotalRechargeCost;
-
-    @ApiModelProperty(value = "新用户回收率(自然量) = 新用户充值今日 / 消耗")
-    private BigDecimal natureNewUserRechargeRate;
-
-    @ApiModelProperty(value = "新用户充值成本(自然量) = 消耗 / 新用户充值人数")
-    private BigDecimal natureNewUserRechargeCost;
-
-
     @ApiModelProperty(value = "单日付费100+人数(总量)")
     private Long hundredUserNum;
 
@@ -717,70 +278,4 @@ public class GameDataTotalTotalVO {
     @ApiModelProperty(value = "新用户累计创角率(总量)")
     private BigDecimal newUserTotalRoleNumRate;
 
-    @ApiModelProperty(value = "单日付费100+人数(买量)")
-    private Long buyHundredUserNum;
-
-    @ApiModelProperty(value = "单日付费100+成本 = 消耗 / 单日付费100+人数(买量)")
-    private BigDecimal buyHundredUserNumCost;
-
-    @ApiModelProperty(value = "首日创角人数(买量)")
-    private Long buyFirstRoleNum;
-
-    @ApiModelProperty(value = "创角人数(买量)")
-    private Long buyRoleNum;
-
-    @ApiModelProperty(value = "新用户累计创角人数(买量)")
-    private Long buyNewUserTotalRoleNum;
-
-    @ApiModelProperty(value = "首日创角人数成本(买量)")
-    private BigDecimal buyFirstRoleNumCost;
-
-    @ApiModelProperty(value = "创角人数成本(买量)")
-    private BigDecimal buyRoleNumCost;
-
-    @ApiModelProperty(value = "新用户累计创角人数成本(买量)")
-    private BigDecimal buyNewUserTotalRoleNumCost;
-
-    @ApiModelProperty(value = "首日创角率(买量)")
-    private BigDecimal buyFirstRoleNumRate;
-
-    @ApiModelProperty(value = "创角率(买量)")
-    private BigDecimal buyRoleNumRate;
-
-    @ApiModelProperty(value = "新用户累计创角率(买量)")
-    private BigDecimal buyNewUserTotalRoleNumRate;
-
-    @ApiModelProperty(value = "单日付费100+人数(自然量)")
-    private Long natureHundredUserNum;
-
-    @ApiModelProperty(value = "单日付费100+成本 = 消耗 / 单日付费100+人数(自然量)")
-    private BigDecimal natureHundredUserNumCost;
-
-    @ApiModelProperty(value = "首日创角人数(自然量)")
-    private Long natureFirstRoleNum;
-
-    @ApiModelProperty(value = "创角人数(自然量)")
-    private Long natureRoleNum;
-
-    @ApiModelProperty(value = "新用户累计创角人数(自然量)")
-    private Long natureNewUserTotalRoleNum;
-
-    @ApiModelProperty(value = "首日创角人数成本(自然量)")
-    private BigDecimal natureFirstRoleNumCost;
-
-    @ApiModelProperty(value = "创角人数成本(自然量)")
-    private BigDecimal natureRoleNumCost;
-
-    @ApiModelProperty(value = "新用户累计创角人数成本(自然量)")
-    private BigDecimal natureNewUserTotalRoleNumCost;
-
-    @ApiModelProperty(value = "首日创角率(自然量)")
-    private BigDecimal natureFirstRoleNumRate;
-
-    @ApiModelProperty(value = "创角率(自然量)")
-    private BigDecimal natureRoleNumRate;
-
-    @ApiModelProperty(value = "新用户累计创角率(自然量)")
-    private BigDecimal natureNewUserTotalRoleNumRate;
-
 }

+ 0 - 505
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/vo/GameDataTotalVO.java

@@ -43,414 +43,12 @@ public class GameDataTotalVO {
     @ApiModelProperty(value = "消耗")
     private BigDecimal cost;
 
-    /**
-     * 买量注册人数
-     */
-    @ApiModelProperty(value = "注册人数(买量)")
-    private Long buyRegNum;
-
-    /**
-     * 自然量注册人数
-     */
-    @ApiModelProperty(value = "注册人数(自然量)")
-    private Long natureRegNum;
-
     /**
      * 注册人数(总)
      */
     @ApiModelProperty(value = "注册人数(总量)")
     private Long regNum;
 
-    /**
-     * 新用户充值次数(买量)
-     */
-    @ApiModelProperty(value = "新用户充值次数(买量)")
-    private Long buyNewUserAmountCount;
-
-    /**
-     * 新用户充值人数(买量)
-     */
-    @ApiModelProperty(value = "新用户充值人数(买量)")
-    private Long buyNewUserAmountNum;
-
-    /**
-     * 新用户充值金额(买量)
-     */
-    @ApiModelProperty(value = "新用户充值金额(买量)")
-    private BigDecimal buyNewUserAmount;
-
-    /**
-     * 首日新用户充值次数(买量)
-     */
-    @ApiModelProperty(value = "首日新用户充值次数(买量)")
-    private Long buyFirstNewUserAmountCount;
-
-    /**
-     * 首日新用户充值人数(买量)
-     */
-    @ApiModelProperty(value = "首日新用户充值人数(买量)")
-    private Long buyFirstNewUserAmountNum;
-
-    /**
-     * 首日新用户充值金额(买量)
-     */
-    @ApiModelProperty(value = "首日新用户充值金额(买量)")
-    private BigDecimal buyFirstNewUserAmount;
-
-    /**
-     * 老用户充值次数(买量)
-     */
-    @ApiModelProperty(value = "老用户充值次数(买量)")
-    private Long buyOldUserCount;
-
-    /**
-     * 老用户充值人数(买量)
-     */
-    @ApiModelProperty(value = "老用户充值人数(买量)")
-    private Long buyOldUserNum;
-
-    /**
-     * 老用户充值金额(买量)
-     */
-    @ApiModelProperty(value = "老用户充值金额(买量)")
-    private BigDecimal buyOldUserAmount;
-
-    /**
-     * 账面充值次数(买量)
-     */
-    @ApiModelProperty(value = "账面充值次数(买量)")
-    private Long buyAmountCount;
-
-    /**
-     * 账面充值人数(买量)
-     */
-    @ApiModelProperty(value = "账面充值人数(买量)")
-    private Long buyAmountNum;
-
-    /**
-     * 账面充值金额(买量)
-     */
-    @ApiModelProperty(value = "账面充值金额(买量)")
-    private BigDecimal buyAmount;
-
-    /**
-     * 新用户累计充值次数(买量)
-     */
-    @ApiModelProperty(value = "新用户累计充值次数(买量)")
-    private Long buyNewUserTotalAmountCount;
-
-    /**
-     * 新用户累计充值人数(买量)
-     */
-    @ApiModelProperty(value = "新用户累计充值人数(买量)")
-    private Long buyNewUserTotalAmountNum;
-
-    /**
-     * 新用户累计充值金额(买量)
-     */
-    @ApiModelProperty(value = "新用户累计充值金额(买量)")
-    private BigDecimal buyNewUserTotalAmount;
-
-    /**
-     * 首日Roi(买量)
-     */
-    @ApiModelProperty(value = "首日Roi(买量)")
-    private BigDecimal buyFirstRoi;
-
-    @ApiModelProperty(value = "首日付费率(买量)")
-    private BigDecimal buyFirstAmountRate;
-
-    /**
-     * 当天付费率(买量)
-     */
-    @ApiModelProperty(value = "当天付费率(买量)")
-    private BigDecimal buyTodayAmountRate;
-
-    /**
-     * 新用户付费率(买量)
-     */
-    @ApiModelProperty(value = "新用户付费率(买量)")
-    private BigDecimal buyNewUserRoi;
-
-    /**
-     * 新用户付费比(买量)
-     */
-    @ApiModelProperty(value = "新用户付费比(买量)")
-    private BigDecimal buyNewUserRate;
-
-    /**
-     * 首日客单价(买量)
-     */
-    @ApiModelProperty(value = "首日客单价(买量)")
-    private BigDecimal buyFirstAvgAmount;
-
-    /**
-     * 当天客单价(买量)
-     */
-    @ApiModelProperty(value = "当天客单价(买量)")
-    private BigDecimal buyTodayAvgAmount;
-
-    /**
-     * 账面客单价(买量)
-     */
-    @ApiModelProperty(value = "账面客单价(买量)")
-    private BigDecimal buyAvgAmount;
-
-    /**
-     * 新用户客单价(买量)
-     */
-    @ApiModelProperty(value = "新用户客单价(买量)")
-    private BigDecimal buyNewUserAvgAmount;
-
-    /**
-     * 复充率(买量)
-     */
-    @ApiModelProperty(value = "复充率(买量)")
-    private BigDecimal buyUserAgainRate;
-
-    /**
-     * 新用户复充率(买量)
-     */
-    @ApiModelProperty(value = "新用户复充率(买量)")
-    private BigDecimal buyNewUserAgainRate;
-
-    /**
-     * 当天复充率(买量)
-     */
-    @ApiModelProperty(value = "当天复充率(买量)")
-    private BigDecimal buyTodayAgainRate;
-
-    /**
-     * 新用户复充人数(买量)(前端不需要显示)
-     */
-    @ApiModelProperty(value = "新用户复充人数(买量)(前端不需要显示)")
-    private Long buyNewUserAgainNum;
-
-    /**
-     * 新增注册ARPU(买量)
-     */
-    @ApiModelProperty(value = "新增注册ARPU(买量)")
-    private BigDecimal buyRegUserArpu;
-
-    /**
-     * 首日付费ARPU(买量)
-     */
-    @ApiModelProperty(value = "首日付费ARPU(买量)")
-    private BigDecimal buyFirstAmountArpu;
-
-    /**
-     * 当天付费ARPU(买量)
-     */
-    @ApiModelProperty(value = "当天付费ARPU(买量)")
-    private BigDecimal buyTodayAmountArpu;
-
-    /**
-     * 账面ARPU(买量)
-     */
-    @ApiModelProperty(value = "账面ARPU(买量)")
-    private BigDecimal buyAmountArpu;
-
-    /**
-     * 新用户付费ARPU(买量)
-     */
-    @ApiModelProperty(value = "新用户付费ARPU(买量)")
-    private BigDecimal buyNewUserAmountArpu;
-
-    /**
-     * 新用户充值次数(自然量)
-     */
-    @ApiModelProperty(value = "新用户充值次数(自然量)")
-    private Long natureNewUserAmountCount;
-
-    /**
-     * 新用户充值人数(自然量)
-     */
-    @ApiModelProperty(value = "新用户充值人数(自然量)")
-    private Long natureNewUserAmountNum;
-
-    /**
-     * 新用户充值金额(自然量)
-     */
-    @ApiModelProperty(value = "新用户充值金额(自然量)")
-    private BigDecimal natureNewUserAmount;
-
-    /**
-     * 首日新用户充值次数(自然量)
-     */
-    @ApiModelProperty(value = "首日新用户充值次数(自然量)")
-    private Long natureFirstNewUserAmountCount;
-
-    /**
-     * 首日新用户充值人数(自然量)
-     */
-    @ApiModelProperty(value = "首日新用户充值人数(自然量)")
-    private Long natureFirstNewUserAmountNum;
-
-    /**
-     * 首日新用户充值金额(自然量)
-     */
-    @ApiModelProperty(value = "首日新用户充值金额(自然量)")
-    private BigDecimal natureFirstNewUserAmount;
-
-    /**
-     * 老用户充值次数(自然量)
-     */
-    @ApiModelProperty(value = "老用户充值次数(自然量)")
-    private Long natureOldUserCount;
-
-    /**
-     * 老用户充值人数(自然量)
-     */
-    @ApiModelProperty(value = "老用户充值人数(自然量)")
-    private Long natureOldUserNum;
-
-    /**
-     * 老用户充值金额(自然量)
-     */
-    @ApiModelProperty(value = "老用户充值金额(自然量)")
-    private BigDecimal natureOldUserAmount;
-
-    /**
-     * 账面充值次数(自然量)
-     */
-    @ApiModelProperty(value = "账面充值次数(自然量)")
-    private Long natureAmountCount;
-
-    /**
-     * 账面充值人数(自然量)
-     */
-    @ApiModelProperty(value = "账面充值人数(自然量)")
-    private Long natureAmountNum;
-
-    /**
-     * 账面充值金额(自然量)
-     */
-    @ApiModelProperty(value = "账面充值金额(自然量)")
-    private BigDecimal natureAmount;
-
-    /**
-     * 新用户累计充值次数(自然量)
-     */
-    @ApiModelProperty(value = "新用户累计充值次数(自然量)")
-    private Long natureNewUserTotalAmountCount;
-
-    /**
-     * 新用户累计充值人数(自然量)
-     */
-    @ApiModelProperty(value = "新用户累计充值人数(自然量)")
-    private Long natureNewUserTotalAmountNum;
-
-    /**
-     * 新用户累计充值金额(自然量)
-     */
-    @ApiModelProperty(value = "新用户累计充值金额(自然量)")
-    private BigDecimal natureNewUserTotalAmount;
-
-    /**
-     * 首日Roi(自然量)
-     */
-    @ApiModelProperty(value = "首日Roi(自然量)")
-    private BigDecimal natureFirstRoi;
-
-    @ApiModelProperty(value = "首日付费率")
-    private BigDecimal natureFirstAmountRate;
-
-    /**
-     * 当天付费率(自然量)
-     */
-    @ApiModelProperty(value = "当天付费率(自然量)")
-    private BigDecimal natureTodayAmountRate;
-
-    /**
-     * 新用户付费率(自然量)
-     */
-    @ApiModelProperty(value = "新用户付费率(自然量)")
-    private BigDecimal natureNewUserRoi;
-
-    /**
-     * 新用户付费比(自然量)
-     */
-    @ApiModelProperty(value = "新用户付费比(自然量)")
-    private BigDecimal natureNewUserRate;
-
-    /**
-     * 首日客单价(自然量)
-     */
-    @ApiModelProperty(value = "首日客单价(自然量)")
-    private BigDecimal natureFirstAvgAmount;
-
-    /**
-     * 当天客单价(自然量)
-     */
-    @ApiModelProperty(value = "当天客单价(自然量)")
-    private BigDecimal natureTodayAvgAmount;
-
-    /**
-     * 账面客单价(自然量)
-     */
-    @ApiModelProperty(value = "账面客单价(自然量)")
-    private BigDecimal natureAvgAmount;
-
-    /**
-     * 新用户客单价(自然量)
-     */
-    @ApiModelProperty(value = "新用户客单价(自然量)")
-    private BigDecimal natureNewUserAvgAmount;
-
-    /**
-     * 复充率(自然量)
-     */
-    @ApiModelProperty(value = "复充率(自然量)")
-    private BigDecimal natureUserAgainRate;
-
-    /**
-     * 新用户复充率(自然量)
-     */
-    @ApiModelProperty(value = "新用户复充率(自然量)")
-    private BigDecimal natureNewUserAgainRate;
-
-    /**
-     * 当天复充率(自然量)
-     */
-    @ApiModelProperty(value = "当天复充率(自然量)")
-    private BigDecimal natureTodayAgainRate;
-
-    /**
-     * 新用户复充人数(自然量)(前端不需要显示)
-     */
-    @ApiModelProperty(value = "新用户复充人数(自然量)(前端不需要显示)")
-    private Long natureNewUserAgainNum;
-
-    /**
-     * 新增注册ARPU(自然量)
-     */
-    @ApiModelProperty(value = "新增注册ARPU(自然量)")
-    private BigDecimal natureRegUserArpu;
-
-    /**
-     * 首日付费ARPU(自然量)
-     */
-    @ApiModelProperty(value = "首日付费ARPU(自然量)")
-    private BigDecimal natureFirstAmountArpu;
-
-    /**
-     * 当天付费ARPU(自然量)
-     */
-    @ApiModelProperty(value = "当天付费ARPU(自然量)")
-    private BigDecimal natureTodayAmountArpu;
-
-    /**
-     * 账面ARPU(自然量)
-     */
-    @ApiModelProperty(value = "账面ARPU(自然量)")
-    private BigDecimal natureAmountArpu;
-
-    /**
-     * 新用户付费ARPU(自然量)
-     */
-    @ApiModelProperty(value = "新用户付费ARPU(自然量)")
-    private BigDecimal natureNewUserAmountArpu;
-
     /**
      * 新用户充值次数(总量)
      */
@@ -665,43 +263,6 @@ public class GameDataTotalVO {
     @ApiModelProperty(value = "新用户充值成本(总量) = 消耗 / 新用户充值人数")
     private BigDecimal newUserRechargeCost;
 
-    @ApiModelProperty(value = "注册成本(买量) = 消耗 / 注册人数")
-    private BigDecimal buyRegCost;
-
-    @ApiModelProperty(value = "总回收率(买量) = 新用户累计充值金额 / 消耗")
-    private BigDecimal buyTotalRoi;
-
-    @ApiModelProperty(value = "首日充值成本(买量) = 消耗 / 首日新用户充值人数")
-    private BigDecimal buyFirstNewUserRechargeCost;
-
-    @ApiModelProperty(value = "总充值成本(买量) = 消耗 / 新用户累计充值人数")
-    private BigDecimal buyTotalRechargeCost;
-
-    @ApiModelProperty(value = "新用户回收率(买量) = 新用户充值今日 / 消耗")
-    private BigDecimal buyNewUserRechargeRate;
-
-    @ApiModelProperty(value = "新用户充值成本(买量) = 消耗 / 新用户充值人数")
-    private BigDecimal buyNewUserRechargeCost;
-
-    @ApiModelProperty(value = "注册成本(自然量) = 消耗 / 注册人数")
-    private BigDecimal natureRegCost;
-
-    @ApiModelProperty(value = "总回收率(自然量) = 新用户累计充值金额 / 消耗")
-    private BigDecimal natureTotalRoi;
-
-    @ApiModelProperty(value = "首日充值成本(自然量) = 消耗 / 首日新用户充值人数")
-    private BigDecimal natureFirstNewUserRechargeCost;
-
-    @ApiModelProperty(value = "总充值成本(自然量) = 消耗 / 新用户累计充值人数")
-    private BigDecimal natureTotalRechargeCost;
-
-    @ApiModelProperty(value = "新用户回收率(自然量) = 新用户充值今日 / 消耗")
-    private BigDecimal natureNewUserRechargeRate;
-
-    @ApiModelProperty(value = "新用户充值成本(自然量) = 消耗 / 新用户充值人数")
-    private BigDecimal natureNewUserRechargeCost;
-
-
     @ApiModelProperty(value = "单日付费100+人数(总量)")
     private Long hundredUserNum;
 
@@ -735,70 +296,4 @@ public class GameDataTotalVO {
     @ApiModelProperty(value = "新用户累计创角率(总量)")
     private BigDecimal newUserTotalRoleNumRate;
 
-    @ApiModelProperty(value = "单日付费100+人数(买量)")
-    private Long buyHundredUserNum;
-
-    @ApiModelProperty(value = "单日付费100+成本 = 消耗 / 单日付费100+人数(买量)")
-    private BigDecimal buyHundredUserNumCost;
-
-    @ApiModelProperty(value = "首日创角人数(买量)")
-    private Long buyFirstRoleNum;
-
-    @ApiModelProperty(value = "创角人数(买量)")
-    private Long buyRoleNum;
-
-    @ApiModelProperty(value = "新用户累计创角人数(买量)")
-    private Long buyNewUserTotalRoleNum;
-
-    @ApiModelProperty(value = "首日创角人数成本(买量)")
-    private BigDecimal buyFirstRoleNumCost;
-
-    @ApiModelProperty(value = "创角人数成本(买量)")
-    private BigDecimal buyRoleNumCost;
-
-    @ApiModelProperty(value = "新用户累计创角人数成本(买量)")
-    private BigDecimal buyNewUserTotalRoleNumCost;
-
-    @ApiModelProperty(value = "首日创角率(买量)")
-    private BigDecimal buyFirstRoleNumRate;
-
-    @ApiModelProperty(value = "创角率(买量)")
-    private BigDecimal buyRoleNumRate;
-
-    @ApiModelProperty(value = "新用户累计创角率(买量)")
-    private BigDecimal buyNewUserTotalRoleNumRate;
-
-    @ApiModelProperty(value = "单日付费100+人数(自然量)")
-    private Long natureHundredUserNum;
-
-    @ApiModelProperty(value = "单日付费100+成本 = 消耗 / 单日付费100+人数(自然量)")
-    private BigDecimal natureHundredUserNumCost;
-
-    @ApiModelProperty(value = "首日创角人数(自然量)")
-    private Long natureFirstRoleNum;
-
-    @ApiModelProperty(value = "创角人数(自然量)")
-    private Long natureRoleNum;
-
-    @ApiModelProperty(value = "新用户累计创角人数(自然量)")
-    private Long natureNewUserTotalRoleNum;
-
-    @ApiModelProperty(value = "首日创角人数成本(自然量)")
-    private BigDecimal natureFirstRoleNumCost;
-
-    @ApiModelProperty(value = "创角人数成本(自然量)")
-    private BigDecimal natureRoleNumCost;
-
-    @ApiModelProperty(value = "新用户累计创角人数成本(自然量)")
-    private BigDecimal natureNewUserTotalRoleNumCost;
-
-    @ApiModelProperty(value = "首日创角率(自然量)")
-    private BigDecimal natureFirstRoleNumRate;
-
-    @ApiModelProperty(value = "创角率(自然量)")
-    private BigDecimal natureRoleNumRate;
-
-    @ApiModelProperty(value = "新用户累计创角率(自然量)")
-    private BigDecimal natureNewUserTotalRoleNumRate;
-
 }

+ 145 - 1286
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/vo/GameMediaDataTotalVO.java

@@ -74,19 +74,97 @@ public class GameMediaDataTotalVO {
     private Long registerNum;
 
     /**
-     * 新增付费次数
+     * 注册成本=实际消耗/注册人数
+     */
+    @ApiModelProperty(value = "注册成本=实际消耗/注册人数")
+    private BigDecimal registerCost;
+
+    /**
+     * 首日创角人数
+     */
+    @ApiModelProperty(value = "首日创角人数")
+    private Long firstRoleNum;
+
+    /**
+     * 新用户累计创角人数
+     */
+    @ApiModelProperty(value = "新用户累计创角人数")
+    private Long newUserTotalRoleNum;
+
+    /**
+     * 创角人数
+     */
+    @ApiModelProperty(value = "创角人数")
+    private Long roleNum;
+
+    /**
+     * 首日创角成本
+     */
+    @ApiModelProperty(value = "首日创角成本")
+    private BigDecimal firstRoleCost;
+
+    /**
+     * 新用户累计创角成本
+     */
+    @ApiModelProperty(value = "新用户累计创角成本")
+    private BigDecimal newUserTotalRoleCost;
+
+    /**
+     * 创角成本
+     */
+    @ApiModelProperty(value = "创角成本")
+    private BigDecimal roleNumCost;
+
+    /**
+     * 首日创角率
+     */
+    @ApiModelProperty(value = "首日创角率")
+    private BigDecimal firstRoleRate;
+
+    /**
+     * 新用户累计创角率
+     */
+    @ApiModelProperty(value = "新用户累计创角率")
+    private BigDecimal newUserTotalRoleRate;
+
+    /**
+     * 创角率
+     */
+    @ApiModelProperty(value = "创角率")
+    private BigDecimal roleNumRate;
+
+    /**
+     * 新用户充值次数
+     */
+    @ApiModelProperty(value = "新用户充值次数")
+    private Long newUserAmountCount;
+
+    /**
+     * 新用户充值人数
+     */
+    @ApiModelProperty(value = "新用户充值人数")
+    private Long newUserAmountNum;
+
+    /**
+     * 新用户充值金额
+     */
+    @ApiModelProperty(value = "新用户充值金额")
+    private BigDecimal newUserAmount;
+
+    /**
+     * 新增付费次数(首日新用户充值次数)
      */
     @ApiModelProperty(value = "新增付费次数")
     private Long firstNewUserAmountCount;
 
     /**
-     * 新增付费人数
+     * 新增付费人数(首日新用户充值人数)
      */
     @ApiModelProperty(value = "新增付费人数")
     private Long firstNewUserAmountNum;
 
     /**
-     * 新增付费金额
+     * 新增付费金额(首日新用户充值金额)
      */
     @ApiModelProperty(value = "新增付费金额")
     private BigDecimal firstNewUserAmount;
@@ -128,19 +206,19 @@ public class GameMediaDataTotalVO {
     private BigDecimal oldAmount;
 
     /**
-     * 至今充值次数
+     * 至今充值次数(新用户累积充值次数)
      */
     @ApiModelProperty(value = "至今充值次数")
     private Long newUserTotalAmountCount;
 
     /**
-     * 至今充值人数
+     * 至今充值人数(新用户累积充值人数)
      */
     @ApiModelProperty(value = "至今充值人数")
     private Long newUserTotalAmountNum;
 
     /**
-     * 至今充值金额
+     * 至今充值金额(新用户累积充值金额)
      */
     @ApiModelProperty(value = "至今充值金额")
     private BigDecimal newUserTotalAmount;
@@ -151,6 +229,12 @@ public class GameMediaDataTotalVO {
     @ApiModelProperty(value = "单日付费100+人数")
     private Long hundredUserNum;
 
+    /**
+     * 单日付费100+成本
+     */
+    @ApiModelProperty(value = "单日付费100+成本")
+    private BigDecimal hundredUserNumCost;
+
     /**
      * 买量新用户累计充值金额
      */
@@ -169,36 +253,6 @@ public class GameMediaDataTotalVO {
     @ApiModelProperty(value = "买量新用户累计充值次数")
     private Long buyNewUserTotalAmountCount;
 
-    /**
-     * 复充人数
-     */
-    @ApiModelProperty(value = "复充人数")
-    private Long regOrderUserAgain;
-
-    /**
-     * 首日创角人数
-     */
-    @ApiModelProperty(value = "首日创角人数")
-    private Long firstRoleNum;
-
-    /**
-     * 新用户累计创角人数
-     */
-    @ApiModelProperty(value = "新用户累计创角人数")
-    private Long newUserTotalRoleNum;
-
-    /**
-     * 创角人数
-     */
-    @ApiModelProperty(value = "创角人数")
-    private Long roleNum;
-
-    /**
-     * 注册成本=实际消耗/注册人数
-     */
-    @ApiModelProperty(value = "注册成本=实际消耗/注册人数")
-    private BigDecimal registerCost;
-
     /**
      * 首日回收率
      */
@@ -212,7 +266,7 @@ public class GameMediaDataTotalVO {
     private BigDecimal buyRoi;
 
     /**
-     * 当日回收率
+     * 当日回收率(至今回收率)
      */
     @ApiModelProperty(value = "当日回收率")
     private BigDecimal todayRoi;
@@ -223,12 +277,24 @@ public class GameMediaDataTotalVO {
     @ApiModelProperty(value = "毛利额,毛利=新用户-实际消耗")
     private BigDecimal grossProfit;
 
+    /**
+     * 新用户回收率
+     */
+    @ApiModelProperty(value = "新用户回收率")
+    private BigDecimal newUserRoi;
+
     /**
      * 首日付费率
      */
     @ApiModelProperty(value = "首日付费率")
     private BigDecimal firstRate;
 
+    /**
+     * 新用户付费率
+     */
+    @ApiModelProperty(value = "新用户付费率")
+    private BigDecimal newUserAmountRate;
+
     /**
      * 买量用户付费率
      */
@@ -241,12 +307,24 @@ public class GameMediaDataTotalVO {
     @ApiModelProperty(value = "当天付费率")
     private BigDecimal todayRate;
 
+    /**
+     * 新用户付费比
+     */
+    @ApiModelProperty(value = "新用户付费比")
+    private BigDecimal newUserAmountRatio;
+
     /**
      * 首日客单价
      */
     @ApiModelProperty(value = "首日客单价")
     private BigDecimal firstAvg;
 
+    /**
+     * 新用户客单价
+     */
+    @ApiModelProperty(value = "新用户客单价")
+    private BigDecimal newUserAvg;
+
     /**
      * 买量客单价
      */
@@ -271,6 +349,12 @@ public class GameMediaDataTotalVO {
     @ApiModelProperty(value = "首日充值成本")
     private BigDecimal firstAmountCost;
 
+    /**
+     * 新用户充值成本
+     */
+    @ApiModelProperty(value = "新用户充值成本")
+    private BigDecimal newUserAmountCost;
+
     /**
      * 买量充值成本
      */
@@ -283,12 +367,30 @@ public class GameMediaDataTotalVO {
     @ApiModelProperty(value = "当天充值成本")
     private BigDecimal todayAmountCost;
 
+    /**
+     * 复充人数
+     */
+    @ApiModelProperty(value = "复充人数")
+    private Long regOrderUserAgain;
+
     /**
      * 当天复充率
      */
     @ApiModelProperty(value = "当天复充率")
     private BigDecimal todayAgainRate;
 
+    /**
+     * 新用户复充人数
+     */
+    @ApiModelProperty(value = "新用户复充人数")
+    private Long newUserOrderAgain;
+
+    /**
+     * 新用户复充率
+     */
+    @ApiModelProperty(value = "新用户复充率")
+    private BigDecimal newUserAgainRate;
+
     /**
      * 新增注册ARPU
      */
@@ -301,6 +403,12 @@ public class GameMediaDataTotalVO {
     @ApiModelProperty(value = "首日付费ARPU")
     private BigDecimal firstArpu;
 
+    /**
+     * 新用户付费ARPU
+     */
+    @ApiModelProperty(value = "新用户付费ARPU")
+    private BigDecimal newUserArpu;
+
     /**
      * 当天付费ARPU
      */
@@ -313,12 +421,6 @@ public class GameMediaDataTotalVO {
     @ApiModelProperty(value = "账面arpu")
     private BigDecimal paperArpu;
 
-    /**
-     * 单日付费100+成本
-     */
-    @ApiModelProperty(value = "单日付费100+成本")
-    private BigDecimal hundredUserNumCost;
-
     /**
      * 1日roi
      */
@@ -529,1247 +631,4 @@ public class GameMediaDataTotalVO {
     @ApiModelProperty(value = "总ROI")
     private BigDecimal roiTotal;
 
-    /**
-     * 投手游戏第1天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第1天新用户充值")
-    private BigDecimal da1;
-
-    /**
-     * 投手游戏第2天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第2天新用户充值")
-    private BigDecimal da2;
-
-    /**
-     * 投手游戏第3天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第3天新用户充值")
-    private BigDecimal da3;
-
-    /**
-     * 投手游戏第4天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第4天新用户充值")
-    private BigDecimal da4;
-
-    /**
-     * 投手游戏第5天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第5天新用户充值")
-    private BigDecimal da5;
-
-    /**
-     * 投手游戏第6天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第6天新用户充值")
-    private BigDecimal da6;
-
-    /**
-     * 投手游戏第7天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第7天新用户充值")
-    private BigDecimal da7;
-
-    /**
-     * 投手游戏第8天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第8天新用户充值")
-    private BigDecimal da8;
-
-    /**
-     * 投手游戏第9天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第9天新用户充值")
-    private BigDecimal da9;
-
-    /**
-     * 投手游戏第10天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第10天新用户充值")
-    private BigDecimal da10;
-
-    /**
-     * 投手游戏第11天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第11天新用户充值")
-    private BigDecimal da11;
-
-    /**
-     * 投手游戏第12天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第12天新用户充值")
-    private BigDecimal da12;
-
-    /**
-     * 投手游戏第13天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第13天新用户充值")
-    private BigDecimal da13;
-
-    /**
-     * 投手游戏第14天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第14天新用户充值")
-    private BigDecimal da14;
-
-    /**
-     * 投手游戏第15天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第15天新用户充值")
-    private BigDecimal da15;
-
-    /**
-     * 投手游戏第16天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第16天新用户充值")
-    private BigDecimal da16;
-
-    /**
-     * 投手游戏第17天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第17天新用户充值")
-    private BigDecimal da17;
-
-    /**
-     * 投手游戏第18天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第18天新用户充值")
-    private BigDecimal da18;
-
-    /**
-     * 投手游戏第19天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第19天新用户充值")
-    private BigDecimal da19;
-
-    /**
-     * 投手游戏第20天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第20天新用户充值")
-    private BigDecimal da20;
-
-    /**
-     * 投手游戏第21天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第21天新用户充值")
-    private BigDecimal da21;
-
-    /**
-     * 投手游戏第22天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第22天新用户充值")
-    private BigDecimal da22;
-
-    /**
-     * 投手游戏第23天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第23天新用户充值")
-    private BigDecimal da23;
-
-    /**
-     * 投手游戏第24天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第24天新用户充值")
-    private BigDecimal da24;
-
-    /**
-     * 投手游戏第25天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第25天新用户充值")
-    private BigDecimal da25;
-
-    /**
-     * 投手游戏第26天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第26天新用户充值")
-    private BigDecimal da26;
-
-    /**
-     * 投手游戏第27天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第27天新用户充值")
-    private BigDecimal da27;
-
-    /**
-     * 投手游戏第28天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第28天新用户充值")
-    private BigDecimal da28;
-
-    /**
-     * 投手游戏第29天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第29天新用户充值")
-    private BigDecimal da29;
-
-    /**
-     * 投手游戏第30天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第30天新用户充值")
-    private BigDecimal da30;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da31;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da32;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da33;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da34;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da35;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da36;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da37;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da38;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da39;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da40;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da41;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da42;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da43;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da44;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da45;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da46;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da47;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da48;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da49;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da50;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da51;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da52;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da53;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da54;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da55;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da56;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da57;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da58;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da59;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da60;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da61;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da62;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da63;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da64;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da65;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da66;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da67;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da68;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da69;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da70;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da71;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da72;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da73;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da74;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da75;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da76;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da77;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da78;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da79;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da80;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da81;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da82;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da83;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da84;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da85;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da86;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da87;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da88;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da89;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da90;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal m4;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal m5;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal m6;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal m7;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal m8;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal m9;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal m10;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal m11;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal m12;
-
-    /**
-     * 至今充值金额
-     */
-    @ApiModelProperty(value = "至今充值金额")
-    private BigDecimal total;
-
-    /**
-     * 投手游戏第1天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第1天新用户人数")
-    private Long da1Num;
-
-    /**
-     * 投手游戏第2天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第2天新用户人数")
-    private Long da2Num;
-
-    /**
-     * 投手游戏第3天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第3天新用户人数")
-    private Long da3Num;
-
-    /**
-     * 投手游戏第4天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第4天新用户人数")
-    private Long da4Num;
-
-    /**
-     * 投手游戏第5天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第5天新用户人数")
-    private Long da5Num;
-
-    /**
-     * 投手游戏第6天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第6天新用户人数")
-    private Long da6Num;
-
-    /**
-     * 投手游戏第7天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第7天新用户人数")
-    private Long da7Num;
-
-    /**
-     * 投手游戏第8天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第8天新用户人数")
-    private Long da8Num;
-
-    /**
-     * 投手游戏第9天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第9天新用户人数")
-    private Long da9Num;
-
-    /**
-     * 投手游戏第10天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第10天新用户人数")
-    private Long da10Num;
-
-    /**
-     * 投手游戏第11天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第11天新用户人数")
-    private Long da11Num;
-
-    /**
-     * 投手游戏第12天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第12天新用户人数")
-    private Long da12Num;
-
-    /**
-     * 投手游戏第13天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第13天新用户人数")
-    private Long da13Num;
-
-    /**
-     * 投手游戏第14天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第14天新用户人数")
-    private Long da14Num;
-
-    /**
-     * 投手游戏第15天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第15天新用户人数")
-    private Long da15Num;
-
-    /**
-     * 投手游戏第16天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第16天新用户人数")
-    private Long da16Num;
-
-    /**
-     * 投手游戏第17天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第17天新用户人数")
-    private Long da17Num;
-
-    /**
-     * 投手游戏第18天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第18天新用户人数")
-    private Long da18Num;
-
-    /**
-     * 投手游戏第19天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第19天新用户人数")
-    private Long da19Num;
-
-    /**
-     * 投手游戏第20天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第20天新用户人数")
-    private Long da20Num;
-
-    /**
-     * 投手游戏第21天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第21天新用户人数")
-    private Long da21Num;
-
-    /**
-     * 投手游戏第22天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第22天新用户人数")
-    private Long da22Num;
-
-    /**
-     * 投手游戏第23天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第23天新用户人数")
-    private Long da23Num;
-
-    /**
-     * 投手游戏第24天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第24天新用户人数")
-    private Long da24Num;
-
-    /**
-     * 投手游戏第25天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第25天新用户人数")
-    private Long da25Num;
-
-    /**
-     * 投手游戏第26天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第26天新用户人数")
-    private Long da26Num;
-
-    /**
-     * 投手游戏第27天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第27天新用户人数")
-    private Long da27Num;
-
-    /**
-     * 投手游戏第28天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第28天新用户人数")
-    private Long da28Num;
-
-    /**
-     * 投手游戏第29天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第29天新用户人数")
-    private Long da29Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da30Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da31Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da32Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da33Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da34Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da35Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da36Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da37Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da38Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da39Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da40Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da41Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da42Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da43Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da44Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da45Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da46Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da47Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da48Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da49Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da50Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da51Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da52Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da53Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da54Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da55Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da56Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da57Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da58Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da59Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da60Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da61Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da62Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da63Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da64Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da65Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da66Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da67Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da68Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da69Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da70Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da71Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da72Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da73Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da74Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da75Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da76Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da77Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da78Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da79Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da80Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da81Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da82Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da83Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da84Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da85Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da86Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da87Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da88Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da89Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da90Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long m4Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long m5Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long m6Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long m7Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long m8Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long m9Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long m10Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long m11Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long m12Num;
-
-    /**
-     * 至今充值人数
-     */
-    @ApiModelProperty(value = "至今充值人数")
-    private Long totalNum;
-
-    /**
-     * 首日创角成本
-     */
-    @ApiModelProperty(value = "首日创角成本")
-    private BigDecimal firstRoleCost;
-
-    /**
-     * 新用户累计创角成本
-     */
-    @ApiModelProperty(value = "新用户累计创角成本")
-    private BigDecimal newUserTotalRoleCost;
-
-    /**
-     * 创角成本
-     */
-    @ApiModelProperty(value = "创角成本")
-    private BigDecimal roleNumCost;
-
-    /**
-     * 首日创角率
-     */
-    @ApiModelProperty(value = "首日创角率")
-    private BigDecimal firstRoleRate;
-
-    /**
-     * 新用户累计创角率
-     */
-    @ApiModelProperty(value = "新用户累计创角率")
-    private BigDecimal newUserTotalRoleRate;
-
-    /**
-     * 创角率
-     */
-    @ApiModelProperty(value = "创角率")
-    private BigDecimal roleNumRate;
-
-    /**
-     * 新用户付费比
-     */
-    @ApiModelProperty(value = "新用户付费比")
-    private BigDecimal newUserAmountRatio;
-
-
 }

+ 46 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/vo/OrderCPDetailVO.java

@@ -0,0 +1,46 @@
+package com.zanxiang.game.data.serve.pojo.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.time.LocalDateTime;
+
+/**
+ * @author tianhua
+ * @time 2023/9/6
+ * @Description 订单详情中的cp回调数据显示实体
+ **/
+@Data
+public class OrderCPDetailVO {
+
+    @ApiModelProperty(notes = "主键id")
+    private Long id;
+
+    @ApiModelProperty(notes = "订单号")
+    private String orderId;
+
+    @ApiModelProperty(notes = "CP订单号")
+    private String cpOrderId;
+
+    @ApiModelProperty(notes = "充值成功标志,1为待处理,2为成功,3为失败")
+    private Integer status;
+
+    @ApiModelProperty(notes = "充值回调标志,1为待处理,2为成功,3为失败")
+    private Integer cpStatus;
+
+    @ApiModelProperty(notes = "CP回调地址")
+    private String cpPaybackUrl;
+
+    @ApiModelProperty(notes = "CP回调参数")
+    private String params;
+
+    @ApiModelProperty(notes = "CP附加参数")
+    private String ext;
+
+    @ApiModelProperty(notes = "通知次数")
+    private Integer notifyCnt;
+
+    @ApiModelProperty(notes = "创建时间")
+    private LocalDateTime createTime;
+
+}

+ 145 - 1287
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/vo/PitcherGameMediaDataTotalVO.java

@@ -4,7 +4,6 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.math.BigDecimal;
-import java.time.LocalDate;
 
 /**
  * @author tianhua
@@ -87,19 +86,97 @@ public class PitcherGameMediaDataTotalVO {
     private Long registerNum;
 
     /**
-     * 新增付费次数
+     * 注册成本=实际消耗/注册人数
+     */
+    @ApiModelProperty(value = "注册成本=实际消耗/注册人数")
+    private BigDecimal registerCost;
+
+    /**
+     * 首日创角人数
+     */
+    @ApiModelProperty(value = "首日创角人数")
+    private Long firstRoleNum;
+
+    /**
+     * 新用户累计创角人数
+     */
+    @ApiModelProperty(value = "新用户累计创角人数")
+    private Long newUserTotalRoleNum;
+
+    /**
+     * 创角人数
+     */
+    @ApiModelProperty(value = "创角人数")
+    private Long roleNum;
+
+    /**
+     * 首日创角成本
+     */
+    @ApiModelProperty(value = "首日创角成本")
+    private BigDecimal firstRoleCost;
+
+    /**
+     * 新用户累计创角成本
+     */
+    @ApiModelProperty(value = "新用户累计创角成本")
+    private BigDecimal newUserTotalRoleCost;
+
+    /**
+     * 创角成本
+     */
+    @ApiModelProperty(value = "创角成本")
+    private BigDecimal roleNumCost;
+
+    /**
+     * 首日创角率
+     */
+    @ApiModelProperty(value = "首日创角率")
+    private BigDecimal firstRoleRate;
+
+    /**
+     * 新用户累计创角率
+     */
+    @ApiModelProperty(value = "新用户累计创角率")
+    private BigDecimal newUserTotalRoleRate;
+
+    /**
+     * 创角率
+     */
+    @ApiModelProperty(value = "创角率")
+    private BigDecimal roleNumRate;
+
+    /**
+     * 新用户充值次数
+     */
+    @ApiModelProperty(value = "新用户充值次数")
+    private Long newUserAmountCount;
+
+    /**
+     * 新用户充值人数
+     */
+    @ApiModelProperty(value = "新用户充值人数")
+    private Long newUserAmountNum;
+
+    /**
+     * 新用户充值金额
+     */
+    @ApiModelProperty(value = "新用户充值金额")
+    private BigDecimal newUserAmount;
+
+    /**
+     * 新增付费次数(首日新用户充值次数)
      */
     @ApiModelProperty(value = "新增付费次数")
     private Long firstNewUserAmountCount;
 
     /**
-     * 新增付费人数
+     * 新增付费人数(首日新用户充值人数)
      */
     @ApiModelProperty(value = "新增付费人数")
     private Long firstNewUserAmountNum;
 
     /**
-     * 新增付费金额
+     * 新增付费金额(首日新用户充值金额)
      */
     @ApiModelProperty(value = "新增付费金额")
     private BigDecimal firstNewUserAmount;
@@ -141,19 +218,19 @@ public class PitcherGameMediaDataTotalVO {
     private BigDecimal oldAmount;
 
     /**
-     * 至今充值次数
+     * 至今充值次数(新用户累积充值次数)
      */
     @ApiModelProperty(value = "至今充值次数")
     private Long newUserTotalAmountCount;
 
     /**
-     * 至今充值人数
+     * 至今充值人数(新用户累积充值人数)
      */
     @ApiModelProperty(value = "至今充值人数")
     private Long newUserTotalAmountNum;
 
     /**
-     * 至今充值金额
+     * 至今充值金额(新用户累积充值金额)
      */
     @ApiModelProperty(value = "至今充值金额")
     private BigDecimal newUserTotalAmount;
@@ -164,6 +241,12 @@ public class PitcherGameMediaDataTotalVO {
     @ApiModelProperty(value = "单日付费100+人数")
     private Long hundredUserNum;
 
+    /**
+     * 单日付费100+成本
+     */
+    @ApiModelProperty(value = "单日付费100+成本")
+    private BigDecimal hundredUserNumCost;
+
     /**
      * 买量新用户累计充值金额
      */
@@ -182,36 +265,6 @@ public class PitcherGameMediaDataTotalVO {
     @ApiModelProperty(value = "买量新用户累计充值次数")
     private Long buyNewUserTotalAmountCount;
 
-    /**
-     * 复充人数
-     */
-    @ApiModelProperty(value = "复充人数")
-    private Long regOrderUserAgain;
-
-    /**
-     * 首日创角人数
-     */
-    @ApiModelProperty(value = "首日创角人数")
-    private Long firstRoleNum;
-
-    /**
-     * 新用户累计创角人数
-     */
-    @ApiModelProperty(value = "新用户累计创角人数")
-    private Long newUserTotalRoleNum;
-
-    /**
-     * 创角人数
-     */
-    @ApiModelProperty(value = "创角人数")
-    private Long roleNum;
-
-    /**
-     * 注册成本=实际消耗/注册人数
-     */
-    @ApiModelProperty(value = "注册成本=实际消耗/注册人数")
-    private BigDecimal registerCost;
-
     /**
      * 首日回收率
      */
@@ -225,7 +278,7 @@ public class PitcherGameMediaDataTotalVO {
     private BigDecimal buyRoi;
 
     /**
-     * 当日回收率
+     * 当日回收率(至今回收率)
      */
     @ApiModelProperty(value = "当日回收率")
     private BigDecimal todayRoi;
@@ -236,12 +289,24 @@ public class PitcherGameMediaDataTotalVO {
     @ApiModelProperty(value = "毛利额,毛利=新用户-实际消耗")
     private BigDecimal grossProfit;
 
+    /**
+     * 新用户回收率
+     */
+    @ApiModelProperty(value = "新用户回收率")
+    private BigDecimal newUserRoi;
+
     /**
      * 首日付费率
      */
     @ApiModelProperty(value = "首日付费率")
     private BigDecimal firstRate;
 
+    /**
+     * 新用户付费率
+     */
+    @ApiModelProperty(value = "新用户付费率")
+    private BigDecimal newUserAmountRate;
+
     /**
      * 买量用户付费率
      */
@@ -254,12 +319,24 @@ public class PitcherGameMediaDataTotalVO {
     @ApiModelProperty(value = "当天付费率")
     private BigDecimal todayRate;
 
+    /**
+     * 新用户付费比
+     */
+    @ApiModelProperty(value = "新用户付费比")
+    private BigDecimal newUserAmountRatio;
+
     /**
      * 首日客单价
      */
     @ApiModelProperty(value = "首日客单价")
     private BigDecimal firstAvg;
 
+    /**
+     * 新用户客单价
+     */
+    @ApiModelProperty(value = "新用户客单价")
+    private BigDecimal newUserAvg;
+
     /**
      * 买量客单价
      */
@@ -284,6 +361,12 @@ public class PitcherGameMediaDataTotalVO {
     @ApiModelProperty(value = "首日充值成本")
     private BigDecimal firstAmountCost;
 
+    /**
+     * 新用户充值成本
+     */
+    @ApiModelProperty(value = "新用户充值成本")
+    private BigDecimal newUserAmountCost;
+
     /**
      * 买量充值成本
      */
@@ -296,12 +379,30 @@ public class PitcherGameMediaDataTotalVO {
     @ApiModelProperty(value = "当天充值成本")
     private BigDecimal todayAmountCost;
 
+    /**
+     * 复充人数
+     */
+    @ApiModelProperty(value = "复充人数")
+    private Long regOrderUserAgain;
+
     /**
      * 当天复充率
      */
     @ApiModelProperty(value = "当天复充率")
     private BigDecimal todayAgainRate;
 
+    /**
+     * 新用户复充人数
+     */
+    @ApiModelProperty(value = "新用户复充人数")
+    private Long newUserOrderAgain;
+
+    /**
+     * 新用户复充率
+     */
+    @ApiModelProperty(value = "新用户复充率")
+    private BigDecimal newUserAgainRate;
+
     /**
      * 新增注册ARPU
      */
@@ -314,6 +415,12 @@ public class PitcherGameMediaDataTotalVO {
     @ApiModelProperty(value = "首日付费ARPU")
     private BigDecimal firstArpu;
 
+    /**
+     * 新用户付费ARPU
+     */
+    @ApiModelProperty(value = "新用户付费ARPU")
+    private BigDecimal newUserArpu;
+
     /**
      * 当天付费ARPU
      */
@@ -326,12 +433,6 @@ public class PitcherGameMediaDataTotalVO {
     @ApiModelProperty(value = "账面arpu")
     private BigDecimal paperArpu;
 
-    /**
-     * 单日付费100+成本
-     */
-    @ApiModelProperty(value = "单日付费100+成本")
-    private BigDecimal hundredUserNumCost;
-
     /**
      * 1日roi
      */
@@ -542,1247 +643,4 @@ public class PitcherGameMediaDataTotalVO {
     @ApiModelProperty(value = "总ROI")
     private BigDecimal roiTotal;
 
-    /**
-     * 投手游戏第1天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第1天新用户充值")
-    private BigDecimal da1;
-
-    /**
-     * 投手游戏第2天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第2天新用户充值")
-    private BigDecimal da2;
-
-    /**
-     * 投手游戏第3天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第3天新用户充值")
-    private BigDecimal da3;
-
-    /**
-     * 投手游戏第4天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第4天新用户充值")
-    private BigDecimal da4;
-
-    /**
-     * 投手游戏第5天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第5天新用户充值")
-    private BigDecimal da5;
-
-    /**
-     * 投手游戏第6天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第6天新用户充值")
-    private BigDecimal da6;
-
-    /**
-     * 投手游戏第7天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第7天新用户充值")
-    private BigDecimal da7;
-
-    /**
-     * 投手游戏第8天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第8天新用户充值")
-    private BigDecimal da8;
-
-    /**
-     * 投手游戏第9天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第9天新用户充值")
-    private BigDecimal da9;
-
-    /**
-     * 投手游戏第10天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第10天新用户充值")
-    private BigDecimal da10;
-
-    /**
-     * 投手游戏第11天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第11天新用户充值")
-    private BigDecimal da11;
-
-    /**
-     * 投手游戏第12天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第12天新用户充值")
-    private BigDecimal da12;
-
-    /**
-     * 投手游戏第13天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第13天新用户充值")
-    private BigDecimal da13;
-
-    /**
-     * 投手游戏第14天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第14天新用户充值")
-    private BigDecimal da14;
-
-    /**
-     * 投手游戏第15天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第15天新用户充值")
-    private BigDecimal da15;
-
-    /**
-     * 投手游戏第16天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第16天新用户充值")
-    private BigDecimal da16;
-
-    /**
-     * 投手游戏第17天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第17天新用户充值")
-    private BigDecimal da17;
-
-    /**
-     * 投手游戏第18天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第18天新用户充值")
-    private BigDecimal da18;
-
-    /**
-     * 投手游戏第19天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第19天新用户充值")
-    private BigDecimal da19;
-
-    /**
-     * 投手游戏第20天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第20天新用户充值")
-    private BigDecimal da20;
-
-    /**
-     * 投手游戏第21天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第21天新用户充值")
-    private BigDecimal da21;
-
-    /**
-     * 投手游戏第22天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第22天新用户充值")
-    private BigDecimal da22;
-
-    /**
-     * 投手游戏第23天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第23天新用户充值")
-    private BigDecimal da23;
-
-    /**
-     * 投手游戏第24天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第24天新用户充值")
-    private BigDecimal da24;
-
-    /**
-     * 投手游戏第25天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第25天新用户充值")
-    private BigDecimal da25;
-
-    /**
-     * 投手游戏第26天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第26天新用户充值")
-    private BigDecimal da26;
-
-    /**
-     * 投手游戏第27天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第27天新用户充值")
-    private BigDecimal da27;
-
-    /**
-     * 投手游戏第28天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第28天新用户充值")
-    private BigDecimal da28;
-
-    /**
-     * 投手游戏第29天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第29天新用户充值")
-    private BigDecimal da29;
-
-    /**
-     * 投手游戏第30天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第30天新用户充值")
-    private BigDecimal da30;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da31;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da32;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da33;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da34;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da35;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da36;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da37;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da38;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da39;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da40;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da41;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da42;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da43;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da44;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da45;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da46;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da47;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da48;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da49;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da50;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da51;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da52;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da53;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da54;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da55;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da56;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da57;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da58;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da59;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da60;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da61;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da62;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da63;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da64;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da65;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da66;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da67;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da68;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da69;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da70;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da71;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da72;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da73;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da74;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da75;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da76;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da77;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da78;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da79;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da80;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da81;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da82;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da83;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da84;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da85;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da86;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da87;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da88;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da89;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da90;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal m4;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal m5;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal m6;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal m7;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal m8;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal m9;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal m10;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal m11;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal m12;
-
-    /**
-     * 至今充值金额
-     */
-    @ApiModelProperty(value = "至今充值金额")
-    private BigDecimal total;
-
-    /**
-     * 投手游戏第1天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第1天新用户人数")
-    private Long da1Num;
-
-    /**
-     * 投手游戏第2天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第2天新用户人数")
-    private Long da2Num;
-
-    /**
-     * 投手游戏第3天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第3天新用户人数")
-    private Long da3Num;
-
-    /**
-     * 投手游戏第4天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第4天新用户人数")
-    private Long da4Num;
-
-    /**
-     * 投手游戏第5天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第5天新用户人数")
-    private Long da5Num;
-
-    /**
-     * 投手游戏第6天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第6天新用户人数")
-    private Long da6Num;
-
-    /**
-     * 投手游戏第7天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第7天新用户人数")
-    private Long da7Num;
-
-    /**
-     * 投手游戏第8天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第8天新用户人数")
-    private Long da8Num;
-
-    /**
-     * 投手游戏第9天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第9天新用户人数")
-    private Long da9Num;
-
-    /**
-     * 投手游戏第10天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第10天新用户人数")
-    private Long da10Num;
-
-    /**
-     * 投手游戏第11天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第11天新用户人数")
-    private Long da11Num;
-
-    /**
-     * 投手游戏第12天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第12天新用户人数")
-    private Long da12Num;
-
-    /**
-     * 投手游戏第13天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第13天新用户人数")
-    private Long da13Num;
-
-    /**
-     * 投手游戏第14天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第14天新用户人数")
-    private Long da14Num;
-
-    /**
-     * 投手游戏第15天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第15天新用户人数")
-    private Long da15Num;
-
-    /**
-     * 投手游戏第16天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第16天新用户人数")
-    private Long da16Num;
-
-    /**
-     * 投手游戏第17天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第17天新用户人数")
-    private Long da17Num;
-
-    /**
-     * 投手游戏第18天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第18天新用户人数")
-    private Long da18Num;
-
-    /**
-     * 投手游戏第19天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第19天新用户人数")
-    private Long da19Num;
-
-    /**
-     * 投手游戏第20天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第20天新用户人数")
-    private Long da20Num;
-
-    /**
-     * 投手游戏第21天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第21天新用户人数")
-    private Long da21Num;
-
-    /**
-     * 投手游戏第22天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第22天新用户人数")
-    private Long da22Num;
-
-    /**
-     * 投手游戏第23天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第23天新用户人数")
-    private Long da23Num;
-
-    /**
-     * 投手游戏第24天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第24天新用户人数")
-    private Long da24Num;
-
-    /**
-     * 投手游戏第25天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第25天新用户人数")
-    private Long da25Num;
-
-    /**
-     * 投手游戏第26天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第26天新用户人数")
-    private Long da26Num;
-
-    /**
-     * 投手游戏第27天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第27天新用户人数")
-    private Long da27Num;
-
-    /**
-     * 投手游戏第28天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第28天新用户人数")
-    private Long da28Num;
-
-    /**
-     * 投手游戏第29天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第29天新用户人数")
-    private Long da29Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da30Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da31Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da32Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da33Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da34Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da35Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da36Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da37Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da38Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da39Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da40Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da41Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da42Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da43Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da44Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da45Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da46Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da47Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da48Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da49Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da50Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da51Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da52Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da53Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da54Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da55Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da56Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da57Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da58Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da59Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da60Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da61Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da62Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da63Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da64Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da65Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da66Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da67Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da68Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da69Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da70Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da71Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da72Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da73Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da74Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da75Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da76Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da77Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da78Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da79Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da80Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da81Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da82Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da83Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da84Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da85Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da86Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da87Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da88Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da89Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da90Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long m4Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long m5Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long m6Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long m7Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long m8Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long m9Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long m10Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long m11Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long m12Num;
-
-    /**
-     * 至今充值人数
-     */
-    @ApiModelProperty(value = "至今充值人数")
-    private Long totalNum;
-
-    /**
-     * 首日创角成本
-     */
-    @ApiModelProperty(value = "首日创角成本")
-    private BigDecimal firstRoleCost;
-
-    /**
-     * 新用户累计创角成本
-     */
-    @ApiModelProperty(value = "新用户累计创角成本")
-    private BigDecimal newUserTotalRoleCost;
-
-    /**
-     * 创角成本
-     */
-    @ApiModelProperty(value = "创角成本")
-    private BigDecimal roleNumCost;
-
-    /**
-     * 首日创角率
-     */
-    @ApiModelProperty(value = "首日创角率")
-    private BigDecimal firstRoleRate;
-
-    /**
-     * 新用户累计创角率
-     */
-    @ApiModelProperty(value = "新用户累计创角率")
-    private BigDecimal newUserTotalRoleRate;
-
-    /**
-     * 创角率
-     */
-    @ApiModelProperty(value = "创角率")
-    private BigDecimal roleNumRate;
-
-    /**
-     * 新用户付费比
-     */
-    @ApiModelProperty(value = "新用户付费比")
-    private BigDecimal newUserAmountRatio;
-
-
 }

+ 145 - 1286
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/vo/PitcherMediaDataTotalVO.java

@@ -62,19 +62,97 @@ public class PitcherMediaDataTotalVO {
     private Long registerNum;
 
     /**
-     * 新增付费次数
+     * 注册成本=实际消耗/注册人数
+     */
+    @ApiModelProperty(value = "注册成本=实际消耗/注册人数")
+    private BigDecimal registerCost;
+
+    /**
+     * 首日创角人数
+     */
+    @ApiModelProperty(value = "首日创角人数")
+    private Long firstRoleNum;
+
+    /**
+     * 新用户累计创角人数
+     */
+    @ApiModelProperty(value = "新用户累计创角人数")
+    private Long newUserTotalRoleNum;
+
+    /**
+     * 创角人数
+     */
+    @ApiModelProperty(value = "创角人数")
+    private Long roleNum;
+
+    /**
+     * 首日创角成本
+     */
+    @ApiModelProperty(value = "首日创角成本")
+    private BigDecimal firstRoleCost;
+
+    /**
+     * 新用户累计创角成本
+     */
+    @ApiModelProperty(value = "新用户累计创角成本")
+    private BigDecimal newUserTotalRoleCost;
+
+    /**
+     * 创角成本
+     */
+    @ApiModelProperty(value = "创角成本")
+    private BigDecimal roleNumCost;
+
+    /**
+     * 首日创角率
+     */
+    @ApiModelProperty(value = "首日创角率")
+    private BigDecimal firstRoleRate;
+
+    /**
+     * 新用户累计创角率
+     */
+    @ApiModelProperty(value = "新用户累计创角率")
+    private BigDecimal newUserTotalRoleRate;
+
+    /**
+     * 创角率
+     */
+    @ApiModelProperty(value = "创角率")
+    private BigDecimal roleNumRate;
+
+    /**
+     * 新用户充值次数
+     */
+    @ApiModelProperty(value = "新用户充值次数")
+    private Long newUserAmountCount;
+
+    /**
+     * 新用户充值人数
+     */
+    @ApiModelProperty(value = "新用户充值人数")
+    private Long newUserAmountNum;
+
+    /**
+     * 新用户充值金额
+     */
+    @ApiModelProperty(value = "新用户充值金额")
+    private BigDecimal newUserAmount;
+
+    /**
+     * 新增付费次数(首日新用户充值次数)
      */
     @ApiModelProperty(value = "新增付费次数")
     private Long firstNewUserAmountCount;
 
     /**
-     * 新增付费人数
+     * 新增付费人数(首日新用户充值人数)
      */
     @ApiModelProperty(value = "新增付费人数")
     private Long firstNewUserAmountNum;
 
     /**
-     * 新增付费金额
+     * 新增付费金额(首日新用户充值金额)
      */
     @ApiModelProperty(value = "新增付费金额")
     private BigDecimal firstNewUserAmount;
@@ -116,19 +194,19 @@ public class PitcherMediaDataTotalVO {
     private BigDecimal oldAmount;
 
     /**
-     * 至今充值次数
+     * 至今充值次数(新用户累积充值次数)
      */
     @ApiModelProperty(value = "至今充值次数")
     private Long newUserTotalAmountCount;
 
     /**
-     * 至今充值人数
+     * 至今充值人数(新用户累积充值人数)
      */
     @ApiModelProperty(value = "至今充值人数")
     private Long newUserTotalAmountNum;
 
     /**
-     * 至今充值金额
+     * 至今充值金额(新用户累积充值金额)
      */
     @ApiModelProperty(value = "至今充值金额")
     private BigDecimal newUserTotalAmount;
@@ -139,6 +217,12 @@ public class PitcherMediaDataTotalVO {
     @ApiModelProperty(value = "单日付费100+人数")
     private Long hundredUserNum;
 
+    /**
+     * 单日付费100+成本
+     */
+    @ApiModelProperty(value = "单日付费100+成本")
+    private BigDecimal hundredUserNumCost;
+
     /**
      * 买量新用户累计充值金额
      */
@@ -157,36 +241,6 @@ public class PitcherMediaDataTotalVO {
     @ApiModelProperty(value = "买量新用户累计充值次数")
     private Long buyNewUserTotalAmountCount;
 
-    /**
-     * 复充人数
-     */
-    @ApiModelProperty(value = "复充人数")
-    private Long regOrderUserAgain;
-
-    /**
-     * 首日创角人数
-     */
-    @ApiModelProperty(value = "首日创角人数")
-    private Long firstRoleNum;
-
-    /**
-     * 新用户累计创角人数
-     */
-    @ApiModelProperty(value = "新用户累计创角人数")
-    private Long newUserTotalRoleNum;
-
-    /**
-     * 创角人数
-     */
-    @ApiModelProperty(value = "创角人数")
-    private Long roleNum;
-
-    /**
-     * 注册成本=实际消耗/注册人数
-     */
-    @ApiModelProperty(value = "注册成本=实际消耗/注册人数")
-    private BigDecimal registerCost;
-
     /**
      * 首日回收率
      */
@@ -200,7 +254,7 @@ public class PitcherMediaDataTotalVO {
     private BigDecimal buyRoi;
 
     /**
-     * 当日回收率
+     * 当日回收率(至今回收率)
      */
     @ApiModelProperty(value = "当日回收率")
     private BigDecimal todayRoi;
@@ -211,12 +265,24 @@ public class PitcherMediaDataTotalVO {
     @ApiModelProperty(value = "毛利额,毛利=新用户-实际消耗")
     private BigDecimal grossProfit;
 
+    /**
+     * 新用户回收率
+     */
+    @ApiModelProperty(value = "新用户回收率")
+    private BigDecimal newUserRoi;
+
     /**
      * 首日付费率
      */
     @ApiModelProperty(value = "首日付费率")
     private BigDecimal firstRate;
 
+    /**
+     * 新用户付费率
+     */
+    @ApiModelProperty(value = "新用户付费率")
+    private BigDecimal newUserAmountRate;
+
     /**
      * 买量用户付费率
      */
@@ -229,12 +295,24 @@ public class PitcherMediaDataTotalVO {
     @ApiModelProperty(value = "当天付费率")
     private BigDecimal todayRate;
 
+    /**
+     * 新用户付费比
+     */
+    @ApiModelProperty(value = "新用户付费比")
+    private BigDecimal newUserAmountRatio;
+
     /**
      * 首日客单价
      */
     @ApiModelProperty(value = "首日客单价")
     private BigDecimal firstAvg;
 
+    /**
+     * 新用户客单价
+     */
+    @ApiModelProperty(value = "新用户客单价")
+    private BigDecimal newUserAvg;
+
     /**
      * 买量客单价
      */
@@ -259,6 +337,12 @@ public class PitcherMediaDataTotalVO {
     @ApiModelProperty(value = "首日充值成本")
     private BigDecimal firstAmountCost;
 
+    /**
+     * 新用户充值成本
+     */
+    @ApiModelProperty(value = "新用户充值成本")
+    private BigDecimal newUserAmountCost;
+
     /**
      * 买量充值成本
      */
@@ -271,12 +355,30 @@ public class PitcherMediaDataTotalVO {
     @ApiModelProperty(value = "当天充值成本")
     private BigDecimal todayAmountCost;
 
+    /**
+     * 复充人数
+     */
+    @ApiModelProperty(value = "复充人数")
+    private Long regOrderUserAgain;
+
     /**
      * 当天复充率
      */
     @ApiModelProperty(value = "当天复充率")
     private BigDecimal todayAgainRate;
 
+    /**
+     * 新用户复充人数
+     */
+    @ApiModelProperty(value = "新用户复充人数")
+    private Long newUserOrderAgain;
+
+    /**
+     * 新用户复充率
+     */
+    @ApiModelProperty(value = "新用户复充率")
+    private BigDecimal newUserAgainRate;
+
     /**
      * 新增注册ARPU
      */
@@ -289,6 +391,12 @@ public class PitcherMediaDataTotalVO {
     @ApiModelProperty(value = "首日付费ARPU")
     private BigDecimal firstArpu;
 
+    /**
+     * 新用户付费ARPU
+     */
+    @ApiModelProperty(value = "新用户付费ARPU")
+    private BigDecimal newUserArpu;
+
     /**
      * 当天付费ARPU
      */
@@ -301,12 +409,6 @@ public class PitcherMediaDataTotalVO {
     @ApiModelProperty(value = "账面arpu")
     private BigDecimal paperArpu;
 
-    /**
-     * 单日付费100+成本
-     */
-    @ApiModelProperty(value = "单日付费100+成本")
-    private BigDecimal hundredUserNumCost;
-
     /**
      * 1日roi
      */
@@ -517,1247 +619,4 @@ public class PitcherMediaDataTotalVO {
     @ApiModelProperty(value = "总ROI")
     private BigDecimal roiTotal;
 
-    /**
-     * 投手游戏第1天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第1天新用户充值")
-    private BigDecimal da1;
-
-    /**
-     * 投手游戏第2天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第2天新用户充值")
-    private BigDecimal da2;
-
-    /**
-     * 投手游戏第3天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第3天新用户充值")
-    private BigDecimal da3;
-
-    /**
-     * 投手游戏第4天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第4天新用户充值")
-    private BigDecimal da4;
-
-    /**
-     * 投手游戏第5天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第5天新用户充值")
-    private BigDecimal da5;
-
-    /**
-     * 投手游戏第6天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第6天新用户充值")
-    private BigDecimal da6;
-
-    /**
-     * 投手游戏第7天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第7天新用户充值")
-    private BigDecimal da7;
-
-    /**
-     * 投手游戏第8天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第8天新用户充值")
-    private BigDecimal da8;
-
-    /**
-     * 投手游戏第9天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第9天新用户充值")
-    private BigDecimal da9;
-
-    /**
-     * 投手游戏第10天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第10天新用户充值")
-    private BigDecimal da10;
-
-    /**
-     * 投手游戏第11天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第11天新用户充值")
-    private BigDecimal da11;
-
-    /**
-     * 投手游戏第12天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第12天新用户充值")
-    private BigDecimal da12;
-
-    /**
-     * 投手游戏第13天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第13天新用户充值")
-    private BigDecimal da13;
-
-    /**
-     * 投手游戏第14天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第14天新用户充值")
-    private BigDecimal da14;
-
-    /**
-     * 投手游戏第15天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第15天新用户充值")
-    private BigDecimal da15;
-
-    /**
-     * 投手游戏第16天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第16天新用户充值")
-    private BigDecimal da16;
-
-    /**
-     * 投手游戏第17天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第17天新用户充值")
-    private BigDecimal da17;
-
-    /**
-     * 投手游戏第18天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第18天新用户充值")
-    private BigDecimal da18;
-
-    /**
-     * 投手游戏第19天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第19天新用户充值")
-    private BigDecimal da19;
-
-    /**
-     * 投手游戏第20天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第20天新用户充值")
-    private BigDecimal da20;
-
-    /**
-     * 投手游戏第21天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第21天新用户充值")
-    private BigDecimal da21;
-
-    /**
-     * 投手游戏第22天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第22天新用户充值")
-    private BigDecimal da22;
-
-    /**
-     * 投手游戏第23天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第23天新用户充值")
-    private BigDecimal da23;
-
-    /**
-     * 投手游戏第24天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第24天新用户充值")
-    private BigDecimal da24;
-
-    /**
-     * 投手游戏第25天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第25天新用户充值")
-    private BigDecimal da25;
-
-    /**
-     * 投手游戏第26天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第26天新用户充值")
-    private BigDecimal da26;
-
-    /**
-     * 投手游戏第27天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第27天新用户充值")
-    private BigDecimal da27;
-
-    /**
-     * 投手游戏第28天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第28天新用户充值")
-    private BigDecimal da28;
-
-    /**
-     * 投手游戏第29天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第29天新用户充值")
-    private BigDecimal da29;
-
-    /**
-     * 投手游戏第30天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第30天新用户充值")
-    private BigDecimal da30;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da31;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da32;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da33;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da34;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da35;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da36;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da37;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da38;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da39;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da40;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da41;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da42;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da43;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da44;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da45;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da46;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da47;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da48;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da49;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da50;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da51;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da52;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da53;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da54;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da55;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da56;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da57;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da58;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da59;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da60;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da61;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da62;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da63;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da64;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da65;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da66;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da67;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da68;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da69;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da70;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da71;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da72;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da73;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da74;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da75;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da76;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da77;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da78;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da79;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da80;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da81;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da82;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da83;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da84;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da85;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da86;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da87;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da88;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da89;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal da90;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal m4;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal m5;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal m6;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal m7;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal m8;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal m9;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal m10;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal m11;
-
-    /**
-     * 投手游戏第N天新用户充值
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值")
-    private BigDecimal m12;
-
-    /**
-     * 至今充值金额
-     */
-    @ApiModelProperty(value = "至今充值金额")
-    private BigDecimal total;
-
-    /**
-     * 投手游戏第1天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第1天新用户人数")
-    private Long da1Num;
-
-    /**
-     * 投手游戏第2天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第2天新用户人数")
-    private Long da2Num;
-
-    /**
-     * 投手游戏第3天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第3天新用户人数")
-    private Long da3Num;
-
-    /**
-     * 投手游戏第4天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第4天新用户人数")
-    private Long da4Num;
-
-    /**
-     * 投手游戏第5天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第5天新用户人数")
-    private Long da5Num;
-
-    /**
-     * 投手游戏第6天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第6天新用户人数")
-    private Long da6Num;
-
-    /**
-     * 投手游戏第7天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第7天新用户人数")
-    private Long da7Num;
-
-    /**
-     * 投手游戏第8天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第8天新用户人数")
-    private Long da8Num;
-
-    /**
-     * 投手游戏第9天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第9天新用户人数")
-    private Long da9Num;
-
-    /**
-     * 投手游戏第10天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第10天新用户人数")
-    private Long da10Num;
-
-    /**
-     * 投手游戏第11天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第11天新用户人数")
-    private Long da11Num;
-
-    /**
-     * 投手游戏第12天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第12天新用户人数")
-    private Long da12Num;
-
-    /**
-     * 投手游戏第13天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第13天新用户人数")
-    private Long da13Num;
-
-    /**
-     * 投手游戏第14天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第14天新用户人数")
-    private Long da14Num;
-
-    /**
-     * 投手游戏第15天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第15天新用户人数")
-    private Long da15Num;
-
-    /**
-     * 投手游戏第16天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第16天新用户人数")
-    private Long da16Num;
-
-    /**
-     * 投手游戏第17天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第17天新用户人数")
-    private Long da17Num;
-
-    /**
-     * 投手游戏第18天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第18天新用户人数")
-    private Long da18Num;
-
-    /**
-     * 投手游戏第19天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第19天新用户人数")
-    private Long da19Num;
-
-    /**
-     * 投手游戏第20天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第20天新用户人数")
-    private Long da20Num;
-
-    /**
-     * 投手游戏第21天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第21天新用户人数")
-    private Long da21Num;
-
-    /**
-     * 投手游戏第22天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第22天新用户人数")
-    private Long da22Num;
-
-    /**
-     * 投手游戏第23天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第23天新用户人数")
-    private Long da23Num;
-
-    /**
-     * 投手游戏第24天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第24天新用户人数")
-    private Long da24Num;
-
-    /**
-     * 投手游戏第25天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第25天新用户人数")
-    private Long da25Num;
-
-    /**
-     * 投手游戏第26天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第26天新用户人数")
-    private Long da26Num;
-
-    /**
-     * 投手游戏第27天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第27天新用户人数")
-    private Long da27Num;
-
-    /**
-     * 投手游戏第28天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第28天新用户人数")
-    private Long da28Num;
-
-    /**
-     * 投手游戏第29天新用户人数
-     */
-    @ApiModelProperty(value = "投手游戏第29天新用户人数")
-    private Long da29Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da30Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da31Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da32Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da33Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da34Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da35Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da36Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da37Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da38Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da39Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da40Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da41Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da42Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da43Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da44Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da45Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da46Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da47Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da48Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da49Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da50Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da51Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da52Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da53Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da54Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da55Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da56Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da57Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da58Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da59Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da60Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da61Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da62Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da63Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da64Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da65Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da66Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da67Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da68Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da69Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da70Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da71Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da72Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da73Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da74Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da75Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da76Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da77Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da78Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da79Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da80Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da81Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da82Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da83Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da84Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da85Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da86Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da87Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da88Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da89Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long da90Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long m4Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long m5Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long m6Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long m7Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long m8Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long m9Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long m10Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long m11Num;
-
-    /**
-     * 投手游戏第N天新用户充值人数
-     */
-    @ApiModelProperty(value = "投手游戏第N天新用户充值人数")
-    private Long m12Num;
-
-    /**
-     * 至今充值人数
-     */
-    @ApiModelProperty(value = "至今充值人数")
-    private Long totalNum;
-
-    /**
-     * 首日创角成本
-     */
-    @ApiModelProperty(value = "首日创角成本")
-    private BigDecimal firstRoleCost;
-
-    /**
-     * 新用户累计创角成本
-     */
-    @ApiModelProperty(value = "新用户累计创角成本")
-    private BigDecimal newUserTotalRoleCost;
-
-    /**
-     * 创角成本
-     */
-    @ApiModelProperty(value = "创角成本")
-    private BigDecimal roleNumCost;
-
-    /**
-     * 首日创角率
-     */
-    @ApiModelProperty(value = "首日创角率")
-    private BigDecimal firstRoleRate;
-
-    /**
-     * 新用户累计创角率
-     */
-    @ApiModelProperty(value = "新用户累计创角率")
-    private BigDecimal newUserTotalRoleRate;
-
-    /**
-     * 创角率
-     */
-    @ApiModelProperty(value = "创角率")
-    private BigDecimal roleNumRate;
-
-    /**
-     * 新用户付费比
-     */
-    @ApiModelProperty(value = "新用户付费比")
-    private BigDecimal newUserAmountRatio;
-
-
 }

+ 9 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/vo/PlayerDataVO.java

@@ -0,0 +1,9 @@
+package com.zanxiang.game.data.serve.pojo.vo;
+
+/**
+ * @author tianhua
+ * @time 2023/9/6
+ * @Description 返给前端的玩家列表实体(玩家列表、玩家列表总计使用)
+ **/
+public class PlayerDataVO {
+}

+ 9 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/vo/PlayerRoleDataVO.java

@@ -0,0 +1,9 @@
+package com.zanxiang.game.data.serve.pojo.vo;
+
+/**
+ * @author tianhua
+ * @time 2023/9/6
+ * @Description 返给前端的玩家角色列表实体(玩家角色列表、玩家角色列表总计使用)
+ **/
+public class PlayerRoleDataVO {
+}

+ 4 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/IAdsOrderDetailService.java

@@ -1,9 +1,11 @@
 package com.zanxiang.game.data.serve.service;
 
+import com.zanxiang.game.data.serve.pojo.dto.AdsOrderDetailDTO;
 import com.zanxiang.game.data.serve.pojo.dto.AdsOrderDetailListDTO;
 import com.zanxiang.game.data.serve.pojo.dto.AdsOrderDetailTotalDTO;
 import com.zanxiang.game.data.serve.pojo.vo.AdsOrderDetailTotalVO;
 import com.zanxiang.game.data.serve.pojo.vo.AdsOrderDetailVO;
+import com.zanxiang.game.data.serve.pojo.vo.OrderCPDetailVO;
 import com.zanxiang.game.data.serve.utils.Page;
 
 public interface IAdsOrderDetailService {
@@ -11,4 +13,6 @@ public interface IAdsOrderDetailService {
     Page<AdsOrderDetailVO> listOfPage(AdsOrderDetailListDTO dto);
 
     AdsOrderDetailTotalVO orderTotal(AdsOrderDetailTotalDTO dto);
+
+    Page<OrderCPDetailVO> getOrderDetailList(AdsOrderDetailDTO dto);
 }

+ 46 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/IPlayerDataService.java

@@ -0,0 +1,46 @@
+package com.zanxiang.game.data.serve.service;
+
+import com.zanxiang.game.data.serve.pojo.dto.PlayerDataListDTO;
+import com.zanxiang.game.data.serve.pojo.dto.PlayerDataListTotalDTO;
+import com.zanxiang.game.data.serve.pojo.dto.PlayerRoleDataListDTO;
+import com.zanxiang.game.data.serve.pojo.dto.PlayerRoleDataListTotalDTO;
+import com.zanxiang.game.data.serve.pojo.vo.PlayerDataVO;
+import com.zanxiang.game.data.serve.pojo.vo.PlayerRoleDataVO;
+import com.zanxiang.game.data.serve.utils.Page;
+
+/**
+ * @author tianhua
+ * @time 2023/9/6
+ * @Description
+ **/
+public interface IPlayerDataService {
+
+    /**
+     * 玩家列表
+     * @param dto PlayerDataListDTO
+     * @return Page<PlayerDataVO>
+     */
+    Page<PlayerDataVO> getPlayerDataList(PlayerDataListDTO dto);
+
+    /**
+     * 玩家列表总计一栏
+     * @param dto PlayerDataListTotalDTO
+     * @return PlayerDataVO
+     */
+    PlayerDataVO getPlayerDataListTotal(PlayerDataListTotalDTO dto);
+
+    /**
+     * 玩家角色列表
+     * @param dto PlayerRoleDataListDTO
+     * @return Page<PlayerRoleDataVO>
+     */
+    Page<PlayerRoleDataVO> getPlayerRoleDataList(PlayerRoleDataListDTO dto);
+
+    /**
+     * 玩家角色列表总计一栏
+     * @param dto PlayerRoleDataListTotalDTO
+     * @return PlayerRoleDataVO
+     */
+    PlayerRoleDataVO getPlayerRoleDataListTotal(PlayerRoleDataListTotalDTO dto);
+
+}

+ 26 - 25
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/AccountAgentDayServiceImpl.java

@@ -2,7 +2,6 @@ package com.zanxiang.game.data.serve.service.impl;
 
 import com.google.common.base.CaseFormat;
 import com.google.gson.Gson;
-import com.zanxiang.erp.security.util.SecurityUtil;
 import com.zanxiang.game.data.serve.component.DataPowerComponent;
 import com.zanxiang.game.data.serve.pojo.dto.*;
 import com.zanxiang.game.data.serve.pojo.entity.AdsAccountAgentDay;
@@ -51,18 +50,12 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
 
     @Override
     public Page<GamePromoteDayVO> accountAgentDay(GamePromoteDayDTO dto) {
-        long[] userIds = dto.getSysUserId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getSysUserId()};
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> userIds = dto.getSysUserId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getSysUserId());
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
 
         /*Long sysUserId = SecurityUtil.isAdmin() ? null : SecurityUtil.getUserId();
         sysUserId = null == dto.getSysUserId() ? sysUserId : dto.getSysUserId();
         dto.setSysUserId(sysUserId);*/
-        if (StringUtils.isBlank(dto.getSortFiled())) {
-            dto.setSortFiled("dt");
-        }
-        if (StringUtils.isBlank(dto.getSortType())) {
-            dto.setSortType(OrderByEnum.DESC.getOrderType());
-        }
         if (null == dto.getBeginDay() || null == dto.getEndDay()) {
             dto.setBeginDay(LocalDate.now());
             dto.setEndDay(LocalDate.now());
@@ -72,7 +65,7 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
         SimpleCriteria cri = Cnd.cri();
         // 组装条件
         if (userIds != null) {
-            cri.where().andIn("pitcher_id", userIds);
+            cri.where().andInList("pitcher_id", userIds);
         }
         if (StringUtils.isNotBlank(dto.getAccountId())) {
             cri.where().andEquals("account_id", dto.getAccountId());
@@ -90,7 +83,7 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
             cri.where().andLike("game_name", dto.getGameName());
         }
         if (gameIds != null) {
-            cri.where().andIn("game_id", gameIds);
+            cri.where().andInList("game_id", gameIds);
         }
         if (StringUtils.isNotBlank(dto.getGameType())) {
             cri.where().andEquals("game_type", dto.getGameType());
@@ -104,7 +97,15 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
             cri.where().andEquals("source_system", dto.getSourceSystem());
         }
-        cri.orderBy(CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, dto.getSortFiled()), dto.getSortType());
+        if (StringUtils.isBlank(dto.getSortType())) {
+            dto.setSortType(OrderByEnum.DESC.getOrderType());
+        }
+        if (StringUtils.isBlank(dto.getSortFiled())) {
+            cri.getOrderBy().orderBy("dt", dto.getSortType());
+            cri.getOrderBy().orderBy("cost", dto.getSortType());
+        } else {
+            cri.orderBy(CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, dto.getSortFiled()), dto.getSortType());
+        }
         Sql sql = Sqls.queryEntity(accountAgentDaySql() + "$condition");
         sql.setPager(pager);
         Entity<GamePromoteDayVO> entity = dao.getEntity(GamePromoteDayVO.class);
@@ -243,8 +244,8 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
 
     @Override
     public GamePromoteDayTotalVO accountAgentDayTotal(GamePromoteDayTotalDTO dto) {
-        long[] userIds = dto.getSysUserId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getSysUserId()};
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> userIds = dto.getSysUserId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getSysUserId());
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
 
         /*Long sysUserId = SecurityUtil.isAdmin() ? null : SecurityUtil.getUserId();
         sysUserId = null == dto.getSysUserId() ? sysUserId : dto.getSysUserId();
@@ -257,7 +258,7 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
         SimpleCriteria cri = Cnd.cri();
         // 组装条件
         if (null != userIds) {
-            cri.where().andIn("pitcher_id", userIds);
+            cri.where().andInList("pitcher_id", userIds);
         }
         if (StringUtils.isNotBlank(dto.getAccountId())) {
             cri.where().andEquals("account_id", dto.getAccountId());
@@ -278,7 +279,7 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
             cri.where().andEquals("game_type", dto.getGameType());
         }
         if (gameIds != null) {
-            cri.where().andIn("game_id", gameIds);
+            cri.where().andInList("game_id", gameIds);
         }
         if (null != dto.getBeginDay()) {
             cri.where().and("dt", ">=", dto.getBeginDay());
@@ -450,8 +451,8 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
 
     @Override
     public Page<GamePromoteTotalVO> accountAgentTotal(GamePromoteTotalDTO dto) {
-        long[] userIds = dto.getSysUserId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getSysUserId()};
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> userIds = dto.getSysUserId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getSysUserId());
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
         /*Long sysUserId = SecurityUtil.isAdmin() ? null : SecurityUtil.getUserId();
         sysUserId = null == dto.getSysUserId() ? sysUserId : dto.getSysUserId();
         dto.setSysUserId(sysUserId);*/
@@ -474,7 +475,7 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
         SimpleCriteria cri = Cnd.cri();
         // 组装条件
         if (userIds != null) {
-            cri.where().andIn("a.pitcher_id", userIds);
+            cri.where().andInList("a.pitcher_id", userIds);
         }
         if (StringUtils.isNotBlank(dto.getAccountId())) {
             cri.where().andEquals("a.account_id", dto.getAccountId());
@@ -501,7 +502,7 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
             cri.where().and("a.dt", "<=", dto.getCostEndDay());
         }
         if (null != gameIds) {
-            cri.where().andIn("a.game_id", gameIds);
+            cri.where().andInList("a.game_id", gameIds);
         }
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
             cri.where().andEquals("a.source_system", dto.getSourceSystem());
@@ -849,8 +850,8 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
 
     @Override
     public GamePromoteTotalSumVO accountAgentTotalSum(GamePromoteTotalSumDTO dto) {
-        long[] userIds = dto.getSysUserId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getSysUserId()};
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> userIds = dto.getSysUserId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getSysUserId());
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
         /*Long sysUserId = SecurityUtil.isAdmin() ? null : SecurityUtil.getUserId();
         sysUserId = null == dto.getSysUserId() ? sysUserId : dto.getSysUserId();
         dto.setSysUserId(sysUserId);*/
@@ -1131,11 +1132,11 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
         return gamePromoteTotalSumVO;
     }
 
-    private SimpleCriteria getSimpleCriteria(long[] userIds, long[] gameIds, GamePromoteTotalSumDTO dto) {
+    private SimpleCriteria getSimpleCriteria(List<Long> userIds, List<Long> gameIds, GamePromoteTotalSumDTO dto) {
         SimpleCriteria cri = Cnd.cri();
         // 组装条件
         if (null != userIds) {
-            cri.where().andIn("a.pitcher_id", userIds);
+            cri.where().andInList("a.pitcher_id", userIds);
         }
         if (StringUtils.isNotBlank(dto.getAccountId())) {
             cri.where().andEquals("a.account_id", dto.getAccountId());
@@ -1156,7 +1157,7 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
             cri.where().andEquals("a.game_type", dto.getGameType());
         }
         if (null != gameIds) {
-            cri.where().andIn("a.game_id", gameIds);
+            cri.where().andInList("a.game_id", gameIds);
         }
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
             cri.where().andEquals("a.source_system", dto.getSourceSystem());

+ 5 - 4
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/AdsAccountRechargeRankingServiceImpl.java

@@ -24,6 +24,7 @@ import org.springframework.stereotype.Service;
 
 import java.math.BigDecimal;
 import java.math.RoundingMode;
+import java.util.Collections;
 import java.util.List;
 
 @Slf4j
@@ -37,8 +38,8 @@ public class AdsAccountRechargeRankingServiceImpl implements IAdsAccountRecharge
 
     @Override
     public Page<AdsAccountRechargeRankingVO> listOfPage(AdsAccountRechargeRankingListDTO dto) {
-        long[] userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getPitcherId()};
-        long[] gameIds = dto.getPitcherId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
+        List<Long> gameIds = dto.getPitcherId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
         if (StringUtils.isBlank(dto.getSortFiled())) {
             dto.setSortFiled("cost");
         }
@@ -74,13 +75,13 @@ public class AdsAccountRechargeRankingServiceImpl implements IAdsAccountRecharge
             cri.where().and("dt", ">=", dto.getBeginDay()).and("dt", "<=", dto.getEndDay());
         }
         if (userIds != null) {
-            cri.where().andIn("pitcher_id", userIds);
+            cri.where().andInList("pitcher_id", userIds);
         }
         if (StringUtils.isNotBlank(dto.getAccountId())) {
             cri.where().and("account_id", "=", dto.getAccountId());
         }
         if (gameIds != null) {
-            cri.where().andIn("game_id", gameIds);
+            cri.where().andInList("game_id", gameIds);
         }
         if (StringUtils.isNotBlank(dto.getType())) {
             cri.where().and("type", "=", dto.getType());

+ 3 - 2
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/AdsAgentRechargeRankingServiceImpl.java

@@ -25,6 +25,7 @@ import org.springframework.stereotype.Service;
 
 import java.math.BigDecimal;
 import java.math.RoundingMode;
+import java.util.Collections;
 import java.util.List;
 
 @Slf4j
@@ -37,7 +38,7 @@ public class AdsAgentRechargeRankingServiceImpl implements IAdsAgentRechargeRank
     private DataPowerComponent dataPowerComponent;
 
     public Page<AdsAgentRechargeRankingVO> listOfPage(AdsAgentRechargeRankingListDTO dto) {
-        long[] userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getPitcherId()};
+        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
         if (StringUtils.isBlank(dto.getSortFiled())) {
             dto.setSortFiled("today_amount");
         }
@@ -64,7 +65,7 @@ public class AdsAgentRechargeRankingServiceImpl implements IAdsAgentRechargeRank
             cri.where().and("agent_id", "=", dto.getAgentId());
         }
         if (userIds != null) {
-            cri.where().andIn("pitcher_id", userIds);
+            cri.where().andInList("pitcher_id", userIds);
         }
         if (StringUtils.isNotBlank(dto.getType())) {
             cri.where().and("type", "=", dto.getType());

+ 57 - 15
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/AdsOrderDetailService.java

@@ -2,17 +2,20 @@ package com.zanxiang.game.data.serve.service.impl;
 
 import com.zanxiang.erp.security.util.SecurityUtil;
 import com.zanxiang.game.data.serve.component.DataPowerComponent;
+import com.zanxiang.game.data.serve.pojo.dto.AdsOrderDetailDTO;
 import com.zanxiang.game.data.serve.pojo.dto.AdsOrderDetailListDTO;
 import com.zanxiang.game.data.serve.pojo.dto.AdsOrderDetailTotalDTO;
 import com.zanxiang.game.data.serve.pojo.entity.AdsOrderDetail;
+import com.zanxiang.game.data.serve.pojo.entity.TPayCallCpLog;
 import com.zanxiang.game.data.serve.pojo.enums.OrderByEnum;
 import com.zanxiang.game.data.serve.pojo.vo.AdsOrderDetailTotalVO;
 import com.zanxiang.game.data.serve.pojo.vo.AdsOrderDetailVO;
+import com.zanxiang.game.data.serve.pojo.vo.OrderCPDetailVO;
 import com.zanxiang.game.data.serve.service.IAdsOrderDetailService;
 import com.zanxiang.game.data.serve.utils.Page;
 import com.zanxiang.module.util.bean.BeanUtil;
 import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.lang3.ArrayUtils;
+import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.nutz.dao.Cnd;
 import org.nutz.dao.Dao;
@@ -23,6 +26,7 @@ import org.nutz.dao.sql.Sql;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.Collections;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -37,8 +41,8 @@ public class AdsOrderDetailService implements IAdsOrderDetailService {
 
     @Override
     public Page<AdsOrderDetailVO> listOfPage(AdsOrderDetailListDTO dto) {
-        long[] userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{Long.parseLong(dto.getPitcherId())};
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{Long.parseLong(dto.getGameId())};
+        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(Long.parseLong(dto.getPitcherId()));
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : dto.getGameId();
         if (StringUtils.isBlank(dto.getPitcherId()) && !SecurityUtil.isManager()) {
             // 只有管理员才能查看全部数据
             dto.setPitcherId(SecurityUtil.getUserId().toString());
@@ -67,16 +71,16 @@ public class AdsOrderDetailService implements IAdsOrderDetailService {
             cri.where().andEquals("server_name", dto.getServerName());
         }
         if (gameIds != null) {
-            cri.where().andIn("order_game_id", gameIds);
+            cri.where().andInList("order_game_id", gameIds);
         }
-        if (ArrayUtils.isNotEmpty(dto.getChannelId())) {
-            cri.where().andIn("agent_id", dto.getChannelId());
+        if (CollectionUtils.isNotEmpty(dto.getChannelId())) {
+            cri.where().andInStrList("agent_id", dto.getChannelId());
         }
         if (StringUtils.isNotBlank(dto.getAccountId())) {
             cri.where().andEquals("account_id", dto.getAccountId());
         }
         if (userIds != null) {
-            cri.where().andIn("zx_pitcher_id", userIds);
+            cri.where().andInList("zx_pitcher_id", userIds);
         }
         if (StringUtils.isNotBlank(dto.getDeviceSystem())) {
             cri.where().andEquals("os", dto.getDeviceSystem());
@@ -122,8 +126,8 @@ public class AdsOrderDetailService implements IAdsOrderDetailService {
             dto.setSortType(OrderByEnum.DESC.getOrderType());
         }
         if (StringUtils.isBlank(dto.getSortFiled())) {
-            cri.getOrderBy().orderBy("day", dto.getSortType());
-            cri.getOrderBy().orderBy("order_create_time", dto.getSortType());
+            cri.getOrderBy().orderBy("day", dto.getSortType())
+                    .orderBy("order_create_time", dto.getSortType());
         } else {
             cri.getOrderBy().orderBy(dto.getSortFiled(), dto.getSortType());
         }
@@ -134,8 +138,8 @@ public class AdsOrderDetailService implements IAdsOrderDetailService {
 
     @Override
     public AdsOrderDetailTotalVO orderTotal(AdsOrderDetailTotalDTO dto) {
-        long[] userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{Long.parseLong(dto.getPitcherId())};
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{Long.parseLong(dto.getGameId())};
+        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(Long.parseLong(dto.getPitcherId()));
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : dto.getGameId();
         /*if (StringUtils.isBlank(dto.getPitcherId()) && !SecurityUtil.isManager()) {
             // 只有管理员才能查看全部数据
             dto.setPitcherId(SecurityUtil.getUserId().toString());
@@ -163,16 +167,16 @@ public class AdsOrderDetailService implements IAdsOrderDetailService {
             cri.where().andEquals("server_name", dto.getServerName());
         }
         if (gameIds != null) {
-            cri.where().andIn("order_game_id", gameIds);
+            cri.where().andInList("order_game_id", gameIds);
         }
-        if (ArrayUtils.isNotEmpty(dto.getChannelId())) {
-            cri.where().andIn("agent_id", dto.getChannelId());
+        if (CollectionUtils.isNotEmpty(dto.getChannelId())) {
+            cri.where().andInStrList("agent_id", dto.getChannelId());
         }
         if (StringUtils.isNotBlank(dto.getAccountId())) {
             cri.where().andEquals("account_id", dto.getAccountId());
         }
         if (userIds != null) {
-            cri.where().andIn("zx_pitcher_id", userIds);
+            cri.where().andInList("zx_pitcher_id", userIds);
         }
         if (StringUtils.isNotBlank(dto.getDeviceSystem())) {
             cri.where().andEquals("os", dto.getDeviceSystem());
@@ -227,6 +231,30 @@ public class AdsOrderDetailService implements IAdsOrderDetailService {
         return sql.getObject(AdsOrderDetailTotalVO.class);
     }
 
+    @Override
+    public Page<OrderCPDetailVO> getOrderDetailList(AdsOrderDetailDTO dto) {
+        //未传递参数,显示空结果
+        if (StringUtils.isBlank(dto.getOrderId())) {
+            return null;
+        }
+        //查询条件
+        Criteria cri = Cnd.cri();
+        cri.where().andEquals("order_id", dto.getOrderId());
+        //拼接默认排序条件
+        cri.getOrderBy().desc("create_time");
+        //pager对象
+        Pager pager = dto.toPage();
+        //得到查询的结果
+        List<OrderCPDetailVO> records = dao.query(TPayCallCpLog.class, cri, pager).stream().map(this::toVO).collect(Collectors.toList());
+        pager.setRecordCount(dao.count(TPayCallCpLog.class, cri));
+        return new Page<>(records, pager);
+    }
+
+    /**
+     * 订单详情列表
+     * @param gameOrder 原始表中的数据
+     * @return AdsOrderDetailVO
+     */
     private AdsOrderDetailVO toVO(AdsOrderDetail gameOrder) {
         if (gameOrder == null) {
             return null;
@@ -237,4 +265,18 @@ public class AdsOrderDetailService implements IAdsOrderDetailService {
         }
         return BeanUtil.copy(gameOrder, AdsOrderDetailVO.class);
     }
+
+    /**
+     * cp回调信息
+     * @param tPayCallCpLog 原始表中的数据
+     * @return OrderCPDetailVO
+     */
+    private OrderCPDetailVO toVO(TPayCallCpLog tPayCallCpLog) {
+        if (tPayCallCpLog == null) {
+            return null;
+        }
+        return BeanUtil.copy(tPayCallCpLog, OrderCPDetailVO.class);
+    }
+
+
 }

Diff do ficheiro suprimidas por serem muito extensas
+ 374 - 389
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/GameDataServiceImpl.java


+ 4 - 4
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/GameServerServiceImpl.java

@@ -128,13 +128,13 @@ public class GameServerServiceImpl implements IGameServerService {
      */
     @Override
     public Page<GameServerDayVO> getGameServerDataDay(GameServerDayDTO dto) {
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
 
         //创建查询条件
         Criteria cri = Cnd.cri();
         if (gameIds != null) {
             //拼接游戏ID查询条件
-            cri.where().andIn("game_id", gameIds);
+            cri.where().andInList("game_id", gameIds);
         }
         if (dto.getServerId() != null) {
             //拼接区服ID查询条件
@@ -192,12 +192,12 @@ public class GameServerServiceImpl implements IGameServerService {
      */
     @Override
     public GameServerDayTotalVO getGameServerDataDayTotal(GameServerDayTotalDTO dto) {
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
         //创建查询条件
         Criteria cri = Cnd.cri();
         if (gameIds != null) {
             //拼接游戏ID查询条件
-            cri.where().andIn("game_id", gameIds);
+            cri.where().andInList("game_id", gameIds);
         }
         if (dto.getServerId() != null) {
             //拼接区服ID查询条件

+ 4 - 4
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/IActiveDataServiceImpl.java

@@ -126,7 +126,7 @@ public class IActiveDataServiceImpl implements IActiveDataService {
      */
     @Override
     public Page<ActiveDataDayVO> getActiveDataDay(ActiveDataDayDTO dto) {
-        long[] userGameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> userGameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
         //默认查询总数据
         if (StringUtils.isBlank(dto.getTableTypes())) {
             dto.setTableTypes("total");
@@ -156,7 +156,7 @@ public class IActiveDataServiceImpl implements IActiveDataService {
         Criteria cri = Cnd.cri();
         //拼接游戏ID
         if (userGameIds != null) {
-            cri.where().andIn("game_id", userGameIds);
+            cri.where().andInList("game_id", userGameIds);
         }
         //拼接游戏应用类型
         if (dto.getClassify() != null) {
@@ -217,7 +217,7 @@ public class IActiveDataServiceImpl implements IActiveDataService {
      */
     @Override
     public ActiveDataTotalVO getActiveDataTotal(ActiveDataTotalDTO dto) {
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
         //默认查询总数据
         if (StringUtils.isBlank(dto.getTableTypes())) {
             dto.setTableTypes("total");
@@ -236,7 +236,7 @@ public class IActiveDataServiceImpl implements IActiveDataService {
         Criteria cri = Cnd.cri();
         //拼接游戏ID
         if (gameIds != null) {
-            cri.where().andIn("game_id", gameIds);
+            cri.where().andInList("game_id", gameIds);
         }
         //拼接游戏应用类型
         if (dto.getClassify() != null) {

Diff do ficheiro suprimidas por serem muito extensas
+ 1849 - 138
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/IMediaDataServiceImpl.java


+ 8 - 13
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/OverallSummaryServiceImpl.java

@@ -24,6 +24,7 @@ import java.math.RoundingMode;
 import java.time.LocalDate;
 import java.time.temporal.ChronoUnit;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -50,8 +51,8 @@ public class OverallSummaryServiceImpl implements IOverallSummaryService {
      */
     @Override
     public OverallSummaryVO getOverallSummaryTotalData(OverallSummaryDTO dto) {
-        long[] userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getPitcherId()};
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
 
         //创建返回给前端的对象
         OverallSummaryVO overallSummaryVO = new OverallSummaryVO();
@@ -149,8 +150,8 @@ public class OverallSummaryServiceImpl implements IOverallSummaryService {
      */
     @Override
     public Map<String, List> getOverallSummaryLineData(OverallSummaryDTO dto) {
-        long[] userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getPitcherId()};
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
 
         //根据条件获取数据
         Condition lineCon = myCondition(userIds, gameIds, dto, true, true, -1);
@@ -213,13 +214,13 @@ public class OverallSummaryServiceImpl implements IOverallSummaryService {
      * @param queryDays     拼接需要查询数据的天数条件(给今日昨日、首日Roi、7日Roi以及30日Roi使用)
      * @return Condition 查询条件
      */
-    private Condition myCondition(long[] userIds, long[] gameIds, OverallSummaryDTO dto, Boolean needGameId, Boolean needLocalDate, Integer queryDays) {
+    private Condition myCondition(List<Long> userIds, List<Long> gameIds, OverallSummaryDTO dto, Boolean needGameId, Boolean needLocalDate, Integer queryDays) {
 
         Criteria cri = Cnd.cri();
         //默认查询条件
         if (gameIds != null && needGameId) {
             //拼接游戏查询条件
-            cri.where().andIn("game_id", gameIds);
+            cri.where().andInList("game_id", gameIds);
         }
         if (dto.getAgentId() != null) {
             //拼接渠道查询条件
@@ -236,13 +237,7 @@ public class OverallSummaryServiceImpl implements IOverallSummaryService {
         //前端传递 pitcherId 根据 pitcherId 查询
         if (userIds != null) {
             //拼接投手查询条件
-            cri.where().andIn("pitcher_id", userIds);
-        } else if (SecurityUtil.isManager()) {
-            //前端没有传递 pitcherId 参数并且是管理员 查看所有数据 排除掉 pitcherId = -2 的数据
-            cri.where().andNotEquals("pitcher_id", -2);
-        } else {
-            //前端没有传递 pitcherId 并且不是管理员 只能看自己的数据
-            cri.where().andEquals("pitcher_id", SecurityUtil.getUserId());
+            cri.where().andInList("pitcher_id", userIds);
         }
 
         //根据参数拼接条件

+ 40 - 40
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/PitcherDataServiceImpl.java

@@ -202,7 +202,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
      */
     @Override
     public Page<PitcherDataDayVO> getPitcherDataDay(PitcherDataDayDTO dto) {
-        long[] userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getPitcherId()};
+        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
         //不传递时间,默认查询当天
         if (dto.getBeginDate() == null || dto.getEndDate() == null) {
             dto.setBeginDate(LocalDate.now());
@@ -211,7 +211,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
         //创建查询条件
         Criteria cri = Cnd.cri();
         if (userIds != null) {
-            cri.where().andIn("pitcher_id", userIds);
+            cri.where().andInList("pitcher_id", userIds);
         }
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
             cri.where().andEquals("source_system", dto.getSourceSystem());
@@ -260,7 +260,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
      */
     @Override
     public PitcherDataDayTotalVO getPitcherDataDayTotal(PitcherDataDayTotalDTO dto) {
-        long[] userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getPitcherId()};
+        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
         //不传递时间,默认查询当天
         if (dto.getBeginDate() == null || dto.getEndDate() == null) {
             dto.setBeginDate(LocalDate.now());
@@ -269,7 +269,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
         //创建查询条件
         Criteria cri = Cnd.cri();
         if (userIds != null) {
-            cri.where().andIn("pitcher_id", userIds);
+            cri.where().andInList("pitcher_id", userIds);
         }
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
             cri.where().andEquals("source_system", dto.getSourceSystem());
@@ -301,7 +301,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
      */
     @Override
     public Page<PitcherDataTotalVO> getPitcherDataTotal(PitcherDataTotalDTO dto) {
-        long[] userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getPitcherId()};
+        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
         //如果注册时间参数为空,默认设置查询当天数据
         if (dto.getBeginDate() == null || dto.getEndDate() == null) {
             dto.setBeginDate(LocalDate.now());
@@ -392,7 +392,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
      */
     @Override
     public PitcherDataTotalSumVO getPitcherDataTotalSum(PitcherDataTotalSumDTO dto) {
-        long[] userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getPitcherId()};
+        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
         //如果注册时间参数为空,默认设置查询当天数据
         if (dto.getBeginDate() == null || dto.getEndDate() == null) {
             dto.setBeginDate(LocalDate.now());
@@ -482,8 +482,8 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
      */
     @Override
     public Page<PitcherGameDataDayVO> getPitcherGameDataDay(PitcherGameDataDayDTO dto) {
-        long[] userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getPitcherId()};
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{Long.parseLong(dto.getGameId())};
+        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(Long.parseLong(dto.getGameId()));
         //不传递时间,默认查询当天
         if (dto.getBeginDate() == null || dto.getEndDate() == null) {
             dto.setBeginDate(LocalDate.now());
@@ -492,10 +492,10 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
         //创建查询条件
         Criteria cri = Cnd.cri();
         if (userIds != null) {
-            cri.where().andIn("pitcher_id", userIds);
+            cri.where().andInList("pitcher_id", userIds);
         }
         if (gameIds != null) {
-            cri.where().andIn("game_id", gameIds);
+            cri.where().andInList("game_id", gameIds);
         }
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
             cri.where().andEquals("source_system", dto.getSourceSystem());
@@ -551,8 +551,8 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
      */
     @Override
     public PitcherGameDataDayTotalVO getPitcherGameDataDayTotal(PitcherGameDataDayTotalDTO dto) {
-        long[] userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getPitcherId()};
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{Long.parseLong(dto.getGameId())};
+        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(Long.parseLong(dto.getGameId()));
         //不传递时间,默认查询当天
         if (dto.getBeginDate() == null || dto.getEndDate() == null) {
             dto.setBeginDate(LocalDate.now());
@@ -561,10 +561,10 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
         //创建查询条件
         Criteria cri = Cnd.cri();
         if (userIds != null) {
-            cri.where().andIn("pitcher_id", userIds);
+            cri.where().andInList("pitcher_id", userIds);
         }
         if (gameIds != null) {
-            cri.where().andIn("game_id", gameIds);
+            cri.where().andInList("game_id", gameIds);
         }
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
             cri.where().andEquals("source_system", dto.getSourceSystem());
@@ -602,8 +602,8 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
      */
     @Override
     public Page<PitcherGameDataTotalVO> getPitcherGameDataTotal(PitcherGameDataTotalDTO dto) {
-        long[] userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getPitcherId()};
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{Long.parseLong(dto.getGameId())};
+        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(Long.parseLong(dto.getGameId()));
         //如果注册时间参数为空,默认设置查询当天数据
         if (dto.getBeginDate() == null || dto.getEndDate() == null) {
             dto.setBeginDate(LocalDate.now());
@@ -700,8 +700,8 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
      */
     @Override
     public PitcherGameDataTotalSumVO getPitcherGameDataTotalSum(PitcherGameDataTotalSumDTO dto) {
-        long[] userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getPitcherId()};
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{Long.parseLong(dto.getGameId())};
+        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(Long.parseLong(dto.getGameId()));
         //如果注册时间参数为空,默认设置查询当天数据
         if (dto.getBeginDate() == null || dto.getEndDate() == null) {
             dto.setBeginDate(LocalDate.now());
@@ -1031,12 +1031,12 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
      * @param needGroupBy 是否需要分组条件
      * @return 查询条件
      */
-    private Criteria myCri(long[] userIds, long[] gameIds, PitcherGameDataTotalDTO dto, String type, Boolean needGroupBy) {
+    private Criteria myCri(List<Long> userIds, List<Long> gameIds, PitcherGameDataTotalDTO dto, String type, Boolean needGroupBy) {
         //根据传入的dto拼接查询参数
         Criteria cri = Cnd.cri();
         if (gameIds != null) {
             //拼接游戏id查询条件
-            cri.where().andIn("game_id", gameIds);
+            cri.where().andInList("game_id", gameIds);
         }
         if (StringUtils.isNotBlank(dto.getGameCp())) {
             //拼接游戏cp方
@@ -1052,7 +1052,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
         }
         if (userIds != null) {
             //拼接投手ID
-            cri.where().andIn("pitcher_id", userIds);
+            cri.where().andInList("pitcher_id", userIds);
         }
         //根据type拼接不同的时间查询条件
         if (type.equals("criA")) {
@@ -1166,7 +1166,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
      * @param needGroupBy 是否需要分组条件
      * @return 查询条件
      */
-    private Criteria myCriPitcher(long[] userIds, PitcherDataTotalDTO dto, String type, Boolean needGroupBy) {
+    private Criteria myCriPitcher(List<Long> userIds, PitcherDataTotalDTO dto, String type, Boolean needGroupBy) {
         //根据传入的dto拼接查询参数
         Criteria cri = Cnd.cri();
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
@@ -1175,7 +1175,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
         }
         if (userIds != null) {
             //拼接投手ID
-            cri.where().andIn("pitcher_id", userIds);
+            cri.where().andInList("pitcher_id", userIds);
         }
         //根据type拼接不同的时间查询条件
         if (type.equals("criA")) {
@@ -1204,7 +1204,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
      * @param needRegTime 是否需要拼接注册时间
      * @return 查询条件
      */
-    private Criteria myCriRechargePitcher(long[] userIds, PitcherDataTotalDTO dto, Boolean needRegTime) {
+    private Criteria myCriRechargePitcher(List<Long> userIds, PitcherDataTotalDTO dto, Boolean needRegTime) {
         //根据传入的dto拼接查询参数
         Criteria cri = Cnd.cri();
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
@@ -1213,7 +1213,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
         }
         if (userIds != null) {
             //拼接投手ID
-            cri.where().andIn("pitcher_id", userIds);
+            cri.where().andInList("pitcher_id", userIds);
         }
         //拼接不同的时间查询条件
         if (needRegTime && dto.getBeginDate() != null && dto.getEndDate() != null) {
@@ -1234,7 +1234,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
      * @param dto 前端传递的查询条件
      * @return 查询条件
      */
-    private Criteria myCriRolePitcher(long[] userIds, PitcherDataTotalDTO dto) {
+    private Criteria myCriRolePitcher(List<Long> userIds, PitcherDataTotalDTO dto) {
         //根据传入的dto拼接查询参数
         Criteria cri = Cnd.cri();
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
@@ -1243,7 +1243,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
         }
         if (userIds != null) {
             //拼接投手ID
-            cri.where().andIn("user_zx_pitcher_id", userIds);
+            cri.where().andInList("user_zx_pitcher_id", userIds);
         }
         if (dto.getBeginDate() != null && dto.getEndDate() != null) {
             //拼接注册日期查询条件
@@ -2821,20 +2821,20 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
                     ROUND(IF(SUM(new_user_total_amount_num) > 0 , SUM(new_user_total_amount) / SUM(new_user_total_amount_num), 0), 2) as today_arpu,
                     IFNULL(SUM(hundred_user_num), 0) as hundred_user_num,
                     ROUND(IF(SUM(hundred_user_num) > 0 , SUM(cost) / SUM(hundred_user_num), 0), 2) as hundred_user_num_cost,
-                    """ + pitcherDataTotalRoiSql() +
+                """ + pitcherDataTotalRoiSql() +
                 """
-                            ROUND(IF(SUM(IF(DATE_ADD(dt, INTERVAL 59 day) <= LocalDate.now(), cost, 0)) > 0 ,
-                                  SUM(da60) / SUM(IF(DATE_ADD(dt, INTERVAL 59 day) <= LocalDate.now(), cost, 0)), 0), 4) as roi60,
-                            ROUND(IF(SUM(IF(DATE_ADD(dt, INTERVAL 89 day) <= LocalDate.now(), cost, 0)) > 0 ,
-                                  SUM(da90) / SUM(IF(DATE_ADD(dt, INTERVAL 89 day) <= LocalDate.now(), cost, 0)), 0), 4) as roi90,
-                            ROUND(IF(SUM(IF(DATE_ADD(dt, INTERVAL 179 day) <= LocalDate.now(), cost, 0)) > 0 ,
-                                  SUM(m6) / SUM(IF(DATE_ADD(dt, INTERVAL 179 day) <= LocalDate.now(), cost, 0)), 0), 4) as roi180,
-                            ROUND(IF(SUM(IF(DATE_ADD(dt, INTERVAL 1 year) <= LocalDate.now(), cost, 0)) > 0 ,
-                                  SUM(m12) / SUM(IF(DATE_ADD(dt, INTERVAL 1 year) <= LocalDate.now(), cost, 0)), 0), 4) as roi1yaer,
-                            ROUND(IF(SUM(cost) > 0 , SUM(total) / SUM(cost), 0), 4) as roi_total
-                        FROM
-                            game_ads.ads_game_pitcher_day
-                        """;
+                    ROUND(IF(SUM(IF(DATE_ADD(dt, INTERVAL 59 day) <= LocalDate.now(), cost, 0)) > 0 ,
+                          SUM(da60) / SUM(IF(DATE_ADD(dt, INTERVAL 59 day) <= LocalDate.now(), cost, 0)), 0), 4) as roi60,
+                    ROUND(IF(SUM(IF(DATE_ADD(dt, INTERVAL 89 day) <= LocalDate.now(), cost, 0)) > 0 ,
+                          SUM(da90) / SUM(IF(DATE_ADD(dt, INTERVAL 89 day) <= LocalDate.now(), cost, 0)), 0), 4) as roi90,
+                    ROUND(IF(SUM(IF(DATE_ADD(dt, INTERVAL 179 day) <= LocalDate.now(), cost, 0)) > 0 ,
+                          SUM(m6) / SUM(IF(DATE_ADD(dt, INTERVAL 179 day) <= LocalDate.now(), cost, 0)), 0), 4) as roi180,
+                    ROUND(IF(SUM(IF(DATE_ADD(dt, INTERVAL 1 year) <= LocalDate.now(), cost, 0)) > 0 ,
+                          SUM(m12) / SUM(IF(DATE_ADD(dt, INTERVAL 1 year) <= LocalDate.now(), cost, 0)), 0), 4) as roi1yaer,
+                    ROUND(IF(SUM(cost) > 0 , SUM(total) / SUM(cost), 0), 4) as roi_total
+                FROM
+                    game_ads.ads_game_pitcher_day
+                """;
     }
 
 

+ 61 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/PlayerDataServiceImpl.java

@@ -0,0 +1,61 @@
+package com.zanxiang.game.data.serve.service.impl;
+
+import com.zanxiang.game.data.serve.pojo.dto.PlayerDataListDTO;
+import com.zanxiang.game.data.serve.pojo.dto.PlayerDataListTotalDTO;
+import com.zanxiang.game.data.serve.pojo.dto.PlayerRoleDataListDTO;
+import com.zanxiang.game.data.serve.pojo.dto.PlayerRoleDataListTotalDTO;
+import com.zanxiang.game.data.serve.pojo.vo.PlayerDataVO;
+import com.zanxiang.game.data.serve.pojo.vo.PlayerRoleDataVO;
+import com.zanxiang.game.data.serve.service.IPlayerDataService;
+import com.zanxiang.game.data.serve.utils.Page;
+import org.springframework.stereotype.Service;
+
+/**
+ * @author tianhua
+ * @time 2023/9/6
+ * @Description 玩家数据的逻辑实现层
+ **/
+@Service
+public class PlayerDataServiceImpl implements IPlayerDataService {
+
+    /**
+     * 玩家列表
+     * @param dto PlayerDataListDTO
+     * @return Page<PlayerDataVO>
+     */
+    @Override
+    public Page<PlayerDataVO> getPlayerDataList(PlayerDataListDTO dto) {
+        return null;
+    }
+
+    /**
+     * 玩家列表总计一栏
+     * @param dto PlayerDataListTotalDTO
+     * @return PlayerDataVO
+     */
+    @Override
+    public PlayerDataVO getPlayerDataListTotal(PlayerDataListTotalDTO dto) {
+        return null;
+    }
+
+    /**
+     * 玩家角色列表
+     * @param dto PlayerRoleDataListDTO
+     * @return Page<PlayerRoleDataVO>
+     */
+    @Override
+    public Page<PlayerRoleDataVO> getPlayerRoleDataList(PlayerRoleDataListDTO dto) {
+        return null;
+    }
+
+    /**
+     * 玩家角色列表总计一栏
+     * @param dto PlayerRoleDataListTotalDTO
+     * @return PlayerRoleDataVO
+     */
+    @Override
+    public PlayerRoleDataVO getPlayerRoleDataListTotal(PlayerRoleDataListTotalDTO dto) {
+        return null;
+    }
+
+}

+ 22 - 22
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/PromotionDayServiceImpl.java

@@ -52,8 +52,8 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
      * @return
      */
     public Page<PromotionDayVO> getPromotionDayListData(PromotionDayDTO dto) {
-        long[] userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getPitcherId()};
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
         //如果没有排序条件给默认值
         if (StringUtils.isBlank(dto.getSortFiled())) {
             dto.setSortFiled("dt");
@@ -138,8 +138,8 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
      */
     @Override
     public Page<PromotionDayVO> getPromotionDayData(PromotionDayDTO dto) {
-        long[] userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getPitcherId()};
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
         //如果没有排序条件给默认值
         if (StringUtils.isBlank(dto.getSortFiled())) {
             dto.setSortFiled("today_cost");
@@ -220,8 +220,8 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
      */
     @Override
     public PromotionDayTotalVO getPromotionDayTotalData(PromotionDayTotalDTO dto) {
-        long[] userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getPitcherId()};
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
         //创建查询条件
         Criteria cri = Cnd.cri();
         if (dto.getAccountId() != null) {
@@ -237,7 +237,7 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
             cri.where().andEquals("account_type", dto.getAccountType());
         }
         if (userIds != null) {
-            cri.where().andIn("pitcher_id", userIds);
+            cri.where().andInList("pitcher_id", userIds);
         }
         if (dto.getAgentId() != null) {
             cri.where().andInList("agent_id", Arrays.asList(dto.getAgentId()));
@@ -246,7 +246,7 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
             cri.where().andEquals("cp_name", dto.getCpName());
         }
         if (gameIds != null) {
-            cri.where().andIn("game_id", gameIds);
+            cri.where().andInList("game_id", gameIds);
         }
         if (dto.getClassify() != null) {
             cri.where().andEquals("classify", dto.getClassify());
@@ -403,8 +403,8 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
      * @return
      */
     public Page<TencentPromotionDayVO> getTencentPromotionDayListData(TencentPromotionDayDTO dto) {
-        long[] userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getPitcherId()};
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
         //如果没有排序条件给默认值
         if (StringUtils.isBlank(dto.getSortFiled())) {
             dto.setSortFiled("dt");
@@ -489,8 +489,8 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
      */
     @Override
     public Page<TencentPromotionDayVO> getTencentPromotionDayData(TencentPromotionDayDTO dto) {
-        long[] userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getPitcherId()};
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
         //如果没有排序条件给默认值
         if (StringUtils.isBlank(dto.getSortFiled())) {
             dto.setSortFiled("today_cost");
@@ -571,8 +571,8 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
      */
     @Override
     public TencentPromotionDayTotalVO getTencentPromotionDayTotalData(TencentPromotionDayTotalDTO dto) {
-        long[] userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getPitcherId()};
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
         //创建查询条件
         Criteria cri = Cnd.cri();
         if (dto.getAccountId() != null) {
@@ -588,7 +588,7 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
             cri.where().andEquals("account_type", dto.getAccountType());
         }
         if (userIds != null) {
-            cri.where().andIn("pitcher_id", userIds);
+            cri.where().andInList("pitcher_id", userIds);
         }
         if (dto.getAgentId() != null) {
             cri.where().andInList("agent_id", Arrays.asList(dto.getAgentId()));
@@ -597,7 +597,7 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
             cri.where().andEquals("cp_name", dto.getCpName());
         }
         if (gameIds != null) {
-            cri.where().andIn("game_id", gameIds);
+            cri.where().andInList("game_id", gameIds);
         }
         if (dto.getClassify() != null) {
             cri.where().andEquals("classify", dto.getClassify());
@@ -754,7 +754,7 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
      * @param needGroupBy 需要聚合分组
      * @return 查询条件
      */
-    private Criteria myCri(long[] userIds, long[] gameIds, PromotionDayDTO dto, Boolean needGroupBy) {
+    private Criteria myCri(List<Long> userIds, List<Long> gameIds, PromotionDayDTO dto, Boolean needGroupBy) {
         //创建查询条件
         Criteria cri = Cnd.cri();
         if (dto.getAccountId() != null) {
@@ -770,7 +770,7 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
             cri.where().andEquals("account_type", dto.getAccountType());
         }
         if (userIds != null) {
-            cri.where().andIn("pitcher_id", userIds);
+            cri.where().andInList("pitcher_id", userIds);
         }
         if (dto.getAgentId() != null) {
             cri.where().andInList("agent_id", Arrays.asList(dto.getAgentId()));
@@ -779,7 +779,7 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
             cri.where().andEquals("cp_name", dto.getCpName());
         }
         if (gameIds != null) {
-            cri.where().andIn("game_id", gameIds);
+            cri.where().andInList("game_id", gameIds);
         }
         if (dto.getClassify() != null) {
             cri.where().andEquals("classify", dto.getClassify());
@@ -820,7 +820,7 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
      * @param needGroupBy 需要聚合分组
      * @return 查询条件
      */
-    private Criteria myCriTencent(long[] userIds, long[] gameIds, TencentPromotionDayDTO dto, Boolean needGroupBy) {
+    private Criteria myCriTencent(List<Long> userIds, List<Long> gameIds, TencentPromotionDayDTO dto, Boolean needGroupBy) {
         //创建查询条件
         Criteria cri = Cnd.cri();
         if (dto.getAccountId() != null) {
@@ -836,7 +836,7 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
             cri.where().andEquals("account_type", dto.getAccountType());
         }
         if (userIds != null) {
-            cri.where().andIn("pitcher_id", userIds);
+            cri.where().andInList("pitcher_id", userIds);
         }
         if (dto.getAgentId() != null) {
             cri.where().andInList("agent_id", Arrays.asList(dto.getAgentId()));
@@ -845,7 +845,7 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
             cri.where().andEquals("cp_name", dto.getCpName());
         }
         if (gameIds != null) {
-            cri.where().andIn("game_id", gameIds);
+            cri.where().andInList("game_id", gameIds);
         }
         if (dto.getClassify() != null) {
             cri.where().andEquals("classify", dto.getClassify());

+ 7 - 4
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/RankingServiceImpl.java

@@ -21,6 +21,9 @@ import org.nutz.dao.util.cri.SimpleCriteria;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.Collections;
+import java.util.List;
+
 @Service
 @Slf4j
 public class RankingServiceImpl implements IRankingService {
@@ -31,7 +34,7 @@ public class RankingServiceImpl implements IRankingService {
 
     @Override
     public Page<GameRechargeRankingVO> gameRanking(RechargeRankingDTO dto) {
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
         if (StringUtils.isBlank(dto.getSortFiled())){
             dto.setSortFiled("totalAmount");
         }
@@ -45,7 +48,7 @@ public class RankingServiceImpl implements IRankingService {
             cri.where().and("dt",">=",dto.getBeginDay()).and("dt","<=",dto.getEndDay());
         }
         if(gameIds != null) {
-            cri.where().andIn("game_id", gameIds);
+            cri.where().andInList("game_id", gameIds);
         }
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
             cri.where().andEquals("source_system", dto.getSourceSystem());
@@ -91,7 +94,7 @@ public class RankingServiceImpl implements IRankingService {
 
     @Override
     public Page<PlayerRechargeRankingVO> playerRanking(RechargeRankingDTO dto) {
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
         if (StringUtils.isBlank(dto.getSortFiled())){
             dto.setSortFiled("totalAmount");
         }
@@ -105,7 +108,7 @@ public class RankingServiceImpl implements IRankingService {
             cri.where().and("dt",">=",dto.getBeginDay()).and("dt","<=",dto.getEndDay());
         }
         if(gameIds != null) {
-            cri.where().andIn("reg_game_id", gameIds);
+            cri.where().andInList("reg_game_id", gameIds);
         }
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
             cri.where().andEquals("source_system", dto.getSourceSystem());

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff