Browse Source

Merge branch 'dev' of GameCenter/game-center into master

root 1 year ago
parent
commit
6c4ea79ba4
86 changed files with 13963 additions and 696 deletions
  1. 0 5
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/config/NacosDynamicParamConfig.java
  2. 34 0
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/controller/BackPolicyController.java
  3. 31 3
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/controller/OceanengineLogController.java
  4. 31 3
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/controller/TencentLogController.java
  5. 31 3
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/controller/TencentMiniGameLogController.java
  6. 7 0
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/dao/mapper/GameOceanengineOrderSplitLogMapper.java
  7. 7 0
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/dao/mapper/GameTencentMiniGameOrderSplitLogMapper.java
  8. 7 0
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/dao/mapper/GameTencentOrderSplitLogMapper.java
  9. 2 0
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/pojo/dto/GameBackPolicyDTO.java
  10. 21 0
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/pojo/dto/OrderReportDTO.java
  11. 5 0
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/pojo/entity/GameBackPolicy.java
  12. 50 0
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/pojo/entity/GameOceanengineOrderSplitLog.java
  13. 50 0
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/pojo/entity/GameTencentMiniGameOrderSplitLog.java
  14. 50 0
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/pojo/entity/GameTencentOrderSplitLog.java
  15. 4 0
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/pojo/enums/BackStatusEnum.java
  16. 28 0
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/pojo/vo/GameBackPolicyVO.java
  17. 4 0
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/pojo/vo/GameOceanengineOrderLogVO.java
  18. 33 0
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/pojo/vo/GameOceanengineOrderSplitLogVO.java
  19. 4 0
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/pojo/vo/GameTencentMiniGameOrderVO.java
  20. 33 0
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/pojo/vo/GameTencentMiniOrderSplitLogVO.java
  21. 33 0
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/pojo/vo/GameTencentOrderSplitLogVO.java
  22. 4 0
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/pojo/vo/GameTencentOrderVO.java
  23. 1 1
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/rpc/impl/TencentMiniGameBackRpcImpl.java
  24. 1 1
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/rpc/impl/TencentUserActionBackRpcImpl.java
  25. 1 1
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/rpc/impl/TtMiniGameBackRpcImpl.java
  26. 6 2
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/service/IGameOceanengineOrderLogService.java
  27. 13 0
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/service/IGameOceanengineOrderSplitLogService.java
  28. 3 2
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/service/IGameTencentMiniGameBackLogService.java
  29. 3 2
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/service/IGameTencentMiniGameOrderService.java
  30. 13 0
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/service/IGameTencentMiniGameOrderSplitLogService.java
  31. 7 2
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/service/IGameTencentOrderService.java
  32. 13 0
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/service/IGameTencentOrderSplitLogService.java
  33. 6 0
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/service/impl/GameBackPolicyServiceImpl.java
  34. 163 76
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/service/impl/GameOceanengineOrderLogServiceImpl.java
  35. 47 0
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/service/impl/GameOceanengineOrderSplitLogServiceImpl.java
  36. 16 14
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/service/impl/GameTencentMiniGameBackLogServiceImpl.java
  37. 129 46
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/service/impl/GameTencentMiniGameOrderServiceImpl.java
  38. 47 0
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/service/impl/GameTencentMiniGameOrderSplitLogServiceImpl.java
  39. 134 49
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/service/impl/GameTencentOrderServiceImpl.java
  40. 47 0
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/service/impl/GameTencentOrderSplitLogServiceImpl.java
  41. 112 0
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/task/OceanengineOrderSplitBackTask.java
  42. 115 0
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/task/TencentMiniOrderSplitBackTask.java
  43. 112 0
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/task/TencentOrderSplitBackTask.java
  44. 27 0
      game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/utils/BackPolicyUtil.java
  45. 6 3
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/component/DataPowerComponent.java
  46. 8 1
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/GameDataTotalDTO.java
  47. 8 1
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/GameDataTotalTotalDTO.java
  48. 2 1
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/GameDataWaterDTO.java
  49. 8 1
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/GameMediaDataDayDTO.java
  50. 8 1
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/GameMediaDataDayTotalDTO.java
  51. 8 1
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/GameMediaDataTotalDTO.java
  52. 8 1
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/GameMediaDataTotalSumDTO.java
  53. 8 2
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/GamePromoteDayDTO.java
  54. 9 2
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/GamePromoteDayTotalDTO.java
  55. 8 1
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/GameServerDayDTO.java
  56. 8 1
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/GameServerDayTotalDTO.java
  57. 8 1
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/GameServerSumDayDTO.java
  58. 8 1
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/GameServerSumDayTotalDTO.java
  59. 8 1
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/PitcherDataDayDTO.java
  60. 8 1
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/PitcherDataDayTotalDTO.java
  61. 8 1
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/PitcherDataTotalDTO.java
  62. 8 1
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/PitcherDataTotalSumDTO.java
  63. 6 0
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/PitcherGameDataDayDTO.java
  64. 6 0
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/PitcherGameDataDayTotalDTO.java
  65. 9 2
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/PitcherGameDataTotalDTO.java
  66. 9 2
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/PitcherGameDataTotalSumDTO.java
  67. 9 2
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/PitcherGameMediaDataDayDTO.java
  68. 9 2
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/PitcherGameMediaDataDayTotalDTO.java
  69. 9 2
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/PitcherGameMediaDataTotalDTO.java
  70. 9 2
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/PitcherGameMediaDataTotalSumDTO.java
  71. 8 1
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/PitcherMediaDataDayDTO.java
  72. 8 1
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/PitcherMediaDataDayTotalDTO.java
  73. 8 1
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/PitcherMediaDataTotalDTO.java
  74. 8 1
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/PitcherMediaDataTotalSumDTO.java
  75. 931 0
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/entity/AdsAccountAgentDayParent.java
  76. 2392 0
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/entity/AdsGameAcctypeDayParent.java
  77. 2402 0
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/entity/AdsGamePitcherAcctypeDayParent.java
  78. 357 0
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/entity/AdsGameServerDayParent.java
  79. 368 0
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/entity/AdsGameServerSumDayParent.java
  80. 2378 0
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/entity/AdsPitcherAcctypeDayParent.java
  81. 1158 0
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/entity/AdsPitcherDayParent.java
  82. 277 23
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/AccountAgentDayServiceImpl.java
  83. 568 66
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/GameDataServiceImpl.java
  84. 735 132
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/GameServerServiceImpl.java
  85. 365 100
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/IMediaDataServiceImpl.java
  86. 312 127
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/PitcherDataServiceImpl.java

+ 0 - 5
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/config/NacosDynamicParamConfig.java

@@ -9,9 +9,4 @@ import org.springframework.stereotype.Component;
 @Component
 @RefreshScope
 public class NacosDynamicParamConfig {
-    /**
-     * 按关键行为回传的广告账号列表
-     */
-    @Value("${nacos.dynamic.backOfKeyAccountIds:test}")
-    private String backOfKeyAccountIds;
 }

+ 34 - 0
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/controller/BackPolicyController.java

@@ -96,6 +96,7 @@ public class BackPolicyController {
         checkDownLevel(dto.getFirstDownLevel());
         checkDownLevel(dto.getRechargeDownLevel());
         checkDownLevel(dto.getMarkUpDownLevel());
+        checkSplitStrategy(dto.getSplitStrategy());
         if (dto.getFirstBackCountOfUser() != null && dto.getFirstBackCountOfUser() < 1) {
             throw new BaseException("单用户最大回传次数不能小于 1");
         }
@@ -136,4 +137,37 @@ public class BackPolicyController {
             }
         }
     }
+
+    private void checkSplitStrategy(List<GameBackPolicyVO.SplitStrategy> splitStrategyList) {
+        if (CollectionUtils.isEmpty(splitStrategyList)) {
+            return;
+        }
+        splitStrategyList.sort((val1, val2) -> val1.getPayMoney().compareTo(val2.getPayMoney()));
+        BigDecimal compareMoney = null;
+        for (GameBackPolicyVO.SplitStrategy splitStrategy : splitStrategyList) {
+            if (splitStrategy.getPayMoney() == null
+                    || CollectionUtils.isEmpty(splitStrategy.getSplitList())
+                    || splitStrategy.getBetweenMinuteMin() == null
+                    || splitStrategy.getBetweenMinuteMax() == null) {
+                throw new BaseException("拆单策略参数错误");
+            }
+            if (splitStrategy.getPayMoney().compareTo(BigDecimal.ZERO) <= 0) {
+                throw new BaseException("拆单策略支付金额错误![" + splitStrategy.getPayMoney() + "]");
+            }
+            splitStrategy.getSplitList().forEach(splitMoney -> {
+                if (splitMoney == null || splitMoney.compareTo(BigDecimal.ZERO) <= 0) {
+                    throw new BaseException("拆单策略拆分金额错误![" + splitMoney + "]");
+                }
+            });
+            if (splitStrategy.getBetweenMinuteMin() < 1 || splitStrategy.getBetweenMinuteMin() >= 60) {
+                throw new BaseException("拆单策略间隔时间错误![" + splitStrategy.getBetweenMinuteMin() + "]");
+            }
+            if (splitStrategy.getBetweenMinuteMax() < 1 || splitStrategy.getBetweenMinuteMax() >= 60) {
+                throw new BaseException("拆单策略间隔时间错误![" + splitStrategy.getBetweenMinuteMax() + "]");
+            }
+            if (splitStrategy.getBetweenMinuteMin().compareTo(splitStrategy.getBetweenMinuteMax()) >= 0) {
+                throw new BaseException("拆单策略间隔时间错误![" + splitStrategy.getBetweenMinuteMin() + ">=" + splitStrategy.getBetweenMinuteMax() + "]");
+            }
+        }
+    }
 }

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

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.zanxiang.erp.security.annotation.PreAuthorize;
 import com.zanxiang.game.back.serve.pojo.dto.GameOceanengineOrderLogDTO;
 import com.zanxiang.game.back.serve.pojo.dto.GameOceanengineUserLogDTO;
+import com.zanxiang.game.back.serve.pojo.dto.OrderReportDTO;
 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;
@@ -13,7 +14,9 @@ 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.PathVariable;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -43,10 +46,35 @@ public class OceanengineLogController {
     @PostMapping("/orderReport/{ids}/{backMoney}")
     @ApiOperation(value = "头条订单手动上报")
     public ResultVO<Boolean> oceanengineOrderReport(@PathVariable("ids") List<Long> ids, @PathVariable("backMoney") BigDecimal backMoney) {
-        if (backMoney.compareTo(BigDecimal.ZERO) <= 0) {
-            throw new BaseException("回传金额错误!");
+        OrderReportDTO dto = new OrderReportDTO();
+        dto.setOrderIds(ids);
+        dto.setSplitOrder(false);
+        dto.setBackMoney(backMoney);
+        return oceanengineOrderReport(dto);
+    }
+
+    @PreAuthorize(permissionKey = "gameBack:oceanengine:orderReport")
+    @PostMapping("/orderReport")
+    @ApiOperation(value = "头条订单手动上报")
+    public ResultVO<Boolean> oceanengineOrderReport(@Validated @RequestBody OrderReportDTO dto) {
+        if (CollectionUtils.isEmpty(dto.getOrderIds())) {
+            throw new BaseException("参数错误!");
+        }
+        if (dto.getSplitOrder()) {
+            if (CollectionUtils.isEmpty(dto.getSplitMoney())) {
+                throw new BaseException("回传金额错误!");
+            }
+            dto.getSplitMoney().forEach(backMoney -> {
+                if (backMoney.compareTo(BigDecimal.ZERO) <= 0) {
+                    throw new BaseException("回传金额错误!");
+                }
+            });
+        } else {
+            if (dto.getBackMoney().compareTo(BigDecimal.ZERO) <= 0) {
+                throw new BaseException("回传金额错误!");
+            }
         }
-        return ResultVO.ok(oceanengineOrderLogService.oceanengineOrderReport(ids, NumberUtil.multiply100(backMoney).longValue()));
+        return ResultVO.ok(oceanengineOrderLogService.oceanengineOrderReport(dto));
     }
 
     @PreAuthorize(permissionKey = "gameBack:oceanengine:userLogs")

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

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.zanxiang.erp.security.annotation.PreAuthorize;
 import com.zanxiang.game.back.serve.pojo.dto.GameTencentOrderDTO;
 import com.zanxiang.game.back.serve.pojo.dto.GameTencentUserDTO;
+import com.zanxiang.game.back.serve.pojo.dto.OrderReportDTO;
 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;
@@ -13,7 +14,9 @@ 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.PathVariable;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -43,10 +46,35 @@ public class TencentLogController {
     @PostMapping("/orderReport/{ids}/{backMoney}")
     @ApiOperation(value = "腾讯订单手动上报")
     public ResultVO<Boolean> tencentOrderReport(@PathVariable("ids") List<Long> ids, @PathVariable("backMoney") BigDecimal backMoney) {
-        if(backMoney.compareTo(BigDecimal.ZERO) <= 0) {
-            throw new BaseException("回传金额错误!");
+        OrderReportDTO dto = new OrderReportDTO();
+        dto.setOrderIds(ids);
+        dto.setSplitOrder(false);
+        dto.setBackMoney(backMoney);
+        return tencentOrderReport(dto);
+    }
+
+    @PreAuthorize(permissionKey = "gameBack:tencent:orderReport")
+    @PostMapping("/orderReport")
+    @ApiOperation(value = "腾讯订单手动上报")
+    public ResultVO<Boolean> tencentOrderReport(@Validated @RequestBody OrderReportDTO dto) {
+        if (CollectionUtils.isEmpty(dto.getOrderIds())) {
+            throw new BaseException("参数错误!");
+        }
+        if (dto.getSplitOrder()) {
+            if (CollectionUtils.isEmpty(dto.getSplitMoney())) {
+                throw new BaseException("回传金额错误!");
+            }
+            dto.getSplitMoney().forEach(backMoney -> {
+                if (backMoney.compareTo(BigDecimal.ZERO) <= 0) {
+                    throw new BaseException("回传金额错误!");
+                }
+            });
+        } else {
+            if (dto.getBackMoney().compareTo(BigDecimal.ZERO) <= 0) {
+                throw new BaseException("回传金额错误!");
+            }
         }
-        return ResultVO.ok(tencentOrderService.tencentOrderReport(ids, NumberUtil.multiply100(backMoney).longValue()));
+        return ResultVO.ok(tencentOrderService.tencentOrderReport(dto));
     }
 
     @PreAuthorize(permissionKey = "gameBack:tencent:userLogs")

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

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.zanxiang.erp.security.annotation.PreAuthorize;
 import com.zanxiang.game.back.serve.pojo.dto.GameTencentMiniGameOrderDTO;
 import com.zanxiang.game.back.serve.pojo.dto.GameTencentMiniGameUserDTO;
+import com.zanxiang.game.back.serve.pojo.dto.OrderReportDTO;
 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;
@@ -13,7 +14,9 @@ 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.PathVariable;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -43,10 +46,35 @@ public class TencentMiniGameLogController {
     @PostMapping("/orderReport/{ids}/{backMoney}")
     @ApiOperation(value = "腾讯订单手动上报")
     public ResultVO<Boolean> tencentOrderReport(@PathVariable("ids") List<Long> ids, @PathVariable("backMoney") BigDecimal backMoney) {
-        if (backMoney.compareTo(BigDecimal.ZERO) <= 0) {
-            throw new BaseException("回传金额错误!");
+        OrderReportDTO dto = new OrderReportDTO();
+        dto.setOrderIds(ids);
+        dto.setSplitOrder(false);
+        dto.setBackMoney(backMoney);
+        return tencentOrderReport(dto);
+    }
+
+    @PreAuthorize(permissionKey = "gameBack:tencentMiniGame:orderReport")
+    @PostMapping("/orderReport")
+    @ApiOperation(value = "腾讯订单手动上报")
+    public ResultVO<Boolean> tencentOrderReport(@Validated @RequestBody OrderReportDTO dto) {
+        if (CollectionUtils.isEmpty(dto.getOrderIds())) {
+            throw new BaseException("参数错误!");
+        }
+        if (dto.getSplitOrder()) {
+            if (CollectionUtils.isEmpty(dto.getSplitMoney())) {
+                throw new BaseException("回传金额错误!");
+            }
+            dto.getSplitMoney().forEach(backMoney -> {
+                if (backMoney.compareTo(BigDecimal.ZERO) <= 0) {
+                    throw new BaseException("回传金额错误!");
+                }
+            });
+        } else {
+            if (dto.getBackMoney().compareTo(BigDecimal.ZERO) <= 0) {
+                throw new BaseException("回传金额错误!");
+            }
         }
-        return ResultVO.ok(gameTencentMiniGameOrderService.doReport(ids, NumberUtil.multiply100(backMoney).longValue()));
+        return ResultVO.ok(gameTencentMiniGameOrderService.doReport(dto));
     }
 
     @PreAuthorize(permissionKey = "gameBack:tencentMiniGame:userLogs")

+ 7 - 0
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/dao/mapper/GameOceanengineOrderSplitLogMapper.java

@@ -0,0 +1,7 @@
+package com.zanxiang.game.back.serve.dao.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.zanxiang.game.back.serve.pojo.entity.GameOceanengineOrderSplitLog;
+
+public interface GameOceanengineOrderSplitLogMapper extends BaseMapper<GameOceanengineOrderSplitLog> {
+}

+ 7 - 0
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/dao/mapper/GameTencentMiniGameOrderSplitLogMapper.java

@@ -0,0 +1,7 @@
+package com.zanxiang.game.back.serve.dao.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.zanxiang.game.back.serve.pojo.entity.GameTencentMiniGameOrderSplitLog;
+
+public interface GameTencentMiniGameOrderSplitLogMapper extends BaseMapper<GameTencentMiniGameOrderSplitLog> {
+}

+ 7 - 0
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/dao/mapper/GameTencentOrderSplitLogMapper.java

@@ -0,0 +1,7 @@
+package com.zanxiang.game.back.serve.dao.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.zanxiang.game.back.serve.pojo.entity.GameTencentOrderSplitLog;
+
+public interface GameTencentOrderSplitLogMapper extends BaseMapper<GameTencentOrderSplitLog> {
+}

+ 2 - 0
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/pojo/dto/GameBackPolicyDTO.java

@@ -256,5 +256,7 @@ public class GameBackPolicyDTO implements Serializable {
      */
     private BigDecimal supperSmallAmount;
 
+    private List<GameBackPolicyVO.SplitStrategy> splitStrategy;
+
 
 }

+ 21 - 0
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/pojo/dto/OrderReportDTO.java

@@ -0,0 +1,21 @@
+package com.zanxiang.game.back.serve.pojo.dto;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+import java.math.BigDecimal;
+import java.util.List;
+
+@Data
+public class OrderReportDTO {
+
+    @NotNull(message = "订单列表不能为空")
+    private List<Long> orderIds;
+
+    @NotNull(message = "参数错误!")
+    private Boolean splitOrder;
+
+    private BigDecimal backMoney;
+
+    private List<BigDecimal> splitMoney;
+}

+ 5 - 0
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/pojo/entity/GameBackPolicy.java

@@ -222,5 +222,10 @@ public class GameBackPolicy implements Serializable {
      */
     private Long supperSmallAmount;
 
+    /**
+     * 拆单策略
+     */
+    private String splitStrategy;
+
 
 }

+ 50 - 0
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/pojo/entity/GameOceanengineOrderSplitLog.java

@@ -0,0 +1,50 @@
+package com.zanxiang.game.back.serve.pojo.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
+/**
+ * 拆单回传
+ */
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@Builder
+@TableName("t_game_oceanengine_order_split_log")
+public class GameOceanengineOrderSplitLog implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    private LocalDate backDay;
+
+    private String orderNo;
+
+    private Integer backIndex;
+
+    private Integer backCount;
+
+    private Long splitMoney;
+
+    private LocalDateTime backTime;
+
+    private LocalDateTime executeTime;
+
+    private Integer backStatus;
+
+    private String backErrorMsg;
+
+    private LocalDateTime createTime;
+
+
+}

+ 50 - 0
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/pojo/entity/GameTencentMiniGameOrderSplitLog.java

@@ -0,0 +1,50 @@
+package com.zanxiang.game.back.serve.pojo.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
+/**
+ * 拆单回传
+ */
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@Builder
+@TableName("t_game_tencent_mini_game_order_split_log")
+public class GameTencentMiniGameOrderSplitLog implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    private LocalDate backDay;
+
+    private String orderNo;
+
+    private Integer backIndex;
+
+    private Integer backCount;
+
+    private Long splitMoney;
+
+    private LocalDateTime backTime;
+
+    private LocalDateTime executeTime;
+
+    private Integer backStatus;
+
+    private String backErrorMsg;
+
+    private LocalDateTime createTime;
+
+
+}

+ 50 - 0
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/pojo/entity/GameTencentOrderSplitLog.java

@@ -0,0 +1,50 @@
+package com.zanxiang.game.back.serve.pojo.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
+/**
+ * 拆单回传
+ */
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@Builder
+@TableName("t_game_tencent_order_split_log")
+public class GameTencentOrderSplitLog implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    private LocalDate backDay;
+
+    private String orderNo;
+
+    private Integer backIndex;
+
+    private Integer backCount;
+
+    private Long splitMoney;
+
+    private LocalDateTime backTime;
+
+    private LocalDateTime executeTime;
+
+    private Integer backStatus;
+
+    private String backErrorMsg;
+
+    private LocalDateTime createTime;
+
+
+}

+ 4 - 0
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/pojo/enums/BackStatusEnum.java

@@ -14,6 +14,10 @@ public enum BackStatusEnum {
      * 回传成功
      */
     SUCCESS(1),
+    /**
+     * 部分成功
+     */
+    SUCCESS_PART(2),
     /**
      * 回传失败
      */

+ 28 - 0
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/pojo/vo/GameBackPolicyVO.java

@@ -242,6 +242,11 @@ public class GameBackPolicyVO implements Serializable {
      */
     private BigDecimal supperSmallAmount;
 
+    /**
+     * 拆单策略
+     */
+    private List<SplitStrategy> splitStrategy;
+
     @Data
     @NoArgsConstructor
     @AllArgsConstructor
@@ -255,5 +260,28 @@ public class GameBackPolicyVO implements Serializable {
         private BigDecimal backMoney;
     }
 
+    @Data
+    @NoArgsConstructor
+    @AllArgsConstructor
+    @Builder
+    public static class SplitStrategy {
+        /**
+         * 支付金额
+         */
+        private BigDecimal payMoney;
+        /**
+         * 拆分金额
+         */
+        private List<BigDecimal> splitList;
+        /**
+         * 回传间隔时间(/分钟)
+         */
+        private Integer betweenMinuteMin;
+        /**
+         * 回传间隔时间(/分钟)
+         */
+        private Integer betweenMinuteMax;
+    }
+
 
 }

+ 4 - 0
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/pojo/vo/GameOceanengineOrderLogVO.java

@@ -7,6 +7,7 @@ import lombok.Data;
 import lombok.NoArgsConstructor;
 
 import java.time.LocalDateTime;
+import java.util.List;
 
 /**
  * 头条订单上报日志
@@ -78,4 +79,7 @@ public class GameOceanengineOrderLogVO {
 
     @ApiModelProperty("回传日志")
     private String backMsg;
+
+    @ApiModelProperty("回传拆分订单")
+    private List<GameOceanengineOrderSplitLogVO> splitOrderList;
 }

+ 33 - 0
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/pojo/vo/GameOceanengineOrderSplitLogVO.java

@@ -0,0 +1,33 @@
+package com.zanxiang.game.back.serve.pojo.vo;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
+@Data
+public class GameOceanengineOrderSplitLogVO {
+
+    private Long id;
+
+    private LocalDate backDay;
+
+    private String orderNo;
+
+    private Integer backIndex;
+
+    private Integer backCount;
+
+    private BigDecimal splitMoney;
+
+    private LocalDateTime backTime;
+
+    private LocalDateTime executeTime;
+
+    private Integer backStatus;
+
+    private String backErrorMsg;
+
+    private LocalDateTime createTime;
+}

+ 4 - 0
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/pojo/vo/GameTencentMiniGameOrderVO.java

@@ -7,6 +7,7 @@ import lombok.Data;
 import lombok.NoArgsConstructor;
 
 import java.time.LocalDateTime;
+import java.util.List;
 
 /**
  * <p>
@@ -118,4 +119,7 @@ public class GameTencentMiniGameOrderVO {
 
     @ApiModelProperty("回传日志")
     private String backMsg;
+
+    @ApiModelProperty("回传拆分订单")
+    private List<GameTencentMiniOrderSplitLogVO> splitOrderList;
 }

+ 33 - 0
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/pojo/vo/GameTencentMiniOrderSplitLogVO.java

@@ -0,0 +1,33 @@
+package com.zanxiang.game.back.serve.pojo.vo;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
+@Data
+public class GameTencentMiniOrderSplitLogVO {
+    
+    private Long id;
+
+    private LocalDate backDay;
+
+    private String orderNo;
+
+    private Integer backIndex;
+
+    private Integer backCount;
+
+    private BigDecimal splitMoney;
+
+    private LocalDateTime backTime;
+
+    private LocalDateTime executeTime;
+
+    private Integer backStatus;
+
+    private String backErrorMsg;
+
+    private LocalDateTime createTime;
+}

+ 33 - 0
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/pojo/vo/GameTencentOrderSplitLogVO.java

@@ -0,0 +1,33 @@
+package com.zanxiang.game.back.serve.pojo.vo;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
+@Data
+public class GameTencentOrderSplitLogVO {
+    
+    private Long id;
+
+    private LocalDate backDay;
+
+    private String orderNo;
+
+    private Integer backIndex;
+
+    private Integer backCount;
+
+    private BigDecimal splitMoney;
+
+    private LocalDateTime backTime;
+
+    private LocalDateTime executeTime;
+
+    private Integer backStatus;
+
+    private String backErrorMsg;
+
+    private LocalDateTime createTime;
+}

+ 4 - 0
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/pojo/vo/GameTencentOrderVO.java

@@ -9,6 +9,7 @@ import lombok.NoArgsConstructor;
 
 import java.io.Serializable;
 import java.time.LocalDateTime;
+import java.util.List;
 
 /**
  * <p>
@@ -134,4 +135,7 @@ public class GameTencentOrderVO {
 
     @ApiModelProperty("回传日志")
     private String backMsg;
+
+    @ApiModelProperty("回传拆分订单")
+    private List<GameTencentOrderSplitLogVO> splitOrderList;
 }

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

@@ -85,7 +85,7 @@ public class TencentMiniGameBackRpcImpl implements ITencentMiniGameBackRpc {
             log.error("腾讯小游戏订单回传失败,找不到回传的用户 orderId: {}", orderLog.getOrderId());
             return ResultVO.fail("找不到回传用户");
         } else {
-            return ResultVO.ok(gameTencentMiniGameOrderService.orderBack(orderLog, false, null));
+            return ResultVO.ok(gameTencentMiniGameOrderService.orderBack(orderLog));
         }
     }
 

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

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

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

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

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

@@ -2,17 +2,21 @@ package com.zanxiang.game.back.serve.service;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.github.sd4324530.jtuple.Tuple2;
 import com.zanxiang.game.back.serve.pojo.dto.GameOceanengineOrderLogDTO;
+import com.zanxiang.game.back.serve.pojo.dto.OrderReportDTO;
 import com.zanxiang.game.back.serve.pojo.entity.GameOceanengineOrderLog;
+import com.zanxiang.game.back.serve.pojo.enums.BackStatusEnum;
 import com.zanxiang.game.back.serve.pojo.vo.GameOceanengineOrderLogVO;
 
 import java.util.List;
 
 public interface IGameOceanengineOrderLogService extends IService<GameOceanengineOrderLog> {
 
-    boolean callback(GameOceanengineOrderLog orderLog, boolean mustBack, Long backMoneyOfInput);
+    boolean callback(GameOceanengineOrderLog orderLog);
 
     IPage<GameOceanengineOrderLogVO> oceanengineOrderLogList(GameOceanengineOrderLogDTO dto);
+    boolean oceanengineOrderReport(OrderReportDTO dto);
 
-    boolean oceanengineOrderReport(List<Long> ids, Long backMoney);
+    Tuple2<BackStatusEnum, String> doCallback(GameOceanengineOrderLog orderLog, Long backMoney);
 }

+ 13 - 0
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/service/IGameOceanengineOrderSplitLogService.java

@@ -0,0 +1,13 @@
+package com.zanxiang.game.back.serve.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.zanxiang.game.back.serve.pojo.entity.GameOceanengineOrderSplitLog;
+import com.zanxiang.game.back.serve.pojo.vo.GameOceanengineOrderSplitLogVO;
+
+import java.util.Collection;
+import java.util.List;
+
+public interface IGameOceanengineOrderSplitLogService extends IService<GameOceanengineOrderSplitLog> {
+
+    List<GameOceanengineOrderSplitLogVO> listByOrderNo(Collection<String> orderNos);
+}

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

@@ -1,6 +1,7 @@
 package com.zanxiang.game.back.serve.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.github.sd4324530.jtuple.Tuple2;
 import com.zanxiang.game.back.serve.pojo.entity.GameTencentMiniGameBackLog;
 import com.zanxiang.game.back.serve.pojo.entity.GameTencentMiniGameOrder;
 import com.zanxiang.game.back.serve.pojo.entity.GameTencentMiniGameRoleRegister;
@@ -9,9 +10,9 @@ import com.zanxiang.game.back.serve.pojo.enums.BackStatusEnum;
 
 public interface IGameTencentMiniGameBackLogService extends IService<GameTencentMiniGameBackLog> {
 
-    BackStatusEnum userBack(GameTencentMiniGameUser userLog);
+    Tuple2<BackStatusEnum, String> userBack(GameTencentMiniGameUser userLog);
 
-    BackStatusEnum orderBack(GameTencentMiniGameOrder orderLog);
+    Tuple2<BackStatusEnum, String> orderBack(GameTencentMiniGameOrder orderLog, Long backMoney);
 
     BackStatusEnum roleRegisterBack(GameTencentMiniGameRoleRegister roleRegisterLog);
 }

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

@@ -3,6 +3,7 @@ package com.zanxiang.game.back.serve.service;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.zanxiang.game.back.serve.pojo.dto.GameTencentMiniGameOrderDTO;
+import com.zanxiang.game.back.serve.pojo.dto.OrderReportDTO;
 import com.zanxiang.game.back.serve.pojo.entity.GameTencentMiniGameOrder;
 import com.zanxiang.game.back.serve.pojo.vo.GameTencentMiniGameOrderVO;
 
@@ -10,9 +11,9 @@ import java.util.List;
 
 public interface IGameTencentMiniGameOrderService extends IService<GameTencentMiniGameOrder> {
 
-    boolean orderBack(GameTencentMiniGameOrder orderLog, boolean mustBack, Long backMoneyOfInput);
+    boolean orderBack(GameTencentMiniGameOrder orderLog);
 
     IPage<GameTencentMiniGameOrderVO> listOfPage(GameTencentMiniGameOrderDTO dto);
 
-    boolean doReport(List<Long> orderLogIds, Long backMoney);
+    boolean doReport(OrderReportDTO dto);
 }

+ 13 - 0
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/service/IGameTencentMiniGameOrderSplitLogService.java

@@ -0,0 +1,13 @@
+package com.zanxiang.game.back.serve.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.zanxiang.game.back.serve.pojo.entity.GameTencentMiniGameOrderSplitLog;
+import com.zanxiang.game.back.serve.pojo.vo.GameTencentMiniOrderSplitLogVO;
+
+import java.util.Collection;
+import java.util.List;
+
+public interface IGameTencentMiniGameOrderSplitLogService extends IService<GameTencentMiniGameOrderSplitLog> {
+
+    List<GameTencentMiniOrderSplitLogVO> listByOrderNo(Collection<String> orderNos);
+}

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

@@ -1,10 +1,13 @@
 package com.zanxiang.game.back.serve.service;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.sd4324530.jtuple.Tuple2;
 import com.zanxiang.game.back.serve.pojo.dto.GameBackPolicyListDTO;
 import com.zanxiang.game.back.serve.pojo.dto.GameTencentOrderDTO;
+import com.zanxiang.game.back.serve.pojo.dto.OrderReportDTO;
 import com.zanxiang.game.back.serve.pojo.entity.GameTencentOrder;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.zanxiang.game.back.serve.pojo.enums.BackStatusEnum;
 import com.zanxiang.game.back.serve.pojo.vo.GameTencentOrderVO;
 
 import java.util.List;
@@ -19,9 +22,11 @@ import java.util.List;
  */
 public interface IGameTencentOrderService extends IService<GameTencentOrder> {
 
-    boolean orderBack(GameTencentOrder tencentOrder, boolean mustBack, Long backMoneyOfInput);
+    boolean orderBack(GameTencentOrder tencentOrder);
 
     IPage<GameTencentOrderVO> tencentOrderLogList(GameTencentOrderDTO dto);
 
-    boolean tencentOrderReport(List<Long> ids, Long backMoney);
+    boolean tencentOrderReport(OrderReportDTO dto);
+
+    Tuple2<BackStatusEnum, String> doCallback(GameTencentOrder orderLog, Long backMoney);
 }

+ 13 - 0
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/service/IGameTencentOrderSplitLogService.java

@@ -0,0 +1,13 @@
+package com.zanxiang.game.back.serve.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.zanxiang.game.back.serve.pojo.entity.GameTencentOrderSplitLog;
+import com.zanxiang.game.back.serve.pojo.vo.GameTencentOrderSplitLogVO;
+
+import java.util.Collection;
+import java.util.List;
+
+public interface IGameTencentOrderSplitLogService extends IService<GameTencentOrderSplitLog> {
+
+    List<GameTencentOrderSplitLogVO> listByOrderNo(Collection<String> orderNos);
+}

+ 6 - 0
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/service/impl/GameBackPolicyServiceImpl.java

@@ -17,6 +17,7 @@ import com.zanxiang.game.back.serve.service.IGameBackPolicyService;
 import com.zanxiang.game.back.serve.service.IGameTencentBackLogService;
 import com.zanxiang.game.back.serve.service.IGameTencentOrderService;
 import com.zanxiang.game.back.serve.service.IGameTencentUserService;
+import com.zanxiang.module.util.JsonUtil;
 import com.zanxiang.module.util.NumberUtil;
 import com.zanxiang.module.util.bean.BeanUtil;
 import com.zanxiang.module.util.exception.BaseException;
@@ -121,6 +122,7 @@ public class GameBackPolicyServiceImpl extends ServiceImpl<GameBackPolicyMapper,
                 .markUpBackCountOfUser(dto.getMarkUpBackCountOfUser())
                 .largeAmount(dto.getLargeAmount() == null ? null : NumberUtil.multiply100(dto.getLargeAmount()).longValue())
                 .supperSmallAmount(dto.getSupperSmallAmount() == null ? null : NumberUtil.multiply100(dto.getSupperSmallAmount()).longValue())
+                .splitStrategy(CollectionUtils.isEmpty(dto.getSplitStrategy()) ? null : JsonUtil.toString(dto.getSplitStrategy()))
                 .build();
         return gameBackPolicyService.save(backPolicy);
     }
@@ -173,6 +175,7 @@ public class GameBackPolicyServiceImpl extends ServiceImpl<GameBackPolicyMapper,
                 .markUpBackCountOfUser(dto.getMarkUpBackCountOfUser())
                 .largeAmount(dto.getLargeAmount() == null ? null : NumberUtil.multiply100(dto.getLargeAmount()).longValue())
                 .supperSmallAmount(dto.getSupperSmallAmount() == null ? null : NumberUtil.multiply100(dto.getSupperSmallAmount()).longValue())
+                .splitStrategy(CollectionUtils.isEmpty(dto.getSplitStrategy()) ? null : JsonUtil.toString(dto.getSplitStrategy()))
                 .build();
 
         return gameBackPolicyService.updateById(backPolicy);
@@ -226,6 +229,9 @@ public class GameBackPolicyServiceImpl extends ServiceImpl<GameBackPolicyMapper,
                     .collect(Collectors.toList())
             );
         }
+        if (StringUtils.isNotBlank(gameBackPolicy.getSplitStrategy())) {
+            vo.setSplitStrategy((List<GameBackPolicyVO.SplitStrategy>) JsonUtil.toList(gameBackPolicy.getSplitStrategy(), List.class, GameBackPolicyVO.SplitStrategy.class));
+        }
         return vo;
     }
 

+ 163 - 76
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/service/impl/GameOceanengineOrderLogServiceImpl.java

@@ -6,6 +6,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.Tuple2;
 import com.github.sd4324530.jtuple.Tuple3;
 import com.github.sd4324530.jtuple.Tuples;
 import com.zanxiang.game.back.base.pojo.enums.OrderStatusEnum;
@@ -14,28 +15,35 @@ import com.zanxiang.game.back.serve.dao.mapper.GameOceanengineOrderLogMapper;
 import com.zanxiang.game.back.serve.oceanengine.MiniGameCallback;
 import com.zanxiang.game.back.serve.oceanengine.OceanengineCallbackException;
 import com.zanxiang.game.back.serve.pojo.dto.GameOceanengineOrderLogDTO;
+import com.zanxiang.game.back.serve.pojo.dto.OrderReportDTO;
 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.pojo.vo.GameOceanengineOrderSplitLogVO;
 import com.zanxiang.game.back.serve.service.IGameBackPolicyService;
 import com.zanxiang.game.back.serve.service.IGameOceanengineBackLogService;
 import com.zanxiang.game.back.serve.service.IGameOceanengineOrderLogService;
+import com.zanxiang.game.back.serve.service.IGameOceanengineOrderSplitLogService;
 import com.zanxiang.game.back.serve.service.IGameOceanengineUserLogService;
 import com.zanxiang.game.back.serve.utils.BackPolicyUtil;
 import com.zanxiang.game.back.serve.utils.OrderUtil;
 import com.zanxiang.game.module.base.ServerInfo;
 import com.zanxiang.game.module.base.pojo.vo.AgentRpcVO;
 import com.zanxiang.game.module.base.rpc.IAgentRpc;
+import com.zanxiang.module.util.JsonUtil;
+import com.zanxiang.module.util.NumberUtil;
 import com.zanxiang.module.util.bean.BeanUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.lang3.RandomUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.dubbo.config.annotation.DubboReference;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.math.BigDecimal;
 import java.time.LocalDateTime;
 import java.time.LocalTime;
 import java.util.ArrayList;
@@ -64,50 +72,83 @@ public class GameOceanengineOrderLogServiceImpl extends ServiceImpl<GameOceaneng
     private IAgentRpc agentRpc;
     @Autowired
     private NacosDynamicParamConfig dynamicParamConfig;
+    @Autowired
+    private IGameOceanengineOrderSplitLogService gameOceanengineOrderSplitLogService;
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public boolean callback(GameOceanengineOrderLog orderLog, boolean mustBack, Long backMoneyOfInput) {
-        boolean doBack;
-        Long backMoney;
-        String backMsg;
-        if (mustBack) {
-            doBack = true;
-            backMoney = backMoneyOfInput;
-            backMsg = "手动触发的回传";
-        } else {
-            if (!Objects.equals(orderLog.getOrderStatus(), OrderStatusEnum.SUCCESS_PAY.getValue())) {
-                // 头条只要回传支付订单
-                return true;
-            }
-            // 用户回传失败
-            GameOceanengineUserLog userLog = userLog(orderLog);
-            if (userLog == null) {
-                doBack = false;
-                backMoney = orderLog.getAmount();
-                backMsg = "回传失败!找不到回传用户";
-            } else {
-                GameBackPolicy gameBackPolicy = gameBackPolicyService.getById(orderLog.getBackPolicyId());
-                Tuple3<Boolean, Long, String> backInfo = BackPolicyUtil.backOrder(orderLog.getOrderNo(), gameBackPolicy, orderLog.getAmount(),
-                        orderLog.getIsFirstOrder(),
-                        orderLog.getPayTime(),
-                        // 此处使用用户最近一次的重新染色时间
-                        userLog.getCreateTime(),
-                        orderLog.getOpenId(),
-                        new OceanengineOrderBackPolicyCheck(this, userLog, orderLog, gameBackPolicy)
+    public boolean callback(GameOceanengineOrderLog orderLog) {
+        if (!Objects.equals(orderLog.getOrderStatus(), OrderStatusEnum.SUCCESS_PAY.getValue())) {
+            // 头条只要回传支付订单
+            return true;
+        }
+        GameOceanengineUserLog userLog = userLog(orderLog);
+        if (userLog == null) {
+            // 找不到用户
+            return update(new LambdaUpdateWrapper<GameOceanengineOrderLog>()
+                    .set(GameOceanengineOrderLog::getBackStatus, BackStatusEnum.NO)
+                    .set(GameOceanengineOrderLog::getBackMoney, orderLog.getAmount())
+                    .set(GameOceanengineOrderLog::getBackMsg, "回传失败!找不到回传用户")
+                    .eq(GameOceanengineOrderLog::getId, orderLog.getId())
+            );
+        }
+
+        GameBackPolicy gameBackPolicy = gameBackPolicyService.getById(orderLog.getBackPolicyId());
+        Tuple3<Boolean, Long, String> backInfo = BackPolicyUtil.backOrder(orderLog.getOrderNo(), gameBackPolicy, orderLog.getAmount(),
+                orderLog.getIsFirstOrder(),
+                orderLog.getPayTime(),
+                // 此处使用用户最近一次的重新染色时间
+                userLog.getCreateTime(),
+                orderLog.getOpenId(),
+                new OceanengineOrderBackPolicyCheck(this, userLog, orderLog, gameBackPolicy)
+        );
+        boolean doBack = backInfo.first;
+        Long backMoney = backInfo.second;
+        String backMsg = backInfo.third;
+
+        if (!doBack) {
+            // 不回传
+            return update(new LambdaUpdateWrapper<GameOceanengineOrderLog>()
+                    .set(GameOceanengineOrderLog::getBackStatus, BackStatusEnum.NO.getBackStatus())
+                    .set(GameOceanengineOrderLog::getBackMoney, backMoney)
+                    .set(GameOceanengineOrderLog::getBackMsg, backMsg)
+                    .eq(GameOceanengineOrderLog::getId, orderLog.getId())
+            );
+        }
+        // 拆单
+        Tuple3<Boolean, Long, List<Tuple2<Long, LocalDateTime>>> splitResult = BackPolicyUtil.splitOrder(gameBackPolicy, backMoney);
+        if (splitResult.first) {
+            // 需要拆单
+            List<GameOceanengineOrderSplitLog> splitOrderLogList = new ArrayList<>(splitResult.third.size());
+            for (int i = 0; i < splitResult.third.size(); i++) {
+                Tuple2<Long, LocalDateTime> splitOrder = splitResult.third.get(i);
+                splitOrderLogList.add(GameOceanengineOrderSplitLog.builder()
+                        .backDay(splitOrder.second.toLocalDate())
+                        .orderNo(orderLog.getOrderNo())
+                        .backIndex(i + 1)
+                        .backCount(splitResult.third.size())
+                        .splitMoney(splitOrder.first)
+                        .backTime(splitOrder.second)
+                        .backStatus(BackStatusEnum.NO.getBackStatus())
+                        .createTime(LocalDateTime.now())
+                        .build()
                 );
-                doBack = backInfo.first;
-                backMoney = backInfo.second;
-                backMsg = backInfo.third;
             }
+            gameOceanengineOrderSplitLogService.saveBatch(splitOrderLogList);
+            return update(new LambdaUpdateWrapper<GameOceanengineOrderLog>()
+                    .set(GameOceanengineOrderLog::getBackStatus, BackStatusEnum.NO.getBackStatus())
+                    .set(GameOceanengineOrderLog::getBackMoney, splitResult.second)
+                    .set(GameOceanengineOrderLog::getBackMsg, backMsg)
+                    .eq(GameOceanengineOrderLog::getId, orderLog.getId())
+            );
         }
-        BackStatusEnum backStatus = BackStatusEnum.NO;
-        orderLog.setBackMoney(backMoney);
-        if (doBack) {
-            backStatus = doCallback(orderLog);
+
+        Tuple2<BackStatusEnum, String> backResult = doCallback(orderLog, backMoney);
+        if (StringUtils.isNotBlank(backResult.second)) {
+            backMsg = backMsg + ("回传失败:" + backResult.second);
         }
         return update(new LambdaUpdateWrapper<GameOceanengineOrderLog>()
-                .set(GameOceanengineOrderLog::getBackStatus, backStatus.getBackStatus())
+                .set(GameOceanengineOrderLog::getBackStatus, backResult.first.getBackStatus())
                 .set(GameOceanengineOrderLog::getBackMoney, backMoney)
                 .set(GameOceanengineOrderLog::getBackMsg, backMsg)
                 .eq(GameOceanengineOrderLog::getId, orderLog.getId())
@@ -141,47 +182,62 @@ public class GameOceanengineOrderLogServiceImpl extends ServiceImpl<GameOceaneng
         return result;
     }
 
-    private List<GameOceanengineOrderLogVO> toVOBatch(List<GameOceanengineOrderLog> logList) {
-        if (CollectionUtils.isEmpty(logList)) {
-            return Collections.emptyList();
-        }
-        Set<String> agentKeys = logList.stream().map(GameOceanengineOrderLog::getAgentKey).filter(StringUtils::isNotBlank).collect(Collectors.toSet());
-        Map<String, AgentRpcVO> agentMap = CollectionUtils.isEmpty(agentKeys) ? Collections.emptyMap() : agentRpc.getByAgentKeys(new ArrayList<>(agentKeys))
-                .getData().stream().collect(Collectors.toMap(AgentRpcVO::getAgentKey, Function.identity()));
-        return logList.stream().map(log -> {
-            GameOceanengineOrderLogVO vo = toVOSimple(log);
-            if (StringUtils.isNotBlank(log.getAgentKey())) {
-                AgentRpcVO agent = agentMap.get(log.getAgentKey());
-                if (agent != null) {
-                    vo.setAgentName(agent.getAgentName());
-                }
-            }
-            return vo;
-        }).collect(Collectors.toList());
-
-    }
-
-    private GameOceanengineOrderLogVO toVOSimple(GameOceanengineOrderLog log) {
-        if (log == null) {
-            return null;
-        }
-        GameOceanengineOrderLogVO vo = BeanUtil.copy(log, GameOceanengineOrderLogVO.class);
-        vo.setRegPayIntervalTime(OrderUtil.regPayIntervalTime(log.getPayTime(), log.getRegTime()));
-        return vo;
-    }
-
     @Override
-    public boolean oceanengineOrderReport(List<Long> ids, Long backMoney) {
-        listByIds(ids).stream()
+    public boolean oceanengineOrderReport(OrderReportDTO dto) {
+        listByIds(dto.getOrderIds()).stream()
                 .filter(order -> !Objects.equals(order.getBackStatus(), BackStatusEnum.SUCCESS.getBackStatus()))
                 .forEach(orderLog -> {
-                    log.error("手动回传:{}-{}", orderLog.getId(), backMoney);
-                    callback(orderLog, true, backMoney);
+                    if (dto.getSplitOrder()) {
+                        log.error("手动拆单回传:{}-{}", orderLog.getId(), StringUtils.join(dto.getSplitMoney(), ","));
+                        List<GameOceanengineOrderSplitLog> splitOrderLogList = new ArrayList<>(dto.getSplitMoney().size());
+                        LocalDateTime beginTime = LocalDateTime.now();
+                        long backMoneyTotal = 0L;
+                        for (int i = 0; i < dto.getSplitMoney().size(); i++) {
+                            long backMoney = NumberUtil.multiply100(dto.getSplitMoney().get(i)).longValue();
+                            backMoneyTotal += backMoney;
+                            LocalDateTime backTime = beginTime;
+                            splitOrderLogList.add(GameOceanengineOrderSplitLog.builder()
+                                    .backDay(backTime.toLocalDate())
+                                    .orderNo(orderLog.getOrderNo())
+                                    .backIndex(i + 1)
+                                    .backCount(dto.getSplitMoney().size())
+                                    .splitMoney(backMoney)
+                                    .backTime(backTime)
+                                    .backStatus(BackStatusEnum.NO.getBackStatus())
+                                    .createTime(LocalDateTime.now())
+                                    .build()
+                            );
+                            beginTime = beginTime.plusMinutes(RandomUtils.nextInt(3, 10));
+                        }
+                        gameOceanengineOrderSplitLogService.saveBatch(splitOrderLogList);
+                        update(new LambdaUpdateWrapper<GameOceanengineOrderLog>()
+                                .set(GameOceanengineOrderLog::getBackStatus, BackStatusEnum.NO.getBackStatus())
+                                .set(GameOceanengineOrderLog::getBackMoney, backMoneyTotal)
+                                .set(GameOceanengineOrderLog::getBackMsg, "手动触发回传(拆单回传)")
+                                .eq(GameOceanengineOrderLog::getId, orderLog.getId())
+                        );
+                    } else {
+                        log.error("手动直接回传:{}-{}", orderLog.getId(), dto.getBackMoney());
+                        long backMoney = NumberUtil.multiply100(dto.getBackMoney()).longValue();
+                        Tuple2<BackStatusEnum, String> backResult = doCallback(orderLog, backMoney);
+                        String backMsg = "手动触发回传";
+                        if (StringUtils.isNotBlank(backResult.second)) {
+                            backMsg += ("回传失败:" + backResult.second);
+                        }
+                        update(new LambdaUpdateWrapper<GameOceanengineOrderLog>()
+                                .set(GameOceanengineOrderLog::getBackStatus, backResult.first.getBackStatus())
+                                .set(GameOceanengineOrderLog::getBackMoney, backMoney)
+                                .set(GameOceanengineOrderLog::getBackMsg, backMsg)
+                                .eq(GameOceanengineOrderLog::getId, orderLog.getId())
+                        );
+                    }
                 });
         return true;
     }
 
-    private BackStatusEnum doCallback(GameOceanengineOrderLog orderLog) {
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public Tuple2<BackStatusEnum, String> doCallback(GameOceanengineOrderLog orderLog, Long backMoney) {
         GameOceanengineUserLog userLog = userLog(orderLog);
         if (userLog == null) {
             gameOceanengineBackLogService.save(GameOceanengineBackLog.builder()
@@ -197,18 +253,16 @@ public class GameOceanengineOrderLogServiceImpl extends ServiceImpl<GameOceaneng
                     .backStatus(BackStatusEnum.FAILED.getBackStatus())
                     .errMsg("找不到用户注册信息")
                     .build());
-            return BackStatusEnum.FAILED;
+            return Tuple2.with(BackStatusEnum.FAILED, "找不到用户注册信息");
         }
-        Set<Long> keyAccountIds = StringUtils.isBlank(dynamicParamConfig.getBackOfKeyAccountIds()) ? Collections.emptySet() :
-                Arrays.stream(dynamicParamConfig.getBackOfKeyAccountIds().split(",")).map(Long::parseLong).collect(Collectors.toSet());
-        Integer eventType = keyAccountIds.contains(orderLog.getAccountId()) ? MiniGameCallback.EventType.GAME_ADDICTION.getEventType() : MiniGameCallback.EventType.ACTIVE_PAY.getEventType();
+        Integer eventType = MiniGameCallback.EventType.ACTIVE_PAY.getEventType();
         MiniGameCallback.MiniGameCallbackRequest request = MiniGameCallback.MiniGameCallbackRequest.builder()
                 .clue_token(userLog.getClueToken())
                 .open_id(orderLog.getOpenId())
                 .union_id(orderLog.getUnionId())
                 .event_type(String.valueOf(eventType))
                 .props(MiniGameCallback.MiniGameCallbackRequest.MiniGameCallbackRequestProps.builder()
-                        .pay_amount(orderLog.getBackMoney())
+                        .pay_amount(backMoney)
                         .build())
                 .build();
         BackStatusEnum backStatus = BackStatusEnum.SUCCESS;
@@ -237,7 +291,40 @@ public class GameOceanengineOrderLogServiceImpl extends ServiceImpl<GameOceaneng
                 .backStatus(backStatus.getBackStatus())
                 .errMsg(errMsg)
                 .build());
-        return backStatus;
+        return Tuple2.with(backStatus, errMsg);
+    }
+
+    private List<GameOceanengineOrderLogVO> toVOBatch(List<GameOceanengineOrderLog> logList) {
+        if (CollectionUtils.isEmpty(logList)) {
+            return Collections.emptyList();
+        }
+        List<GameOceanengineOrderSplitLogVO> orderSplitList = gameOceanengineOrderSplitLogService.listByOrderNo(logList.stream().map(GameOceanengineOrderLog::getOrderNo).collect(Collectors.toSet()));
+        Set<String> agentKeys = logList.stream().map(GameOceanengineOrderLog::getAgentKey).filter(StringUtils::isNotBlank).collect(Collectors.toSet());
+        Map<String, AgentRpcVO> agentMap = CollectionUtils.isEmpty(agentKeys) ? Collections.emptyMap() : agentRpc.getByAgentKeys(new ArrayList<>(agentKeys))
+                .getData().stream().collect(Collectors.toMap(AgentRpcVO::getAgentKey, Function.identity()));
+        return logList.stream().map(log -> {
+            GameOceanengineOrderLogVO vo = toVOSimple(log);
+            if (StringUtils.isNotBlank(log.getAgentKey())) {
+                AgentRpcVO agent = agentMap.get(log.getAgentKey());
+                if (agent != null) {
+                    vo.setAgentName(agent.getAgentName());
+                }
+
+            }
+            List<GameOceanengineOrderSplitLogVO> splitList = orderSplitList.stream().filter(obj -> obj.getOrderNo().equals(log.getOrderNo())).collect(Collectors.toList());
+            vo.setSplitOrderList(splitList);
+            return vo;
+        }).collect(Collectors.toList());
+
+    }
+
+    private GameOceanengineOrderLogVO toVOSimple(GameOceanengineOrderLog log) {
+        if (log == null) {
+            return null;
+        }
+        GameOceanengineOrderLogVO vo = BeanUtil.copy(log, GameOceanengineOrderLogVO.class);
+        vo.setRegPayIntervalTime(OrderUtil.regPayIntervalTime(log.getPayTime(), log.getRegTime()));
+        return vo;
     }
 
     private GameOceanengineUserLog userLog(GameOceanengineOrderLog orderLog) {

+ 47 - 0
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/service/impl/GameOceanengineOrderSplitLogServiceImpl.java

@@ -0,0 +1,47 @@
+package com.zanxiang.game.back.serve.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zanxiang.game.back.serve.dao.mapper.GameOceanengineOrderSplitLogMapper;
+import com.zanxiang.game.back.serve.pojo.entity.GameOceanengineOrderSplitLog;
+import com.zanxiang.game.back.serve.pojo.vo.GameOceanengineOrderSplitLogVO;
+import com.zanxiang.game.back.serve.service.IGameOceanengineOrderSplitLogService;
+import com.zanxiang.module.util.NumberUtil;
+import com.zanxiang.module.util.bean.BeanUtil;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
+import org.springframework.stereotype.Service;
+
+import java.math.BigDecimal;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+@Slf4j
+@Service
+public class GameOceanengineOrderSplitLogServiceImpl extends ServiceImpl<GameOceanengineOrderSplitLogMapper, GameOceanengineOrderSplitLog>
+        implements IGameOceanengineOrderSplitLogService {
+
+    @Override
+    public List<GameOceanengineOrderSplitLogVO> listByOrderNo(Collection<String> orderNos) {
+        if (CollectionUtils.isEmpty(orderNos)) {
+            return Collections.emptyList();
+        }
+        return list(new LambdaQueryWrapper<GameOceanengineOrderSplitLog>()
+                .eq(GameOceanengineOrderSplitLog::getOrderNo, orderNos)
+                .orderByAsc(GameOceanengineOrderSplitLog::getBackIndex)
+        ).stream().map(this::toVOSimple).collect(Collectors.toList());
+    }
+
+    private GameOceanengineOrderSplitLogVO toVOSimple(GameOceanengineOrderSplitLog log) {
+        if (log == null) {
+            return null;
+        }
+        GameOceanengineOrderSplitLogVO vo = BeanUtil.copy(log, GameOceanengineOrderSplitLogVO.class);
+        if (log.getSplitMoney() != null) {
+            vo.setSplitMoney(NumberUtil.divide100(new BigDecimal(log.getSplitMoney())));
+        }
+        return vo;
+    }
+}

+ 16 - 14
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/service/impl/GameTencentMiniGameBackLogServiceImpl.java

@@ -1,6 +1,7 @@
 package com.zanxiang.game.back.serve.service.impl;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.sd4324530.jtuple.Tuple2;
 import com.zanxiang.advertising.tencent.base.pojo.dto.UserActionRpcDTO;
 import com.zanxiang.game.back.base.pojo.enums.OrderStatusEnum;
 import com.zanxiang.game.back.serve.dao.mapper.GameTencentMiniGameBackLogMapper;
@@ -40,7 +41,7 @@ public class GameTencentMiniGameBackLogServiceImpl extends ServiceImpl<GameTence
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public BackStatusEnum userBack(GameTencentMiniGameUser userLog) {
+    public Tuple2<BackStatusEnum, String> userBack(GameTencentMiniGameUser userLog) {
         GameTencentMiniGameBackLog backLog = GameTencentMiniGameBackLog.builder()
                 .gameId(userLog.getGameId())
                 .adAccountId(userLog.getAdAccountId())
@@ -51,14 +52,16 @@ public class GameTencentMiniGameBackLogServiceImpl extends ServiceImpl<GameTence
                 .actionType(ActionTypeEnum.REGISTER.getActionType())
                 .createTime(LocalDateTime.now())
                 .build();
-        callback(backLog);
+        Tuple2<BackStatusEnum, String> backResult = callback(backLog);
+        backLog.setBackStatus(backResult.first.getBackStatus());
+        backLog.setErrMsg(backResult.second);
         save(backLog);
-        return BackStatusEnum.getByValue(backLog.getBackStatus());
+        return backResult;
     }
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public BackStatusEnum orderBack(GameTencentMiniGameOrder orderLog) {
+    public Tuple2<BackStatusEnum, String> orderBack(GameTencentMiniGameOrder orderLog, Long backMoney) {
         String actionType = orderLog.getOrderStatus().equals(OrderStatusEnum.SUCCESS_PAY.getValue()) ?
                 ActionTypeEnum.PURCHASE.getActionType() : ActionTypeEnum.COMPLETE_ORDER.getActionType();
         GameTencentMiniGameBackLog backLog = GameTencentMiniGameBackLog.builder()
@@ -69,13 +72,15 @@ public class GameTencentMiniGameBackLogServiceImpl extends ServiceImpl<GameTence
                 .wechatOpenid(orderLog.getWechatOpenid())
                 .wechatAppId(orderLog.getWechatAppId())
                 .actionType(actionType)
-                .amount(orderLog.getBackMoney())
+                .amount(backMoney)
                 .orderId(orderLog.getOrderId())
                 .createTime(LocalDateTime.now())
                 .build();
-        callback(backLog);
+        Tuple2<BackStatusEnum, String> backResult = callback(backLog);
+        backLog.setBackStatus(backResult.first.getBackStatus());
+        backLog.setErrMsg(backResult.second);
         save(backLog);
-        return BackStatusEnum.getByValue(backLog.getBackStatus());
+        return backResult;
     }
 
     @Override
@@ -96,7 +101,7 @@ public class GameTencentMiniGameBackLogServiceImpl extends ServiceImpl<GameTence
         return BackStatusEnum.getByValue(backLog.getBackStatus());
     }
 
-    private void callback(GameTencentMiniGameBackLog backLog) {
+    private Tuple2<BackStatusEnum, String> callback(GameTencentMiniGameBackLog backLog) {
         Map<String, Object> actionParam = null;
         if (backLog.getAmount() != null) {
             actionParam = new HashMap<>(2);
@@ -119,16 +124,13 @@ public class GameTencentMiniGameBackLogServiceImpl extends ServiceImpl<GameTence
             log.error("腾讯小游戏回传完成:{}", JsonUtil.toString(response.getBody()));
             if (response.getStatusCode().is2xxSuccessful()) {
                 if (Objects.equals(response.getBody().get("code").toString(), "0")) {
-                    backLog.setBackStatus(BackStatusEnum.SUCCESS.getBackStatus());
-                    return;
+                    return Tuple2.with(BackStatusEnum.SUCCESS, null);
                 }
             }
-            backLog.setBackStatus(BackStatusEnum.FAILED.getBackStatus());
-            backLog.setErrMsg(JsonUtil.toString(response.getBody()));
+            return Tuple2.with(BackStatusEnum.FAILED, JsonUtil.toString(response.getBody()));
         } catch (Exception e) {
             log.error(e.getMessage(), e);
-            backLog.setBackStatus(BackStatusEnum.FAILED.getBackStatus());
-            backLog.setErrMsg(e.getMessage());
+            return Tuple2.with(BackStatusEnum.FAILED, e.getMessage());
         }
     }
 

+ 129 - 46
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/service/impl/GameTencentMiniGameOrderServiceImpl.java

@@ -6,6 +6,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.Tuple2;
 import com.github.sd4324530.jtuple.Tuple3;
 import com.zanxiang.advertising.tencent.base.AdvertisingTencentServer;
 import com.zanxiang.advertising.tencent.base.rpc.IUserActionSetRpc;
@@ -14,24 +15,31 @@ import com.zanxiang.erp.base.rpc.ISysUserRpc;
 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.dto.OrderReportDTO;
 import com.zanxiang.game.back.serve.pojo.entity.GameBackPolicy;
 import com.zanxiang.game.back.serve.pojo.entity.GameTencentMiniGameOrder;
+import com.zanxiang.game.back.serve.pojo.entity.GameTencentMiniGameOrderSplitLog;
 import com.zanxiang.game.back.serve.pojo.entity.GameTencentMiniGameUser;
+import com.zanxiang.game.back.serve.pojo.entity.GameTencentOrderSplitLog;
 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.pojo.vo.GameTencentMiniOrderSplitLogVO;
 import com.zanxiang.game.back.serve.service.IGameBackPolicyService;
 import com.zanxiang.game.back.serve.service.IGameTencentMiniGameBackLogService;
 import com.zanxiang.game.back.serve.service.IGameTencentMiniGameOrderService;
+import com.zanxiang.game.back.serve.service.IGameTencentMiniGameOrderSplitLogService;
 import com.zanxiang.game.back.serve.service.IGameTencentMiniGameUserService;
 import com.zanxiang.game.back.serve.utils.BackPolicyUtil;
 import com.zanxiang.game.back.serve.utils.OrderUtil;
 import com.zanxiang.game.module.base.ServerInfo;
 import com.zanxiang.game.module.base.pojo.vo.AgentRpcVO;
 import com.zanxiang.game.module.base.rpc.IAgentRpc;
+import com.zanxiang.module.util.NumberUtil;
 import com.zanxiang.module.util.bean.BeanUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.lang3.RandomUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.dubbo.config.annotation.DubboReference;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -66,60 +74,91 @@ public class GameTencentMiniGameOrderServiceImpl extends ServiceImpl<GameTencent
     private IGameBackPolicyService gameBackPolicyService;
     @DubboReference(providedBy = ServerInfo.SERVER_DUBBO_NAME)
     private IAgentRpc agentRpc;
+    @Autowired
+    private IGameTencentMiniGameOrderSplitLogService gameTencentMiniGameOrderSplitLogService;
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public boolean orderBack(GameTencentMiniGameOrder orderLog, boolean mustBack, Long backMoneyOfInput) {
+    public boolean orderBack(GameTencentMiniGameOrder orderLog) {
         if (StringUtils.isBlank(orderLog.getClickId())) {
             // 没有点击 id(之后做监测链接,从监测链接里面找)
             return false;
         }
-        boolean doBack;
-        Long backMoney;
-        String backMsg;
-        if (mustBack) {
-            doBack = true;
-            backMoney = backMoneyOfInput;
-            backMsg = "手动触发的回传";
-        } else {
-            if (!Objects.equals(orderLog.getOrderStatus(), OrderStatusEnum.SUCCESS_PAY.getValue())) {
-                // 只要回传 支付行为
-                return true;
-            }
-            GameTencentMiniGameUser userLog = gameTencentMiniGameUserService.getOne(new LambdaQueryWrapper<GameTencentMiniGameUser>()
-                    .eq(GameTencentMiniGameUser::getGameId, orderLog.getGameId())
-                    .eq(GameTencentMiniGameUser::getWechatAppId, orderLog.getWechatAppId())
-                    .eq(GameTencentMiniGameUser::getWechatOpenid, orderLog.getWechatOpenid())
-                    .eq(GameTencentMiniGameUser::getAdAccountId, orderLog.getAdAccountId())
-                    .orderByDesc(GameTencentMiniGameUser::getCreateTime)
-                    .last("limit 1")
+        if (!Objects.equals(orderLog.getOrderStatus(), OrderStatusEnum.SUCCESS_PAY.getValue())) {
+            // 只要回传 支付行为
+            return true;
+        }
+        GameTencentMiniGameUser userLog = gameTencentMiniGameUserService.getOne(new LambdaQueryWrapper<GameTencentMiniGameUser>()
+                .eq(GameTencentMiniGameUser::getGameId, orderLog.getGameId())
+                .eq(GameTencentMiniGameUser::getWechatAppId, orderLog.getWechatAppId())
+                .eq(GameTencentMiniGameUser::getWechatOpenid, orderLog.getWechatOpenid())
+                .eq(GameTencentMiniGameUser::getAdAccountId, orderLog.getAdAccountId())
+                .orderByDesc(GameTencentMiniGameUser::getCreateTime)
+                .last("limit 1")
+        );
+        if (userLog == null) {
+            return update(new LambdaUpdateWrapper<GameTencentMiniGameOrder>()
+                    .set(GameTencentMiniGameOrder::getBackStatus, BackStatusEnum.FAILED.getBackStatus())
+                    .set(GameTencentMiniGameOrder::getBackMoney, orderLog.getRechargeMoney())
+                    .set(GameTencentMiniGameOrder::getBackMsg, "回传失败!找不到回传用户")
+                    .eq(GameTencentMiniGameOrder::getId, orderLog.getId())
             );
-            if (userLog == null) {
-                doBack = false;
-                backMoney = orderLog.getRechargeMoney();
-                backMsg = "回传失败!找不到回传用户";
-            } else {
-                GameBackPolicy gameBackPolicy = gameBackPolicyService.getById(orderLog.getBackPolicyId());
-                // 此处是否是首单用 limit 2。因为在执行判断之前订单已入库,所以库里只有一笔才是首单
-                Tuple3<Boolean, Long, String> backInfo = BackPolicyUtil.backOrder(orderLog.getOrderId(), gameBackPolicy, orderLog.getRechargeMoney(),
-                        orderLog.getIsFirstOrder(),
-                        orderLog.getPayTime(),
-                        // 此处使用用户最近一次的重新染色时间
-                        userLog.getCreateTime(),
-                        orderLog.getWechatOpenid(),
-                        new TencentMiniGameOrderBackPolicyCheck(this, gameBackPolicy, userLog, orderLog));
-                doBack = backInfo.first;
-                backMoney = backInfo.second;
-                backMsg = backInfo.third;
+        }
+
+        GameBackPolicy gameBackPolicy = gameBackPolicyService.getById(orderLog.getBackPolicyId());
+        // 此处是否是首单用 limit 2。因为在执行判断之前订单已入库,所以库里只有一笔才是首单
+        Tuple3<Boolean, Long, String> backInfo = BackPolicyUtil.backOrder(orderLog.getOrderId(), gameBackPolicy, orderLog.getRechargeMoney(),
+                orderLog.getIsFirstOrder(),
+                orderLog.getPayTime(),
+                // 此处使用用户最近一次的重新染色时间
+                userLog.getCreateTime(),
+                orderLog.getWechatOpenid(),
+                new TencentMiniGameOrderBackPolicyCheck(this, gameBackPolicy, userLog, orderLog));
+        boolean doBack = backInfo.first;
+        Long backMoney = backInfo.second;
+        String backMsg = backInfo.third;
+
+        if (!doBack) {
+            return update(new LambdaUpdateWrapper<GameTencentMiniGameOrder>()
+                    .set(GameTencentMiniGameOrder::getBackStatus, BackStatusEnum.NO.getBackStatus())
+                    .set(GameTencentMiniGameOrder::getBackMoney, backMoney)
+                    .set(GameTencentMiniGameOrder::getBackMsg, backMsg)
+                    .eq(GameTencentMiniGameOrder::getId, orderLog.getId())
+            );
+        }
+        // 拆单
+        Tuple3<Boolean, Long, List<Tuple2<Long, LocalDateTime>>> splitResult = BackPolicyUtil.splitOrder(gameBackPolicy, backMoney);
+        if (splitResult.first) {
+            // 需要拆单
+            List<GameTencentMiniGameOrderSplitLog> splitOrderLogList = new ArrayList<>(splitResult.third.size());
+            for (int i = 0; i < splitResult.third.size(); i++) {
+                Tuple2<Long, LocalDateTime> splitOrder = splitResult.third.get(i);
+                splitOrderLogList.add(GameTencentMiniGameOrderSplitLog.builder()
+                        .backDay(splitOrder.second.toLocalDate())
+                        .orderNo(orderLog.getOrderId())
+                        .backIndex(i + 1)
+                        .backCount(splitResult.third.size())
+                        .splitMoney(splitOrder.first)
+                        .backTime(splitOrder.second)
+                        .backStatus(BackStatusEnum.NO.getBackStatus())
+                        .createTime(LocalDateTime.now())
+                        .build());
             }
+            gameTencentMiniGameOrderSplitLogService.saveBatch(splitOrderLogList);
+            return update(new LambdaUpdateWrapper<GameTencentMiniGameOrder>()
+                    .set(GameTencentMiniGameOrder::getBackStatus, BackStatusEnum.NO.getBackStatus())
+                    .set(GameTencentMiniGameOrder::getBackMoney, splitResult.second)
+                    .set(GameTencentMiniGameOrder::getBackMsg, backMsg)
+                    .eq(GameTencentMiniGameOrder::getId, orderLog.getId())
+            );
         }
-        BackStatusEnum backStatus = BackStatusEnum.NO;
-        orderLog.setBackMoney(backMoney);
-        if (doBack) {
-            backStatus = gameTencentMiniGameBackLogService.orderBack(orderLog);
+
+        Tuple2<BackStatusEnum, String> backResult = gameTencentMiniGameBackLogService.orderBack(orderLog, backMoney);
+        if (StringUtils.isNotBlank(backResult.second)) {
+            backMsg = backMsg + ("回传失败:" + backResult.second);
         }
         return update(new LambdaUpdateWrapper<GameTencentMiniGameOrder>()
-                .set(GameTencentMiniGameOrder::getBackStatus, backStatus.getBackStatus())
+                .set(GameTencentMiniGameOrder::getBackStatus, backResult.first.getBackStatus())
                 .set(GameTencentMiniGameOrder::getBackMoney, backMoney)
                 .set(GameTencentMiniGameOrder::getBackMsg, backMsg)
                 .eq(GameTencentMiniGameOrder::getId, orderLog.getId())
@@ -154,12 +193,53 @@ public class GameTencentMiniGameOrderServiceImpl extends ServiceImpl<GameTencent
     }
 
     @Override
-    public boolean doReport(List<Long> orderLogIds, Long backMoney) {
-        listByIds(orderLogIds).stream()
+    public boolean doReport(OrderReportDTO dto) {
+        listByIds(dto.getOrderIds()).stream()
                 .filter(order -> !Objects.equals(order.getBackStatus(), BackStatusEnum.SUCCESS.getBackStatus()))
                 .forEach(orderLog -> {
-                    log.error("手动回传:{}-{}", orderLog.getId(), backMoney);
-                    orderBack(orderLog, true, backMoney);
+                    if (dto.getSplitOrder()) {
+                        log.error("手动拆单回传:{}-{}", orderLog.getId(), StringUtils.join(dto.getSplitMoney(), ","));
+                        List<GameTencentMiniGameOrderSplitLog> splitOrderLogList = new ArrayList<>(dto.getSplitMoney().size());
+                        LocalDateTime beginTime = LocalDateTime.now();
+                        long backMoneyTotal = 0L;
+                        for (int i = 0; i < dto.getSplitMoney().size(); i++) {
+                            long backMoney = NumberUtil.multiply100(dto.getSplitMoney().get(i)).longValue();
+                            LocalDateTime backTime = beginTime;
+                            backMoneyTotal += backMoney;
+                            splitOrderLogList.add(GameTencentMiniGameOrderSplitLog.builder()
+                                    .backDay(backTime.toLocalDate())
+                                    .orderNo(orderLog.getOrderId())
+                                    .backIndex(i + 1)
+                                    .backCount(dto.getSplitMoney().size())
+                                    .splitMoney(backMoney)
+                                    .backTime(backTime)
+                                    .backStatus(BackStatusEnum.NO.getBackStatus())
+                                    .createTime(LocalDateTime.now())
+                                    .build());
+                            beginTime = beginTime.plusMinutes(RandomUtils.nextInt(3, 10));
+                        }
+                        gameTencentMiniGameOrderSplitLogService.saveBatch(splitOrderLogList);
+                        update(new LambdaUpdateWrapper<GameTencentMiniGameOrder>()
+                                .set(GameTencentMiniGameOrder::getBackStatus, BackStatusEnum.NO.getBackStatus())
+                                .set(GameTencentMiniGameOrder::getBackMoney, backMoneyTotal)
+                                .set(GameTencentMiniGameOrder::getBackMsg, "手动触发回传(拆单回传)")
+                                .eq(GameTencentMiniGameOrder::getId, orderLog.getId())
+                        );
+                    } else {
+                        log.error("手动直接回传:{}-{}", orderLog.getId(), dto.getBackMoney());
+                        long backMoney = NumberUtil.multiply100(dto.getBackMoney()).longValue();
+                        Tuple2<BackStatusEnum, String> backResult = gameTencentMiniGameBackLogService.orderBack(orderLog, backMoney);
+                        String backMsg = "手动触发回传!";
+                        if (StringUtils.isNotBlank(backResult.second)) {
+                            backMsg += ("回传失败:" + backResult.second);
+                        }
+                        update(new LambdaUpdateWrapper<GameTencentMiniGameOrder>()
+                                .set(GameTencentMiniGameOrder::getBackStatus, backResult.first.getBackStatus())
+                                .set(GameTencentMiniGameOrder::getBackMoney, backMoney)
+                                .set(GameTencentMiniGameOrder::getBackMsg, backMsg)
+                                .eq(GameTencentMiniGameOrder::getId, orderLog.getId())
+                        );
+                    }
                 });
         return true;
     }
@@ -168,6 +248,7 @@ public class GameTencentMiniGameOrderServiceImpl extends ServiceImpl<GameTencent
         if (CollectionUtils.isEmpty(logList)) {
             return Collections.emptyList();
         }
+        List<GameTencentMiniOrderSplitLogVO> orderSplitList = gameTencentMiniGameOrderSplitLogService.listByOrderNo(logList.stream().map(GameTencentMiniGameOrder::getOrderId).collect(Collectors.toList()));
         Set<String> agentKeys = logList.stream().map(GameTencentMiniGameOrder::getAgentKey).filter(StringUtils::isNotBlank).collect(Collectors.toSet());
         Map<String, AgentRpcVO> agentMap = CollectionUtils.isEmpty(agentKeys) ? Collections.emptyMap() : agentRpc.getByAgentKeys(new ArrayList<>(agentKeys))
                 .getData().stream().collect(Collectors.toMap(AgentRpcVO::getAgentKey, Function.identity()));
@@ -179,6 +260,8 @@ public class GameTencentMiniGameOrderServiceImpl extends ServiceImpl<GameTencent
                     vo.setAgentName(agent.getAgentName());
                 }
             }
+            List<GameTencentMiniOrderSplitLogVO> splitList = orderSplitList.stream().filter(obj -> obj.getOrderNo().equals(log.getOrderId())).collect(Collectors.toList());
+            vo.setSplitOrderList(splitList);
             return vo;
         }).collect(Collectors.toList());
     }

+ 47 - 0
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/service/impl/GameTencentMiniGameOrderSplitLogServiceImpl.java

@@ -0,0 +1,47 @@
+package com.zanxiang.game.back.serve.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zanxiang.game.back.serve.dao.mapper.GameTencentMiniGameOrderSplitLogMapper;
+import com.zanxiang.game.back.serve.pojo.entity.GameTencentMiniGameOrderSplitLog;
+import com.zanxiang.game.back.serve.pojo.vo.GameTencentMiniOrderSplitLogVO;
+import com.zanxiang.game.back.serve.service.IGameTencentMiniGameOrderSplitLogService;
+import com.zanxiang.module.util.NumberUtil;
+import com.zanxiang.module.util.bean.BeanUtil;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
+import org.springframework.stereotype.Service;
+
+import java.math.BigDecimal;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+@Slf4j
+@Service
+public class GameTencentMiniGameOrderSplitLogServiceImpl extends ServiceImpl<GameTencentMiniGameOrderSplitLogMapper, GameTencentMiniGameOrderSplitLog>
+        implements IGameTencentMiniGameOrderSplitLogService {
+
+    @Override
+    public List<GameTencentMiniOrderSplitLogVO> listByOrderNo(Collection<String> orderNos) {
+        if (CollectionUtils.isEmpty(orderNos)) {
+            return Collections.emptyList();
+        }
+        return list(new LambdaQueryWrapper<GameTencentMiniGameOrderSplitLog>()
+                .eq(GameTencentMiniGameOrderSplitLog::getOrderNo, orderNos)
+                .orderByAsc(GameTencentMiniGameOrderSplitLog::getBackIndex)
+        ).stream().map(this::toVOSimple).collect(Collectors.toList());
+    }
+
+    private GameTencentMiniOrderSplitLogVO toVOSimple(GameTencentMiniGameOrderSplitLog log) {
+        if (log == null) {
+            return null;
+        }
+        GameTencentMiniOrderSplitLogVO vo = BeanUtil.copy(log, GameTencentMiniOrderSplitLogVO.class);
+        if (log.getSplitMoney() != null) {
+            vo.setSplitMoney(NumberUtil.divide100(new BigDecimal(log.getSplitMoney())));
+        }
+        return vo;
+    }
+}

+ 134 - 49
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/service/impl/GameTencentOrderServiceImpl.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 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.Tuple2;
 import com.github.sd4324530.jtuple.Tuple3;
 import com.zanxiang.advertising.tencent.base.AdvertisingTencentServer;
 import com.zanxiang.advertising.tencent.base.pojo.dto.DataReportOfAppIdRpcDTO;
@@ -14,30 +15,36 @@ import com.zanxiang.erp.base.ErpServer;
 import com.zanxiang.erp.base.rpc.ISysUserRpc;
 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.dto.OrderReportDTO;
 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.entity.GameTencentOrderSplitLog;
 import com.zanxiang.game.back.serve.pojo.entity.GameTencentUser;
 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.enums.BackUnitEnum;
+import com.zanxiang.game.back.serve.pojo.vo.GameTencentOrderSplitLogVO;
 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;
 import com.zanxiang.game.back.serve.service.IGameTencentOrderService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zanxiang.game.back.serve.service.IGameTencentOrderSplitLogService;
 import com.zanxiang.game.back.serve.service.IGameTencentUserService;
 import com.zanxiang.game.back.serve.utils.BackPolicyUtil;
 import com.zanxiang.game.back.serve.utils.OrderUtil;
 import com.zanxiang.game.module.base.ServerInfo;
 import com.zanxiang.game.module.base.pojo.vo.AgentRpcVO;
 import com.zanxiang.game.module.base.rpc.IAgentRpc;
+import com.zanxiang.module.util.NumberUtil;
 import com.zanxiang.module.util.bean.BeanUtil;
 import com.zanxiang.module.util.pojo.ResultVO;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.lang3.RandomUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.dubbo.config.annotation.DubboReference;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -66,7 +73,8 @@ import java.util.stream.Collectors;
  */
 @Slf4j
 @Service
-public class GameTencentOrderServiceImpl extends ServiceImpl<GameTencentOrderMapper, GameTencentOrder> implements IGameTencentOrderService {
+public class GameTencentOrderServiceImpl extends ServiceImpl<GameTencentOrderMapper, GameTencentOrder>
+        implements IGameTencentOrderService {
     @DubboReference(providedBy = AdvertisingTencentServer.SERVER_DUBBO_NAME)
     private IUserActionSetRpc userActionSetRpc;
     @DubboReference(providedBy = ErpServer.SERVER_DUBBO_NAME)
@@ -79,54 +87,85 @@ public class GameTencentOrderServiceImpl extends ServiceImpl<GameTencentOrderMap
     private IAgentRpc agentRpc;
     @Autowired
     private IGameTencentUserService gameTencentUserService;
+    @Autowired
+    private IGameTencentOrderSplitLogService gameTencentOrderSplitLogService;
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public boolean orderBack(GameTencentOrder orderLog, boolean mustBack, Long backMoneyOfInput) {
-        boolean doBack;
-        Long backMoney;
-        String backMsg;
-        if (mustBack) {
-            doBack = true;
-            backMoney = backMoneyOfInput;
-            backMsg = "手动触发的回传";
-        } else {
-            if (!Objects.equals(orderLog.getOrderStatus(), OrderStatusEnum.SUCCESS_PAY.getValue())) {
-                // 只要回传 支付行为
-                return false;
-            }
-            GameTencentUser userLog = gameTencentUserService.getOne(new LambdaQueryWrapper<GameTencentUser>()
-                    .eq(GameTencentUser::getGameId, orderLog.getGameId())
-                    .eq(GameTencentUser::getWechatAppId, orderLog.getWechatAppId())
-                    .eq(GameTencentUser::getWechatOpenid, orderLog.getWechatOpenid())
-                    .eq(GameTencentUser::getAdAccountId, orderLog.getAdAccountId())
-                    .orderByDesc(GameTencentUser::getCreateTime)
-                    .last("limit 1")
-            );if (userLog == null) {
-                doBack = false;
-                backMoney = orderLog.getRechargeMoney();
-                backMsg = "回传失败!找不到回传用户";
-            } else {
-                GameBackPolicy gameBackPolicy = gameBackPolicyService.getById(orderLog.getBackPolicyId());
-                Tuple3<Boolean, Long, String> backInfo = BackPolicyUtil.backOrder(orderLog.getOrderId(), gameBackPolicy, orderLog.getRechargeMoney(),
-                        orderLog.getIsFirstOrder(),
-                        orderLog.getPayTime(),
-                        // 此处使用用户最近一次的重新染色时间
-                        userLog.getCreateTime(),
-                        orderLog.getWechatOpenid(),
-                        new TencentOrderBackPolicyCheck(this, gameBackPolicy, userLog, orderLog));
-                doBack = backInfo.first;
-                backMoney = backInfo.second;
-                backMsg = backInfo.third;
+    public boolean orderBack(GameTencentOrder orderLog) {
+        if (!Objects.equals(orderLog.getOrderStatus(), OrderStatusEnum.SUCCESS_PAY.getValue())) {
+            // 只要回传 支付行为
+            return false;
+        }
+        GameTencentUser userLog = gameTencentUserService.getOne(new LambdaQueryWrapper<GameTencentUser>()
+                .eq(GameTencentUser::getGameId, orderLog.getGameId())
+                .eq(GameTencentUser::getWechatAppId, orderLog.getWechatAppId())
+                .eq(GameTencentUser::getWechatOpenid, orderLog.getWechatOpenid())
+                .eq(GameTencentUser::getAdAccountId, orderLog.getAdAccountId())
+                .orderByDesc(GameTencentUser::getCreateTime)
+                .last("limit 1")
+        );
+        if (userLog == null) {
+            return update(new LambdaUpdateWrapper<GameTencentOrder>()
+                    .set(GameTencentOrder::getIsBack, BackStatusEnum.FAILED.getBackStatus())
+                    .set(GameTencentOrder::getBackMoney, orderLog.getRechargeMoney())
+                    .set(GameTencentOrder::getBackMsg, "回传失败!找不到回传用户")
+                    .eq(GameTencentOrder::getId, orderLog.getId())
+            );
+        }
+
+        GameBackPolicy gameBackPolicy = gameBackPolicyService.getById(orderLog.getBackPolicyId());
+        Tuple3<Boolean, Long, String> backInfo = BackPolicyUtil.backOrder(orderLog.getOrderId(), gameBackPolicy, orderLog.getRechargeMoney(),
+                orderLog.getIsFirstOrder(),
+                orderLog.getPayTime(),
+                // 此处使用用户最近一次的重新染色时间
+                userLog.getCreateTime(),
+                orderLog.getWechatOpenid(),
+                new TencentOrderBackPolicyCheck(this, gameBackPolicy, userLog, orderLog));
+        boolean doBack = backInfo.first;
+        Long backMoney = backInfo.second;
+        String backMsg = backInfo.third;
+        if (!doBack) {
+            return update(new LambdaUpdateWrapper<GameTencentOrder>()
+                    .set(GameTencentOrder::getIsBack, BackStatusEnum.NO.getBackStatus())
+                    .set(GameTencentOrder::getBackMoney, backMoney)
+                    .set(GameTencentOrder::getBackMsg, backMsg)
+                    .eq(GameTencentOrder::getId, orderLog.getId())
+            );
+        }
+        // 拆单
+        Tuple3<Boolean, Long, List<Tuple2<Long, LocalDateTime>>> splitResult = BackPolicyUtil.splitOrder(gameBackPolicy, backMoney);
+        if (splitResult.first) {
+            // 需要拆单
+            List<GameTencentOrderSplitLog> splitOrderLogList = new ArrayList<>(splitResult.third.size());
+            for (int i = 0; i < splitResult.third.size(); i++) {
+                Tuple2<Long, LocalDateTime> splitOrder = splitResult.third.get(i);
+                splitOrderLogList.add(GameTencentOrderSplitLog.builder()
+                        .backDay(splitOrder.second.toLocalDate())
+                        .orderNo(orderLog.getOrderId())
+                        .backIndex(i + 1)
+                        .backCount(splitResult.third.size())
+                        .splitMoney(splitOrder.first)
+                        .backTime(splitOrder.second)
+                        .backStatus(BackStatusEnum.NO.getBackStatus())
+                        .createTime(LocalDateTime.now())
+                        .build());
             }
+            gameTencentOrderSplitLogService.saveBatch(splitOrderLogList);
+            return update(new LambdaUpdateWrapper<GameTencentOrder>()
+                    .set(GameTencentOrder::getIsBack, BackStatusEnum.NO.getBackStatus())
+                    .set(GameTencentOrder::getBackMoney, splitResult.second)
+                    .set(GameTencentOrder::getBackMsg, backMsg)
+                    .eq(GameTencentOrder::getId, orderLog.getId())
+            );
         }
-        BackStatusEnum backStatus = BackStatusEnum.NO;
-        orderLog.setBackMoney(backMoney);
-        if (doBack) {
-            backStatus = doCallback(orderLog);
+
+        Tuple2<BackStatusEnum, String> backResult = doCallback(orderLog, backMoney);
+        if (StringUtils.isNotBlank(backResult.second)) {
+            backMsg = backMsg + ("回传失败:" + backResult.second);
         }
         return update(new LambdaUpdateWrapper<GameTencentOrder>()
-                .set(GameTencentOrder::getIsBack, backStatus.getBackStatus())
+                .set(GameTencentOrder::getIsBack, backResult.first.getBackStatus())
                 .set(GameTencentOrder::getBackMoney, backMoney)
                 .set(GameTencentOrder::getBackMsg, backMsg)
                 .eq(GameTencentOrder::getId, orderLog.getId())
@@ -165,6 +204,7 @@ public class GameTencentOrderServiceImpl extends ServiceImpl<GameTencentOrderMap
         if (CollectionUtils.isEmpty(logList)) {
             return Collections.emptyList();
         }
+        List<GameTencentOrderSplitLogVO> orderSplitList = gameTencentOrderSplitLogService.listByOrderNo(logList.stream().map(GameTencentOrder::getOrderId).collect(Collectors.toList()));
         Set<String> agentKeys = logList.stream().map(GameTencentOrder::getChannel).filter(StringUtils::isNotBlank).collect(Collectors.toSet());
         Map<String, AgentRpcVO> agentMap = CollectionUtils.isEmpty(agentKeys) ? Collections.emptyMap() : agentRpc.getByAgentKeys(new ArrayList<>(agentKeys))
                 .getData().stream().collect(Collectors.toMap(AgentRpcVO::getAgentKey, Function.identity()));
@@ -176,6 +216,8 @@ public class GameTencentOrderServiceImpl extends ServiceImpl<GameTencentOrderMap
                     vo.setAgentName(agent.getAgentName());
                 }
             }
+            List<GameTencentOrderSplitLogVO> splitList = orderSplitList.stream().filter(obj -> obj.getOrderNo().equals(log.getOrderId())).collect(Collectors.toList());
+            vo.setSplitOrderList(splitList);
             return vo;
         }).collect(Collectors.toList());
     }
@@ -190,22 +232,65 @@ public class GameTencentOrderServiceImpl extends ServiceImpl<GameTencentOrderMap
     }
 
     @Override
-    public boolean tencentOrderReport(List<Long> ids, Long backMoney) {
-        listByIds(ids).stream()
+    public boolean tencentOrderReport(OrderReportDTO dto) {
+        listByIds(dto.getOrderIds()).stream()
                 .filter(order -> !Objects.equals(order.getIsBack(), BackStatusEnum.SUCCESS.getBackStatus()))
                 .forEach(orderLog -> {
-                    log.error("手动回传:{}-{}", orderLog.getId(), backMoney);
-                    orderBack(orderLog, true, backMoney);
+                    if (dto.getSplitOrder()) {
+                        log.error("手动拆单回传:{}-{}", orderLog.getId(), StringUtils.join(dto.getSplitMoney(), ","));
+                        List<GameTencentOrderSplitLog> splitOrderLogList = new ArrayList<>(dto.getSplitMoney().size());
+                        LocalDateTime beginTime = LocalDateTime.now();
+                        long backMoneyTotal = 0L;
+                        for (int i = 0; i < dto.getSplitMoney().size(); i++) {
+                            long backMoney = NumberUtil.multiply100(dto.getSplitMoney().get(i)).longValue();
+                            LocalDateTime backTime = beginTime;
+                            backMoneyTotal += backMoney;
+                            splitOrderLogList.add(GameTencentOrderSplitLog.builder()
+                                    .backDay(backTime.toLocalDate())
+                                    .orderNo(orderLog.getOrderId())
+                                    .backIndex(i + 1)
+                                    .backCount(dto.getSplitMoney().size())
+                                    .splitMoney(backMoney)
+                                    .backTime(backTime)
+                                    .backStatus(BackStatusEnum.NO.getBackStatus())
+                                    .createTime(LocalDateTime.now())
+                                    .build());
+                            beginTime = beginTime.plusMinutes(RandomUtils.nextInt(3, 10));
+                        }
+                        gameTencentOrderSplitLogService.saveBatch(splitOrderLogList);
+                        update(new LambdaUpdateWrapper<GameTencentOrder>()
+                                .set(GameTencentOrder::getIsBack, BackStatusEnum.NO.getBackStatus())
+                                .set(GameTencentOrder::getBackMoney, backMoneyTotal)
+                                .set(GameTencentOrder::getBackMsg, "手动触发回传(拆单回传)")
+                                .eq(GameTencentOrder::getId, orderLog.getId())
+                        );
+                    } else {
+                        log.error("手动直接回传:{}-{}", orderLog.getId(), dto.getBackMoney());
+                        long backMoney = NumberUtil.multiply100(dto.getBackMoney()).longValue();
+                        Tuple2<BackStatusEnum, String> backResult = doCallback(orderLog, backMoney);
+                        String backMsg = "手动触发回传!";
+                        if (StringUtils.isNotBlank(backResult.second)) {
+                            backMsg += ("回传失败:" + backResult.second);
+                        }
+                        update(new LambdaUpdateWrapper<GameTencentOrder>()
+                                .set(GameTencentOrder::getIsBack, backResult.first.getBackStatus())
+                                .set(GameTencentOrder::getBackMoney, backMoney)
+                                .set(GameTencentOrder::getBackMsg, backMsg)
+                                .eq(GameTencentOrder::getId, orderLog.getId())
+                        );
+                    }
                 });
         return true;
     }
 
-    private BackStatusEnum doCallback(GameTencentOrder orderLog) {
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public Tuple2<BackStatusEnum, String> doCallback(GameTencentOrder orderLog, Long backMoney) {
         String actionType = orderLog.getOrderStatus().equals(OrderStatusEnum.SUCCESS_PAY.getValue()) ?
                 ActionTypeEnum.PURCHASE.getActionType() : ActionTypeEnum.COMPLETE_ORDER.getActionType();
         Map<String, Object> actionParam = new HashMap<>(2);
         actionParam.put("claim_type", 0);
-        actionParam.put("value", orderLog.getBackMoney());
+        actionParam.put("value", backMoney);
         DataReportOfAppIdRpcDTO dataReportOfAppIdRpcDTO = DataReportOfAppIdRpcDTO.builder()
                 .appId(orderLog.getWechatAppId())
                 .userActionSetId(orderLog.getUserActionSetId())
@@ -242,7 +327,7 @@ public class GameTencentOrderServiceImpl extends ServiceImpl<GameTencentOrderMap
             gameTencentBackLog.setBackLog(result.getMsg());
         }
         gameTencentBackLogService.save(gameTencentBackLog);
-        return backStatus;
+        return Tuple2.with(backStatus, gameTencentBackLog.getBackLog());
     }
 
     public static class TencentOrderBackPolicyCheck implements BackPolicyUtil.IBackPolicyCheck {

+ 47 - 0
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/service/impl/GameTencentOrderSplitLogServiceImpl.java

@@ -0,0 +1,47 @@
+package com.zanxiang.game.back.serve.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zanxiang.game.back.serve.dao.mapper.GameTencentOrderSplitLogMapper;
+import com.zanxiang.game.back.serve.pojo.entity.GameTencentOrderSplitLog;
+import com.zanxiang.game.back.serve.pojo.vo.GameTencentOrderSplitLogVO;
+import com.zanxiang.game.back.serve.service.IGameTencentOrderSplitLogService;
+import com.zanxiang.module.util.NumberUtil;
+import com.zanxiang.module.util.bean.BeanUtil;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
+import org.springframework.stereotype.Service;
+
+import java.math.BigDecimal;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+@Slf4j
+@Service
+public class GameTencentOrderSplitLogServiceImpl extends ServiceImpl<GameTencentOrderSplitLogMapper, GameTencentOrderSplitLog>
+        implements IGameTencentOrderSplitLogService {
+
+    @Override
+    public List<GameTencentOrderSplitLogVO> listByOrderNo(Collection<String> orderNos) {
+        if (CollectionUtils.isEmpty(orderNos)) {
+            return Collections.emptyList();
+        }
+        return list(new LambdaQueryWrapper<GameTencentOrderSplitLog>()
+                .eq(GameTencentOrderSplitLog::getOrderNo, orderNos)
+                .orderByAsc(GameTencentOrderSplitLog::getBackIndex)
+        ).stream().map(this::toVOSimple).collect(Collectors.toList());
+    }
+
+    private GameTencentOrderSplitLogVO toVOSimple(GameTencentOrderSplitLog log) {
+        if (log == null) {
+            return null;
+        }
+        GameTencentOrderSplitLogVO vo = BeanUtil.copy(log, GameTencentOrderSplitLogVO.class);
+        if (log.getSplitMoney() != null) {
+            vo.setSplitMoney(NumberUtil.divide100(new BigDecimal(log.getSplitMoney())));
+        }
+        return vo;
+    }
+}

+ 112 - 0
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/task/OceanengineOrderSplitBackTask.java

@@ -0,0 +1,112 @@
+package com.zanxiang.game.back.serve.task;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
+import com.github.sd4324530.jtuple.Tuple2;
+import com.zanxiang.game.back.base.ServerInfo;
+import com.zanxiang.game.back.serve.pojo.entity.GameOceanengineOrderLog;
+import com.zanxiang.game.back.serve.pojo.entity.GameOceanengineOrderSplitLog;
+import com.zanxiang.game.back.serve.pojo.enums.BackStatusEnum;
+import com.zanxiang.game.back.serve.service.IGameOceanengineOrderLogService;
+import com.zanxiang.game.back.serve.service.IGameOceanengineOrderSplitLogService;
+import com.zanxiang.module.redis.service.IDistributedLockComponent;
+import com.zanxiang.module.util.DateUtil;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * 头条订单拆分回传任务
+ */
+@Slf4j
+@Component
+public class OceanengineOrderSplitBackTask {
+    public static final String KEY = ServerInfo.SERVER_NAME + ":oceanengineOrderSplitBack:";
+
+    @Autowired
+    private IGameOceanengineOrderLogService gameOceanengineOrderLogService;
+    @Autowired
+    private IGameOceanengineOrderSplitLogService gameOceanengineOrderSplitLogService;
+
+    @Autowired
+    private IDistributedLockComponent distributedLockComponent;
+
+    @Scheduled(cron = "0 * * * * ?")
+    public void execute() {
+        LocalDateTime now = LocalDateTime.now().withSecond(0).withNano(0);
+        if (!distributedLockComponent.doLock(KEY + DateUtil.formatLocalDateTime(now))) {
+            return;
+        }
+        List<GameOceanengineOrderSplitLog> orderSplitLogList = gameOceanengineOrderSplitLogService.list(new LambdaQueryWrapper<GameOceanengineOrderSplitLog>()
+                .in(GameOceanengineOrderSplitLog::getBackDay, Arrays.asList(LocalDate.now().minusDays(1), LocalDate.now()))
+                .lt(GameOceanengineOrderSplitLog::getBackTime, now.plusMinutes(1))
+                .eq(GameOceanengineOrderSplitLog::getBackStatus, BackStatusEnum.NO.getBackStatus())
+                .orderByAsc(GameOceanengineOrderSplitLog::getOrderNo)
+                .orderByAsc(GameOceanengineOrderSplitLog::getBackTime)
+        );
+        if (CollectionUtils.isEmpty(orderSplitLogList)) {
+            return;
+        }
+        log.error("准备回传分拆订单:{}", orderSplitLogList.size());
+        List<GameOceanengineOrderLog> orderList = gameOceanengineOrderLogService.list(new LambdaQueryWrapper<GameOceanengineOrderLog>()
+                .in(GameOceanengineOrderLog::getOrderNo, orderSplitLogList.stream().map(GameOceanengineOrderSplitLog::getOrderNo).collect(Collectors.toSet()))
+        );
+        Map<String, GameOceanengineOrderLog> orderMap = new HashMap<>(orderList.size());
+        orderList.forEach(order -> orderMap.put(order.getOrderNo(), order));
+
+        orderSplitLogList.forEach(orderSplitLog -> {
+            callback(orderMap.get(orderSplitLog.getOrderNo()), orderSplitLog);
+        });
+    }
+
+    private void callback(GameOceanengineOrderLog order, GameOceanengineOrderSplitLog orderSplitLog) {
+        log.error("开始回传拆分订单:{}-{}", orderSplitLog.getOrderNo(), orderSplitLog.getBackIndex());
+        try {
+            Tuple2<BackStatusEnum, String> backResult = gameOceanengineOrderLogService.doCallback(order, orderSplitLog.getSplitMoney());
+            gameOceanengineOrderSplitLogService.update(new LambdaUpdateWrapper<GameOceanengineOrderSplitLog>()
+                    .set(GameOceanengineOrderSplitLog::getExecuteTime, LocalDateTime.now())
+                    .set(GameOceanengineOrderSplitLog::getBackStatus, backResult.first.getBackStatus())
+                    .set(GameOceanengineOrderSplitLog::getBackErrorMsg, backResult.second)
+                    .eq(GameOceanengineOrderSplitLog::getId, orderSplitLog.getId())
+            );
+            if (backResult.first == BackStatusEnum.SUCCESS) {
+                gameOceanengineOrderLogService.update(new LambdaUpdateWrapper<GameOceanengineOrderLog>()
+                        .set(GameOceanengineOrderLog::getBackStatus, backResult.first.getBackStatus())
+                        .eq(GameOceanengineOrderLog::getId, order.getId())
+                );
+            } else {
+                gameOceanengineOrderLogService.update(new LambdaUpdateWrapper<GameOceanengineOrderLog>()
+                        .set(GameOceanengineOrderLog::getBackStatus, BackStatusEnum.SUCCESS_PART.getBackStatus())
+                        .eq(GameOceanengineOrderLog::getId, order.getId())
+                );
+            }
+            log.error("订单回传完成:{}-{}, {}-{}", orderSplitLog.getOrderNo(), orderSplitLog.getBackIndex(), backResult.first, backResult.second);
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            try {
+                gameOceanengineOrderSplitLogService.update(new LambdaUpdateWrapper<GameOceanengineOrderSplitLog>()
+                        .set(GameOceanengineOrderSplitLog::getExecuteTime, LocalDateTime.now())
+                        .set(GameOceanengineOrderSplitLog::getBackStatus, BackStatusEnum.FAILED.getBackStatus())
+                        .set(GameOceanengineOrderSplitLog::getBackErrorMsg, e.getMessage())
+                        .eq(GameOceanengineOrderSplitLog::getId, orderSplitLog.getId())
+                );
+                gameOceanengineOrderLogService.update(new LambdaUpdateWrapper<GameOceanengineOrderLog>()
+                        .set(GameOceanengineOrderLog::getBackStatus, BackStatusEnum.SUCCESS_PART.getBackStatus())
+                        .eq(GameOceanengineOrderLog::getId, order.getId())
+                );
+            } catch (Exception ex) {
+                log.error(ex.getMessage(), ex);
+            }
+        }
+    }
+}

+ 115 - 0
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/task/TencentMiniOrderSplitBackTask.java

@@ -0,0 +1,115 @@
+package com.zanxiang.game.back.serve.task;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
+import com.github.sd4324530.jtuple.Tuple2;
+import com.zanxiang.game.back.base.ServerInfo;
+import com.zanxiang.game.back.serve.pojo.entity.GameTencentMiniGameOrder;
+import com.zanxiang.game.back.serve.pojo.entity.GameTencentMiniGameOrderSplitLog;
+import com.zanxiang.game.back.serve.pojo.enums.BackStatusEnum;
+import com.zanxiang.game.back.serve.service.IGameTencentMiniGameBackLogService;
+import com.zanxiang.game.back.serve.service.IGameTencentMiniGameOrderService;
+import com.zanxiang.game.back.serve.service.IGameTencentMiniGameOrderSplitLogService;
+import com.zanxiang.module.redis.service.IDistributedLockComponent;
+import com.zanxiang.module.util.DateUtil;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * 头条订单拆分回传任务
+ */
+@Slf4j
+@Component
+public class TencentMiniOrderSplitBackTask {
+    public static final String KEY = ServerInfo.SERVER_NAME + ":tencentMiniOrderSplitBack:";
+
+    @Autowired
+    private IGameTencentMiniGameOrderService gameTencentMiniGameOrderService;
+    @Autowired
+    private IGameTencentMiniGameOrderSplitLogService gameTencentMiniGameOrderSplitLogService;
+
+    @Autowired
+    private IDistributedLockComponent distributedLockComponent;
+    @Autowired
+    private IGameTencentMiniGameBackLogService gameTencentMiniGameBackLogService;
+
+    @Scheduled(cron = "0 * * * * ?")
+    public void execute() {
+        LocalDateTime now = LocalDateTime.now().withSecond(0).withNano(0);
+        if (!distributedLockComponent.doLock(KEY + DateUtil.formatLocalDateTime(now))) {
+            return;
+        }
+        List<GameTencentMiniGameOrderSplitLog> orderSplitLogList = gameTencentMiniGameOrderSplitLogService.list(new LambdaQueryWrapper<GameTencentMiniGameOrderSplitLog>()
+                .in(GameTencentMiniGameOrderSplitLog::getBackDay, Arrays.asList(LocalDate.now().minusDays(1), LocalDate.now()))
+                .lt(GameTencentMiniGameOrderSplitLog::getBackTime, now.plusMinutes(1))
+                .eq(GameTencentMiniGameOrderSplitLog::getBackStatus, BackStatusEnum.NO.getBackStatus())
+                .orderByAsc(GameTencentMiniGameOrderSplitLog::getOrderNo)
+                .orderByAsc(GameTencentMiniGameOrderSplitLog::getBackTime)
+        );
+        if (CollectionUtils.isEmpty(orderSplitLogList)) {
+            return;
+        }
+        log.error("准备回传分拆订单:{}", orderSplitLogList.size());
+        List<GameTencentMiniGameOrder> orderList = gameTencentMiniGameOrderService.list(new LambdaQueryWrapper<GameTencentMiniGameOrder>()
+                .in(GameTencentMiniGameOrder::getOrderId, orderSplitLogList.stream().map(GameTencentMiniGameOrderSplitLog::getOrderNo).collect(Collectors.toSet()))
+        );
+        Map<String, GameTencentMiniGameOrder> orderMap = new HashMap<>(orderList.size());
+        orderList.forEach(order -> orderMap.put(order.getOrderId(), order));
+
+        orderSplitLogList.forEach(orderSplitLog -> {
+            callback(orderMap.get(orderSplitLog.getOrderNo()), orderSplitLog);
+        });
+    }
+
+    private void callback(GameTencentMiniGameOrder order, GameTencentMiniGameOrderSplitLog orderSplitLog) {
+        log.error("开始回传拆分订单:{}-{}", orderSplitLog.getOrderNo(), orderSplitLog.getBackIndex());
+        try {
+            Tuple2<BackStatusEnum, String> backResult = gameTencentMiniGameBackLogService.orderBack(order, orderSplitLog.getSplitMoney());
+            gameTencentMiniGameOrderSplitLogService.update(new LambdaUpdateWrapper<GameTencentMiniGameOrderSplitLog>()
+                    .set(GameTencentMiniGameOrderSplitLog::getExecuteTime, LocalDateTime.now())
+                    .set(GameTencentMiniGameOrderSplitLog::getBackStatus, backResult.first.getBackStatus())
+                    .set(GameTencentMiniGameOrderSplitLog::getBackErrorMsg, backResult.second)
+                    .eq(GameTencentMiniGameOrderSplitLog::getId, orderSplitLog.getId())
+            );
+            if (backResult.first == BackStatusEnum.SUCCESS) {
+                gameTencentMiniGameOrderService.update(new LambdaUpdateWrapper<GameTencentMiniGameOrder>()
+                        .set(GameTencentMiniGameOrder::getBackStatus, backResult.first.getBackStatus())
+                        .eq(GameTencentMiniGameOrder::getId, order.getId())
+                );
+            } else {
+                gameTencentMiniGameOrderService.update(new LambdaUpdateWrapper<GameTencentMiniGameOrder>()
+                        .set(GameTencentMiniGameOrder::getBackStatus, BackStatusEnum.SUCCESS_PART.getBackStatus())
+                        .eq(GameTencentMiniGameOrder::getId, order.getId())
+                );
+            }
+            log.error("订单回传完成:{}-{}, {}-{}", orderSplitLog.getOrderNo(), orderSplitLog.getBackIndex(), backResult.first, backResult.second);
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            try {
+                gameTencentMiniGameOrderSplitLogService.update(new LambdaUpdateWrapper<GameTencentMiniGameOrderSplitLog>()
+                        .set(GameTencentMiniGameOrderSplitLog::getExecuteTime, LocalDateTime.now())
+                        .set(GameTencentMiniGameOrderSplitLog::getBackStatus, BackStatusEnum.FAILED.getBackStatus())
+                        .set(GameTencentMiniGameOrderSplitLog::getBackErrorMsg, e.getMessage())
+                        .eq(GameTencentMiniGameOrderSplitLog::getId, orderSplitLog.getId())
+                );
+                gameTencentMiniGameOrderService.update(new LambdaUpdateWrapper<GameTencentMiniGameOrder>()
+                        .set(GameTencentMiniGameOrder::getBackStatus, BackStatusEnum.SUCCESS_PART.getBackStatus())
+                        .eq(GameTencentMiniGameOrder::getId, order.getId())
+                );
+            } catch (Exception ex) {
+                log.error(ex.getMessage(), ex);
+            }
+        }
+    }
+}

+ 112 - 0
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/task/TencentOrderSplitBackTask.java

@@ -0,0 +1,112 @@
+package com.zanxiang.game.back.serve.task;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
+import com.github.sd4324530.jtuple.Tuple2;
+import com.zanxiang.game.back.base.ServerInfo;
+import com.zanxiang.game.back.serve.pojo.entity.GameTencentOrder;
+import com.zanxiang.game.back.serve.pojo.entity.GameTencentOrderSplitLog;
+import com.zanxiang.game.back.serve.pojo.enums.BackStatusEnum;
+import com.zanxiang.game.back.serve.service.IGameTencentOrderService;
+import com.zanxiang.game.back.serve.service.IGameTencentOrderSplitLogService;
+import com.zanxiang.module.redis.service.IDistributedLockComponent;
+import com.zanxiang.module.util.DateUtil;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * 头条订单拆分回传任务
+ */
+@Slf4j
+@Component
+public class TencentOrderSplitBackTask {
+    public static final String KEY = ServerInfo.SERVER_NAME + ":tencentOrderSplitBack:";
+
+    @Autowired
+    private IGameTencentOrderService gameTencentOrderService;
+    @Autowired
+    private IGameTencentOrderSplitLogService gameTencentOrderSplitLogService;
+
+    @Autowired
+    private IDistributedLockComponent distributedLockComponent;
+
+    @Scheduled(cron = "0 * * * * ?")
+    public void execute() {
+        LocalDateTime now = LocalDateTime.now().withSecond(0).withNano(0);
+        if (!distributedLockComponent.doLock(KEY + DateUtil.formatLocalDateTime(now))) {
+            return;
+        }
+        List<GameTencentOrderSplitLog> orderSplitLogList = gameTencentOrderSplitLogService.list(new LambdaQueryWrapper<GameTencentOrderSplitLog>()
+                .in(GameTencentOrderSplitLog::getBackDay, Arrays.asList(LocalDate.now().minusDays(1), LocalDate.now()))
+                .lt(GameTencentOrderSplitLog::getBackTime, now.plusMinutes(1))
+                .eq(GameTencentOrderSplitLog::getBackStatus, BackStatusEnum.NO.getBackStatus())
+                .orderByAsc(GameTencentOrderSplitLog::getOrderNo)
+                .orderByAsc(GameTencentOrderSplitLog::getBackTime)
+        );
+        if (CollectionUtils.isEmpty(orderSplitLogList)) {
+            return;
+        }
+        log.error("准备回传分拆订单:{}", orderSplitLogList.size());
+        List<GameTencentOrder> orderList = gameTencentOrderService.list(new LambdaQueryWrapper<GameTencentOrder>()
+                .in(GameTencentOrder::getOrderId, orderSplitLogList.stream().map(GameTencentOrderSplitLog::getOrderNo).collect(Collectors.toSet()))
+        );
+        Map<String, GameTencentOrder> orderMap = new HashMap<>(orderList.size());
+        orderList.forEach(order -> orderMap.put(order.getOrderId(), order));
+
+        orderSplitLogList.forEach(orderSplitLog -> {
+            callback(orderMap.get(orderSplitLog.getOrderNo()), orderSplitLog);
+        });
+    }
+
+    private void callback(GameTencentOrder order, GameTencentOrderSplitLog orderSplitLog) {
+        log.error("开始回传拆分订单:{}-{}", orderSplitLog.getOrderNo(), orderSplitLog.getBackIndex());
+        try {
+            Tuple2<BackStatusEnum, String> backResult = gameTencentOrderService.doCallback(order, orderSplitLog.getSplitMoney());
+            gameTencentOrderSplitLogService.update(new LambdaUpdateWrapper<GameTencentOrderSplitLog>()
+                    .set(GameTencentOrderSplitLog::getExecuteTime, LocalDateTime.now())
+                    .set(GameTencentOrderSplitLog::getBackStatus, backResult.first.getBackStatus())
+                    .set(GameTencentOrderSplitLog::getBackErrorMsg, backResult.second)
+                    .eq(GameTencentOrderSplitLog::getId, orderSplitLog.getId())
+            );
+            if (backResult.first == BackStatusEnum.SUCCESS) {
+                gameTencentOrderService.update(new LambdaUpdateWrapper<GameTencentOrder>()
+                        .set(GameTencentOrder::getIsBack, backResult.first.getBackStatus())
+                        .eq(GameTencentOrder::getId, order.getId())
+                );
+            } else {
+                gameTencentOrderService.update(new LambdaUpdateWrapper<GameTencentOrder>()
+                        .set(GameTencentOrder::getIsBack, BackStatusEnum.SUCCESS_PART.getBackStatus())
+                        .eq(GameTencentOrder::getId, order.getId())
+                );
+            }
+            log.error("订单回传完成:{}-{}, {}-{}", orderSplitLog.getOrderNo(), orderSplitLog.getBackIndex(), backResult.first, backResult.second);
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            try {
+                gameTencentOrderSplitLogService.update(new LambdaUpdateWrapper<GameTencentOrderSplitLog>()
+                        .set(GameTencentOrderSplitLog::getExecuteTime, LocalDateTime.now())
+                        .set(GameTencentOrderSplitLog::getBackStatus, BackStatusEnum.FAILED.getBackStatus())
+                        .set(GameTencentOrderSplitLog::getBackErrorMsg, e.getMessage())
+                        .eq(GameTencentOrderSplitLog::getId, orderSplitLog.getId())
+                );
+                gameTencentOrderService.update(new LambdaUpdateWrapper<GameTencentOrder>()
+                        .set(GameTencentOrder::getIsBack, BackStatusEnum.SUCCESS_PART.getBackStatus())
+                        .eq(GameTencentOrder::getId, order.getId())
+                );
+            } catch (Exception ex) {
+                log.error(ex.getMessage(), ex);
+            }
+        }
+    }
+}

+ 27 - 0
game-back/game-back-serve/src/main/java/com/zanxiang/game/back/serve/utils/BackPolicyUtil.java

@@ -16,7 +16,10 @@ import org.apache.commons.lang3.StringUtils;
 
 import java.math.BigDecimal;
 import java.time.LocalDateTime;
+import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
 import java.util.List;
 import java.util.Objects;
 import java.util.function.Function;
@@ -216,6 +219,30 @@ public class BackPolicyUtil {
         return Tuples.tuple(userBackCount < maxBackCountOfUser, downLevel(rechargeMoney, downLevelString), backMsg);
     }
 
+    /**
+     * 拆单逻辑
+     */
+    public static Tuple3<Boolean, Long, List<Tuple2<Long, LocalDateTime>>> splitOrder(GameBackPolicy gameBackPolicy, Long backMoney) {
+        if (gameBackPolicy == null || StringUtils.isBlank(gameBackPolicy.getSplitStrategy())) {
+            return Tuple3.with(false, backMoney, null);
+        }
+        Collection<GameBackPolicyVO.SplitStrategy> splitStrategyList = JsonUtil.toList(gameBackPolicy.getSplitStrategy(), List.class, GameBackPolicyVO.SplitStrategy.class);
+        if (CollectionUtils.isEmpty(splitStrategyList)) {
+            return Tuple3.with(false, backMoney, null);
+        }
+        List<Tuple2<Long, LocalDateTime>> result = new ArrayList<>();
+        LocalDateTime beginTime = LocalDateTime.now();
+        Long sumMoney = 0L;
+        for (GameBackPolicyVO.SplitStrategy splitStrategy : splitStrategyList) {
+            long money = NumberUtil.multiply100(splitStrategy.getPayMoney()).longValue();
+            sumMoney += money;
+            result.add(Tuple2.with(money, beginTime));
+            int randomMinute = RandomUtils.nextInt(splitStrategy.getBetweenMinuteMin(), splitStrategy.getBetweenMinuteMax());
+            beginTime = beginTime.minusMinutes(randomMinute);
+        }
+        return Tuple3.with(true, sumMoney, result);
+    }
+
     private static Long downLevel(Long rechargeMoney, String downLevelStr) {
         if (StringUtils.isBlank(downLevelStr)) {
             return rechargeMoney;

+ 6 - 3
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/component/DataPowerComponent.java

@@ -62,7 +62,9 @@ public class DataPowerComponent {
             throw new BaseException("服务异常,获取用户列表失败!!");
         }
         if (subUserIds.size() == 1) {
-            if (gameAuth == GameAuthEnum.OPERATE || gameAuth == GameAuthEnum.CUSTOMER || gameAuth == GameAuthEnum.GS) {
+            if (gameAuth == GameAuthEnum.MANAGE) {
+                return Tuple2.with(null, null);
+            } else if (gameAuth == GameAuthEnum.OPERATE || gameAuth == GameAuthEnum.CUSTOMER || gameAuth == GameAuthEnum.GS) {
                 // 运营
                 return Tuple2.with(null, userGameInfo.getGameIdList());
             } else {
@@ -70,8 +72,9 @@ public class DataPowerComponent {
                 return Tuple2.with(new ArrayList<>(subUserIds), userGameInfo.getGameIdList());
             }
         } else {
-            // 组长
-            if (gameAuth == GameAuthEnum.OPERATE || gameAuth == GameAuthEnum.CUSTOMER || gameAuth == GameAuthEnum.GS) {
+            if (gameAuth == GameAuthEnum.MANAGE) {
+                return Tuple2.with(null, null);
+            } else if (gameAuth == GameAuthEnum.OPERATE || gameAuth == GameAuthEnum.CUSTOMER || gameAuth == GameAuthEnum.GS) {
                 // 运营组长
                 return Tuple2.with(null, userGameInfo.getGameIdList());
             } else {

+ 8 - 1
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/GameDataTotalDTO.java

@@ -9,6 +9,7 @@ import lombok.NoArgsConstructor;
 
 
 import java.time.LocalDate;
+import java.util.List;
 
 /**
  * @author tianhua
@@ -31,7 +32,7 @@ public class GameDataTotalDTO extends BasePage {
      * 游戏ID
      */
     @ApiModelProperty(notes = "游戏ID")
-    private Long gameId;
+    private List<Long> gameId;
 
     /**
      * 推广游戏应用类别
@@ -87,4 +88,10 @@ public class GameDataTotalDTO extends BasePage {
     @ApiModelProperty(notes = "选择展示数据种类:buy -> 买量 ; nature -> 自然量 ; total -> 总量")
     private String tableTypes;
 
+    /**
+     * 游戏维度:1-子游戏维度;2-父游戏维度;3-超父游戏维度
+     */
+    @ApiModelProperty(notes = "游戏维度:1-子游戏维度;2-父游戏维度")
+    private Long gameDimension;
+
 }

+ 8 - 1
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/GameDataTotalTotalDTO.java

@@ -7,6 +7,7 @@ import lombok.Data;
 import lombok.NoArgsConstructor;
 
 import java.time.LocalDate;
+import java.util.List;
 
 /**
  * @author tianhua
@@ -29,7 +30,7 @@ public class GameDataTotalTotalDTO {
      * 游戏ID
      */
     @ApiModelProperty(notes = "游戏ID")
-    private Long gameId;
+    private List<Long> gameId;
 
     /**
      * 推广游戏应用类别
@@ -73,4 +74,10 @@ public class GameDataTotalTotalDTO {
     @ApiModelProperty(notes = "选择展示数据种类:buy -> 买量 ; nature -> 自然量 ; total -> 总量")
     private String tableTypes;
 
+    /**
+     * 游戏维度:1-子游戏维度;2-父游戏维度;3-超父游戏维度
+     */
+    @ApiModelProperty(notes = "游戏维度:1-子游戏维度;2-父游戏维度")
+    private Long gameDimension;
+
 }

+ 2 - 1
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/GameDataWaterDTO.java

@@ -9,6 +9,7 @@ import lombok.NoArgsConstructor;
 
 
 import java.time.LocalDate;
+import java.util.List;
 
 /**
  * @author tianhua
@@ -28,7 +29,7 @@ public class GameDataWaterDTO extends BasePage {
     private String gameName;
 
     @ApiModelProperty(notes = "游戏id")
-    private Long gameId;
+    private List<Long> gameId;
 
     @ApiModelProperty(notes = "SDK来源")
     private String sourceSystem;

+ 8 - 1
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/GameMediaDataDayDTO.java

@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.time.LocalDate;
+import java.util.List;
 
 /**
  * @author tianhua
@@ -36,7 +37,7 @@ public class GameMediaDataDayDTO extends BasePage {
      * 游戏ID
      */
     @ApiModelProperty(value = "游戏ID")
-    private String gameId;
+    private List<Long> gameId;
 
     /**
      * 游戏CP方
@@ -68,4 +69,10 @@ public class GameMediaDataDayDTO extends BasePage {
     @ApiModelProperty(notes = "排序方式:升序asc;降序desc")
     private String sortType;
 
+    /**
+     * 游戏维度:1-子游戏维度;2-父游戏维度;3-超父游戏维度
+     */
+    @ApiModelProperty(notes = "游戏维度:1-子游戏维度;2-父游戏维度")
+    private Long gameDimension;
+
 }

+ 8 - 1
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/GameMediaDataDayTotalDTO.java

@@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.time.LocalDate;
+import java.util.List;
 
 /**
  * @author tianhua
@@ -35,7 +36,7 @@ public class GameMediaDataDayTotalDTO {
      * 游戏ID
      */
     @ApiModelProperty(value = "游戏ID")
-    private String gameId;
+    private List<Long> gameId;
 
     /**
      * 游戏CP方
@@ -55,4 +56,10 @@ public class GameMediaDataDayTotalDTO {
     @ApiModelProperty(value = "推广媒体")
     private String accountType;
 
+    /**
+     * 游戏维度:1-子游戏维度;2-父游戏维度;3-超父游戏维度
+     */
+    @ApiModelProperty(notes = "游戏维度:1-子游戏维度;2-父游戏维度")
+    private Long gameDimension;
+
 }

+ 8 - 1
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/GameMediaDataTotalDTO.java

@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.time.LocalDate;
+import java.util.List;
 
 /**
  * @author tianhua
@@ -48,7 +49,7 @@ public class GameMediaDataTotalDTO extends BasePage {
      * 游戏ID
      */
     @ApiModelProperty(value = "游戏ID")
-    private String gameId;
+    private List<Long> gameId;
 
     /**
      * 游戏CP方
@@ -80,4 +81,10 @@ public class GameMediaDataTotalDTO extends BasePage {
     @ApiModelProperty(notes = "排序方式:升序asc;降序desc")
     private String sortType;
 
+    /**
+     * 游戏维度:1-子游戏维度;2-父游戏维度;3-超父游戏维度
+     */
+    @ApiModelProperty(notes = "游戏维度:1-子游戏维度;2-父游戏维度")
+    private Long gameDimension;
+
 }

+ 8 - 1
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/GameMediaDataTotalSumDTO.java

@@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.time.LocalDate;
+import java.util.List;
 
 /**
  * @author tianhua
@@ -47,7 +48,7 @@ public class GameMediaDataTotalSumDTO {
      * 游戏ID
      */
     @ApiModelProperty(value = "游戏ID")
-    private String gameId;
+    private List<Long> gameId;
 
     /**
      * 游戏CP方
@@ -67,4 +68,10 @@ public class GameMediaDataTotalSumDTO {
     @ApiModelProperty(value = "推广媒体")
     private String accountType;
 
+    /**
+     * 游戏维度:1-子游戏维度;2-父游戏维度;3-超父游戏维度
+     */
+    @ApiModelProperty(notes = "游戏维度:1-子游戏维度;2-父游戏维度")
+    private Long gameDimension;
+
 }

+ 8 - 2
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/GamePromoteDayDTO.java

@@ -18,7 +18,7 @@ public class GamePromoteDayDTO extends BasePage {
     @ApiModelProperty(notes = "SDK来源")
     private String sourceSystem;
     @ApiModelProperty(notes = "投手id")
-    private Long sysUserId;
+    private String sysUserId;
     @ApiModelProperty(notes = "推广账号类型")
     private String accountType;
     @ApiModelProperty(notes = "推广账号ID")
@@ -31,7 +31,7 @@ public class GamePromoteDayDTO extends BasePage {
     private String cpName;
 
     @ApiModelProperty(notes = "游戏id")
-    private Long gameId;
+    private List<Long> gameId;
     @ApiModelProperty(notes = "游戏名")
     private String gameName;
     @ApiModelProperty(notes = "游戏应用类型")
@@ -48,4 +48,10 @@ public class GamePromoteDayDTO extends BasePage {
     @ApiModelProperty(notes = "排序方式:升序asc;降序desc")
     private String sortType;
 
+    /**
+     * 游戏维度:1-子游戏维度;2-父游戏维度;3-超父游戏维度
+     */
+    @ApiModelProperty(notes = "游戏维度:1-子游戏维度;2-父游戏维度")
+    private Long gameDimension;
+
 }

+ 9 - 2
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/GamePromoteDayTotalDTO.java

@@ -17,7 +17,7 @@ public class GamePromoteDayTotalDTO {
     @ApiModelProperty(notes = "SDK来源")
     private String sourceSystem;
     @ApiModelProperty(notes = "投手id")
-    private Long sysUserId;
+    private String sysUserId;
     @ApiModelProperty(notes = "推广账号ID")
     private String accountId;
     @ApiModelProperty(notes = "推广账号类型")
@@ -29,7 +29,7 @@ public class GamePromoteDayTotalDTO {
     private String cpName;
 
     @ApiModelProperty(notes = "游戏id")
-    private Long gameId;
+    private List<Long> gameId;
 
     @ApiModelProperty(notes = "游戏名")
     private String gameName;
@@ -40,4 +40,11 @@ public class GamePromoteDayTotalDTO {
     private LocalDate beginDay;
     @ApiModelProperty(notes = "消耗结束日期")
     private LocalDate endDay;
+
+    /**
+     * 游戏维度:1-子游戏维度;2-父游戏维度;3-超父游戏维度
+     */
+    @ApiModelProperty(notes = "游戏维度:1-子游戏维度;2-父游戏维度")
+    private Long gameDimension;
+
 }

+ 8 - 1
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/GameServerDayDTO.java

@@ -8,6 +8,7 @@ import lombok.Data;
 import lombok.NoArgsConstructor;
 
 import java.time.LocalDate;
+import java.util.List;
 
 /**
  * @author tianhua
@@ -36,7 +37,7 @@ public class GameServerDayDTO extends BasePage {
      * 游戏ID
      */
     @ApiModelProperty(value = "游戏ID")
-    private Long gameId;
+    private List<Long> gameId;
 
     /**
      * 区服ID
@@ -77,4 +78,10 @@ public class GameServerDayDTO extends BasePage {
             """)
     private String activeTypes;
 
+    /**
+     * 游戏维度:1-子游戏维度;2-父游戏维度;3-超父游戏维度
+     */
+    @ApiModelProperty(notes = "游戏维度:1-子游戏维度;2-父游戏维度")
+    private Long gameDimension;
+
 }

+ 8 - 1
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/GameServerDayTotalDTO.java

@@ -7,6 +7,7 @@ import lombok.Data;
 import lombok.NoArgsConstructor;
 
 import java.time.LocalDate;
+import java.util.List;
 
 /**
  * @author tianhua
@@ -35,7 +36,7 @@ public class GameServerDayTotalDTO {
      * 游戏ID
      */
     @ApiModelProperty(value = "游戏ID")
-    private Long gameId;
+    private List<Long> gameId;
 
     /**
      * 区服ID
@@ -63,4 +64,10 @@ public class GameServerDayTotalDTO {
             """)
     private String activeTypes;
 
+    /**
+     * 游戏维度:1-子游戏维度;2-父游戏维度;3-超父游戏维度
+     */
+    @ApiModelProperty(notes = "游戏维度:1-子游戏维度;2-父游戏维度")
+    private Long gameDimension;
+
 }

+ 8 - 1
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/GameServerSumDayDTO.java

@@ -8,6 +8,7 @@ import lombok.Data;
 import lombok.NoArgsConstructor;
 
 import java.time.LocalDate;
+import java.util.List;
 
 /**
  * @author tianhua
@@ -36,7 +37,7 @@ public class GameServerSumDayDTO extends BasePage {
      * 游戏ID
      */
     @ApiModelProperty(value = "游戏ID")
-    private Long gameId;
+    private List<Long> gameId;
 
     /**
      * SDK来源
@@ -56,4 +57,10 @@ public class GameServerSumDayDTO extends BasePage {
     @ApiModelProperty(notes = "排序方式:升序asc;降序desc")
     private String sortType;
 
+    /**
+     * 游戏维度:1-子游戏维度;2-父游戏维度;3-超父游戏维度
+     */
+    @ApiModelProperty(notes = "游戏维度:1-子游戏维度;2-父游戏维度")
+    private Long gameDimension;
+
 }

+ 8 - 1
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/GameServerSumDayTotalDTO.java

@@ -7,6 +7,7 @@ import lombok.Data;
 import lombok.NoArgsConstructor;
 
 import java.time.LocalDate;
+import java.util.List;
 
 /**
  * @author tianhua
@@ -35,7 +36,7 @@ public class GameServerSumDayTotalDTO {
      * 游戏ID
      */
     @ApiModelProperty(value = "游戏ID")
-    private Long gameId;
+    private List<Long> gameId;
 
     /**
      * SDK来源
@@ -43,4 +44,10 @@ public class GameServerSumDayTotalDTO {
     @ApiModelProperty(value = "SDK来源")
     private String sourceSystem;
 
+    /**
+     * 游戏维度:1-子游戏维度;2-父游戏维度;3-超父游戏维度
+     */
+    @ApiModelProperty(notes = "游戏维度:1-子游戏维度;2-父游戏维度")
+    private Long gameDimension;
+
 }

+ 8 - 1
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/PitcherDataDayDTO.java

@@ -8,6 +8,7 @@ import lombok.Data;
 import lombok.NoArgsConstructor;
 
 import java.time.LocalDate;
+import java.util.List;
 
 /**
  * @author tianhua
@@ -42,7 +43,7 @@ public class PitcherDataDayDTO extends BasePage {
      * 投手ID
      */
     @ApiModelProperty(value = "投手ID")
-    private Long pitcherId;
+    private List<Long> pitcherId;
 
     /**
      * 排序字段
@@ -56,4 +57,10 @@ public class PitcherDataDayDTO extends BasePage {
     @ApiModelProperty(notes = "排序方式:升序asc;降序desc")
     private String sortType;
 
+    /**
+     * 游戏维度:1-子游戏维度;2-父游戏维度;3-超父游戏维度
+     */
+    @ApiModelProperty(notes = "游戏维度:1-子游戏维度;2-父游戏维度")
+    private Long gameDimension;
+
 }

+ 8 - 1
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/PitcherDataDayTotalDTO.java

@@ -7,6 +7,7 @@ import lombok.Data;
 import lombok.NoArgsConstructor;
 
 import java.time.LocalDate;
+import java.util.List;
 
 /**
  * @author tianhua
@@ -41,6 +42,12 @@ public class PitcherDataDayTotalDTO {
      * 投手ID
      */
     @ApiModelProperty(value = "投手ID")
-    private Long pitcherId;
+    private List<Long> pitcherId;
+
+    /**
+     * 游戏维度:1-子游戏维度;2-父游戏维度;3-超父游戏维度
+     */
+    @ApiModelProperty(notes = "游戏维度:1-子游戏维度;2-父游戏维度")
+    private Long gameDimension;
 
 }

+ 8 - 1
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/PitcherDataTotalDTO.java

@@ -8,6 +8,7 @@ import lombok.Data;
 import lombok.NoArgsConstructor;
 
 import java.time.LocalDate;
+import java.util.List;
 
 /**
  * @author tianhua
@@ -54,7 +55,7 @@ public class PitcherDataTotalDTO extends BasePage {
      * 投手ID
      */
     @ApiModelProperty(value = "投手ID")
-    private Long pitcherId;
+    private List<Long> pitcherId;
 
     /**
      * 排序字段
@@ -68,4 +69,10 @@ public class PitcherDataTotalDTO extends BasePage {
     @ApiModelProperty(notes = "排序方式:升序asc;降序desc")
     private String sortType;
 
+    /**
+     * 游戏维度:1-子游戏维度;2-父游戏维度;3-超父游戏维度
+     */
+    @ApiModelProperty(notes = "游戏维度:1-子游戏维度;2-父游戏维度")
+    private Long gameDimension;
+
 }

+ 8 - 1
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/PitcherDataTotalSumDTO.java

@@ -7,6 +7,7 @@ import lombok.Data;
 import lombok.NoArgsConstructor;
 
 import java.time.LocalDate;
+import java.util.List;
 
 /**
  * @author tianhua
@@ -53,6 +54,12 @@ public class PitcherDataTotalSumDTO {
      * 投手ID
      */
     @ApiModelProperty(value = "投手ID")
-    private Long pitcherId;
+    private List<Long> pitcherId;
+
+    /**
+     * 游戏维度:1-子游戏维度;2-父游戏维度;3-超父游戏维度
+     */
+    @ApiModelProperty(notes = "游戏维度:1-子游戏维度;2-父游戏维度")
+    private Long gameDimension;
 
 }

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

@@ -75,5 +75,11 @@ public class PitcherGameDataDayDTO extends BasePage {
     @ApiModelProperty(notes = "排序方式:升序asc;降序desc")
     private String sortType;
 
+    /**
+     * 游戏维度:1-子游戏维度;2-父游戏维度;3-超父游戏维度
+     */
+    @ApiModelProperty(notes = "游戏维度:1-子游戏维度;2-父游戏维度")
+    private Long gameDimension;
+
 
 }

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

@@ -62,4 +62,10 @@ public class PitcherGameDataDayTotalDTO {
     @ApiModelProperty(value = "游戏类型")
     private Long gameType;
 
+    /**
+     * 游戏维度:1-子游戏维度;2-父游戏维度;3-超父游戏维度
+     */
+    @ApiModelProperty(notes = "游戏维度:1-子游戏维度;2-父游戏维度")
+    private Long gameDimension;
+
 }

+ 9 - 2
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/PitcherGameDataTotalDTO.java

@@ -8,6 +8,7 @@ import lombok.Data;
 import lombok.NoArgsConstructor;
 
 import java.time.LocalDate;
+import java.util.List;
 
 /**
  * @author tianhua
@@ -54,13 +55,13 @@ public class PitcherGameDataTotalDTO extends BasePage {
      * 投手ID
      */
     @ApiModelProperty(value = "投手ID")
-    private Long pitcherId;
+    private List<Long> pitcherId;
 
     /**
      * 游戏ID
      */
     @ApiModelProperty(value = "游戏ID")
-    private String gameId;
+    private List<Long> gameId;
 
     /**
      * 游戏CP方
@@ -86,4 +87,10 @@ public class PitcherGameDataTotalDTO extends BasePage {
     @ApiModelProperty(notes = "排序方式:升序asc;降序desc")
     private String sortType;
 
+    /**
+     * 游戏维度:1-子游戏维度;2-父游戏维度;3-超父游戏维度
+     */
+    @ApiModelProperty(notes = "游戏维度:1-子游戏维度;2-父游戏维度")
+    private Long gameDimension;
+
 }

+ 9 - 2
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/PitcherGameDataTotalSumDTO.java

@@ -7,6 +7,7 @@ import lombok.Data;
 import lombok.NoArgsConstructor;
 
 import java.time.LocalDate;
+import java.util.List;
 
 /**
  * @author tianhua
@@ -53,13 +54,13 @@ public class PitcherGameDataTotalSumDTO {
      * 投手ID
      */
     @ApiModelProperty(value = "投手ID")
-    private Long pitcherId;
+    private List<Long> pitcherId;
 
     /**
      * 游戏ID
      */
     @ApiModelProperty(value = "游戏ID")
-    private String gameId;
+    private List<Long> gameId;
 
     /**
      * 游戏CP方
@@ -73,4 +74,10 @@ public class PitcherGameDataTotalSumDTO {
     @ApiModelProperty(value = "游戏类型")
     private Long gameType;
 
+    /**
+     * 游戏维度:1-子游戏维度;2-父游戏维度;3-超父游戏维度
+     */
+    @ApiModelProperty(notes = "游戏维度:1-子游戏维度;2-父游戏维度")
+    private Long gameDimension;
+
 }

+ 9 - 2
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/PitcherGameMediaDataDayDTO.java

@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.time.LocalDate;
+import java.util.List;
 
 /**
  * @author tianhua
@@ -36,13 +37,13 @@ public class PitcherGameMediaDataDayDTO extends BasePage {
      * 投手ID
      */
     @ApiModelProperty(value = "投手ID")
-    private Long pitcherId;
+    private List<Long> pitcherId;
 
     /**
      * 游戏ID
      */
     @ApiModelProperty(value = "游戏ID")
-    private String gameId;
+    private List<Long> gameId;
 
     /**
      * 游戏CP方
@@ -74,4 +75,10 @@ public class PitcherGameMediaDataDayDTO extends BasePage {
     @ApiModelProperty(notes = "排序方式:升序asc;降序desc")
     private String sortType;
 
+    /**
+     * 游戏维度:1-子游戏维度;2-父游戏维度;3-超父游戏维度
+     */
+    @ApiModelProperty(notes = "游戏维度:1-子游戏维度;2-父游戏维度")
+    private Long gameDimension;
+
 }

+ 9 - 2
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/PitcherGameMediaDataDayTotalDTO.java

@@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.time.LocalDate;
+import java.util.List;
 
 /**
  * @author tianhua
@@ -35,13 +36,13 @@ public class PitcherGameMediaDataDayTotalDTO {
      * 投手ID
      */
     @ApiModelProperty(value = "投手ID")
-    private Long pitcherId;
+    private List<Long> pitcherId;
 
     /**
      * 游戏ID
      */
     @ApiModelProperty(value = "游戏ID")
-    private String gameId;
+    private List<Long> gameId;
 
     /**
      * 游戏CP方
@@ -61,4 +62,10 @@ public class PitcherGameMediaDataDayTotalDTO {
     @ApiModelProperty(value = "推广媒体")
     private String accountType;
 
+    /**
+     * 游戏维度:1-子游戏维度;2-父游戏维度;3-超父游戏维度
+     */
+    @ApiModelProperty(notes = "游戏维度:1-子游戏维度;2-父游戏维度")
+    private Long gameDimension;
+
 }

+ 9 - 2
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/PitcherGameMediaDataTotalDTO.java

@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.time.LocalDate;
+import java.util.List;
 
 /**
  * @author tianhua
@@ -48,13 +49,13 @@ public class PitcherGameMediaDataTotalDTO extends BasePage {
      * 投手ID
      */
     @ApiModelProperty(value = "投手ID")
-    private Long pitcherId;
+    private List<Long> pitcherId;
 
     /**
      * 游戏ID
      */
     @ApiModelProperty(value = "游戏ID")
-    private String gameId;
+    private List<Long> gameId;
 
     /**
      * 游戏CP方
@@ -86,4 +87,10 @@ public class PitcherGameMediaDataTotalDTO extends BasePage {
     @ApiModelProperty(notes = "排序方式:升序asc;降序desc")
     private String sortType;
 
+    /**
+     * 游戏维度:1-子游戏维度;2-父游戏维度;3-超父游戏维度
+     */
+    @ApiModelProperty(notes = "游戏维度:1-子游戏维度;2-父游戏维度")
+    private Long gameDimension;
+
 }

+ 9 - 2
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/PitcherGameMediaDataTotalSumDTO.java

@@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.time.LocalDate;
+import java.util.List;
 
 /**
  * @author tianhua
@@ -47,13 +48,13 @@ public class PitcherGameMediaDataTotalSumDTO {
      * 投手ID
      */
     @ApiModelProperty(value = "投手ID")
-    private Long pitcherId;
+    private List<Long> pitcherId;
 
     /**
      * 游戏ID
      */
     @ApiModelProperty(value = "游戏ID")
-    private String gameId;
+    private List<Long> gameId;
 
     /**
      * 游戏CP方
@@ -73,4 +74,10 @@ public class PitcherGameMediaDataTotalSumDTO {
     @ApiModelProperty(value = "推广媒体")
     private String accountType;
 
+    /**
+     * 游戏维度:1-子游戏维度;2-父游戏维度;3-超父游戏维度
+     */
+    @ApiModelProperty(notes = "游戏维度:1-子游戏维度;2-父游戏维度")
+    private Long gameDimension;
+
 }

+ 8 - 1
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/PitcherMediaDataDayDTO.java

@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.time.LocalDate;
+import java.util.List;
 
 /**
  * @author tianhua
@@ -36,7 +37,7 @@ public class PitcherMediaDataDayDTO extends BasePage {
      * 投手ID
      */
     @ApiModelProperty(value = "投手ID")
-    private Long pitcherId;
+    private List<Long> pitcherId;
 
     /**
      * 推广媒体
@@ -56,4 +57,10 @@ public class PitcherMediaDataDayDTO extends BasePage {
     @ApiModelProperty(notes = "排序方式:升序asc;降序desc")
     private String sortType;
 
+    /**
+     * 游戏维度:1-子游戏维度;2-父游戏维度;3-超父游戏维度
+     */
+    @ApiModelProperty(notes = "游戏维度:1-子游戏维度;2-父游戏维度")
+    private Long gameDimension;
+
 }

+ 8 - 1
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/PitcherMediaDataDayTotalDTO.java

@@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.time.LocalDate;
+import java.util.List;
 
 /**
  * @author tianhua
@@ -35,7 +36,7 @@ public class PitcherMediaDataDayTotalDTO {
      * 投手ID
      */
     @ApiModelProperty(value = "投手ID")
-    private Long pitcherId;
+    private List<Long> pitcherId;
 
     /**
      * 推广媒体
@@ -43,4 +44,10 @@ public class PitcherMediaDataDayTotalDTO {
     @ApiModelProperty(value = "推广媒体")
     private String accountType;
 
+    /**
+     * 游戏维度:1-子游戏维度;2-父游戏维度;3-超父游戏维度
+     */
+    @ApiModelProperty(notes = "游戏维度:1-子游戏维度;2-父游戏维度")
+    private Long gameDimension;
+
 }

+ 8 - 1
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/PitcherMediaDataTotalDTO.java

@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.time.LocalDate;
+import java.util.List;
 
 /**
  * @author tianhua
@@ -48,7 +49,7 @@ public class PitcherMediaDataTotalDTO extends BasePage {
      * 投手ID
      */
     @ApiModelProperty(value = "投手ID")
-    private Long pitcherId;
+    private List<Long> pitcherId;
 
     /**
      * 推广媒体
@@ -68,4 +69,10 @@ public class PitcherMediaDataTotalDTO extends BasePage {
     @ApiModelProperty(notes = "排序方式:升序asc;降序desc")
     private String sortType;
 
+    /**
+     * 游戏维度:1-子游戏维度;2-父游戏维度;3-超父游戏维度
+     */
+    @ApiModelProperty(notes = "游戏维度:1-子游戏维度;2-父游戏维度")
+    private Long gameDimension;
+
 }

+ 8 - 1
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/PitcherMediaDataTotalSumDTO.java

@@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.time.LocalDate;
+import java.util.List;
 
 /**
  * @author tianhua
@@ -47,7 +48,7 @@ public class PitcherMediaDataTotalSumDTO {
      * 投手ID
      */
     @ApiModelProperty(value = "投手ID")
-    private Long pitcherId;
+    private List<Long> pitcherId;
 
     /**
      * 推广媒体
@@ -55,4 +56,10 @@ public class PitcherMediaDataTotalSumDTO {
     @ApiModelProperty(value = "推广媒体")
     private String accountType;
 
+    /**
+     * 游戏维度:1-子游戏维度;2-父游戏维度;3-超父游戏维度
+     */
+    @ApiModelProperty(notes = "游戏维度:1-子游戏维度;2-父游戏维度")
+    private Long gameDimension;
+
 }

+ 931 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/entity/AdsAccountAgentDayParent.java

@@ -0,0 +1,931 @@
+package com.zanxiang.game.data.serve.pojo.entity;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+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.math.BigDecimal;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
+/**
+ * <p>
+ * 推广渠道每日数据
+ * </p>
+ *
+ * @author auto
+ * @since 2023-07-28
+ */
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@Builder
+@Table(AdsAccountAgentDayParent.TABLE_NAME)
+@PK({"dt","sourceSystem", "accountId", "agentId"})
+public class AdsAccountAgentDayParent implements Serializable {
+    private static final long serialVersionUID = 1L;
+    public static final String TABLE_NAME = "game_ads_parent.ads_account_agent_day_parent";
+
+    /**
+     * 日期(充值时间)
+     */
+    private LocalDate dt;
+
+    /**
+     * SDK来源
+     */
+    private String sourceSystem;
+
+    /**
+     * 推广账号
+     */
+    private Long accountId;
+
+    /**
+     * 渠道ID
+     */
+    private Long agentId;
+
+    /**
+     * 渠道名称
+     */
+    @Column
+    private String agentName;
+
+    /**
+     * 推广账号类型
+     */
+    @Column
+    private String accountType;
+
+    /**
+     * 投手ID
+     */
+    @Column
+    private String pitcherId;
+
+    /**
+     * 投手名称
+     */
+    @Column
+    private String pitcher;
+
+    /**
+     * 推广游戏CP名称
+     */
+    @Column
+    private String gameCp;
+
+    /**
+     * 推广游戏ID
+     */
+    @Column
+    private Long parentGameId;
+
+    /**
+     * 推广游戏名称
+     */
+    @Column
+    private String parentGameName;
+
+    /**
+     * 推广游戏类型
+     */
+    @Column
+    private String parentGameType;
+
+    /**
+     * 注册时间(消耗时间)
+     */
+    @Column
+    private LocalDateTime regTime;
+
+    /**
+     * 消耗
+     */
+    @Column
+    private BigDecimal cost;
+
+    /**
+     * 推广计划数量
+     */
+    @Column
+    private Long planCount;
+
+    /**
+     * 曝光数量
+     */
+    @Column
+    private Long viewCount;
+
+    /**
+     * 点击数量
+     */
+    @Column
+    private Long clickCount;
+
+    /**
+     * 转化数量
+     */
+    @Column
+    private Long changeCount;
+
+    /**
+     * 转化率
+     */
+    @Column
+    private BigDecimal changeRate;
+
+    /**
+     * 平均转化成本
+     */
+    @Column
+    private BigDecimal avgChangePrice;
+
+    /**
+     * 深度转化数量
+     */
+    @Column
+    private Long depthChangeCount;
+
+    /**
+     * 深度转化率
+     */
+    @Column
+    private BigDecimal depthChangeRate;
+
+    /**
+     * 深度转化成本
+     */
+    @Column
+    private BigDecimal avgDepthChangePrice;
+
+    /**
+     * 千次曝光成本
+     */
+    @Column
+    private BigDecimal thousandDisplayPrice;
+
+    /**
+     * 点击率
+     */
+    @Column
+    private BigDecimal clickRate;
+
+    /**
+     * 平均点击均价
+     */
+    @Column
+    private BigDecimal avgClickPrice;
+
+    /**
+     * 应用下载开始量
+     */
+    @Column
+    private Long downloadStart;
+
+    /**
+     * 应用下载开始成本
+     */
+    @Column
+    private BigDecimal downloadStartCost;
+
+    /**
+     * 应用下载开始率
+     */
+    @Column
+    private BigDecimal downloadStartRate;
+
+    /**
+     * 应用下载完成量
+     */
+    @Column
+    private Long downloadFinish;
+
+    /**
+     * 应用下载完成成本
+     */
+    @Column
+    private BigDecimal downloadFinishCost;
+
+    /**
+     * 应用下载完成率
+     */
+    @Column
+    private BigDecimal downloadFinishRate;
+
+    /**
+     * 应用安装完成量
+     */
+    @Column
+    private Long installFinish;
+
+    /**
+     * 应用安装完成成本
+     */
+    @Column
+    private BigDecimal installFinishCost;
+
+    /**
+     * 应用安装完成率
+     */
+    @Column
+    private BigDecimal installFinishRate;
+
+    /**
+     * 应用激活量
+     */
+    @Column
+    private Long active;
+
+    /**
+     * 应用激活成本
+     */
+    @Column
+    private BigDecimal activeCost;
+
+    /**
+     * 应用激活率
+     */
+    @Column
+    private BigDecimal activeRate;
+
+    /**
+     * 注册人数-通过广告首次登录小游戏的独立用户数
+     */
+    @Column
+    private Long registerNum;
+
+    /**
+     * 注册成本=实际消耗/注册人数
+     */
+    @Column
+    private BigDecimal registerCost;
+
+    /**
+     * 新增付费次数
+     */
+    @Column
+    private Long firstNewUserAmountCount;
+
+    /**
+     * 新增付费人数
+     */
+    @Column
+    private Long firstNewUserAmountNum;
+
+    /**
+     * 新增付费金额
+     */
+    @Column
+    private BigDecimal firstNewUserAmount;
+
+    /**
+     * 账面充值次数
+     */
+    @Column
+    private Long amountCount;
+
+    /**
+     * 账面充值人数
+     */
+    @Column
+    private Long amountNum;
+
+    /**
+     * 账面充值金额
+     */
+    @Column
+    private BigDecimal amount;
+
+    /**
+     * 老用户充值次数(每日)
+     */
+    @Column
+    private Long oldAmountCount;
+
+    /**
+     * 老用户充值人数(每日)
+     */
+    @Column
+    private Long oldAmountNum;
+
+    /**
+     * 老用户充值金额(每日)
+     */
+    @Column
+    private BigDecimal oldAmount;
+
+    /**
+     * 至今充值次数
+     */
+    @Column
+    private Long newUserTotalAmountCount;
+
+    /**
+     * 至今充值人数
+     */
+    @Column
+    private Long newUserTotalAmountNum;
+
+    /**
+     * 至今充值金额
+     */
+    @Column
+    private BigDecimal newUserTotalAmount;
+
+    /**
+     * 首日回收率
+     */
+    @Column
+    private BigDecimal firstRoi;
+
+    /**
+     * 买量回收率
+     */
+    @Column
+    private BigDecimal buyRoi;
+
+    /**
+     * 当日回收率
+     */
+    @Column
+    private BigDecimal todayRoi;
+
+    /**
+     * 毛利额,毛利=新用户-实际消耗
+     */
+    @Column
+    private BigDecimal grossProfit;
+
+    /**
+     * 1日roi
+     */
+    @Column
+    private BigDecimal roi1;
+
+    /**
+     * 2日roi
+     */
+    @Column
+    private BigDecimal roi2;
+
+    /**
+     * 3日roi
+     */
+    @Column
+    private BigDecimal roi3;
+
+    /**
+     * 4日roi
+     */
+    @Column
+    private BigDecimal roi4;
+
+    /**
+     * 5日roi
+     */
+    @Column
+    private BigDecimal roi5;
+
+    /**
+     * 6日roi
+     */
+    @Column
+    private BigDecimal roi6;
+
+    /**
+     * 7日roi
+     */
+    @Column
+    private BigDecimal roi7;
+
+    /**
+     * 8日roi
+     */
+    @Column
+    private BigDecimal roi8;
+
+    /**
+     * 9日roi
+     */
+    @Column
+    private BigDecimal roi9;
+
+    /**
+     * 10日roi
+     */
+    @Column
+    private BigDecimal roi10;
+
+    /**
+     * 11日roi
+     */
+    @Column
+    private BigDecimal roi11;
+
+    /**
+     * 12日roi
+     */
+    @Column
+    private BigDecimal roi12;
+
+    /**
+     * 13日roi
+     */
+    @Column
+    private BigDecimal roi13;
+
+    /**
+     * 14日roi
+     */
+    @Column
+    private BigDecimal roi14;
+
+    /**
+     * 15日roi
+     */
+    @Column
+    private BigDecimal roi15;
+
+    /**
+     * 16日roi
+     */
+    @Column
+    private BigDecimal roi16;
+
+    /**
+     * 17日roi
+     */
+    @Column
+    private BigDecimal roi17;
+
+    /**
+     * 18日roi
+     */
+    @Column
+    private BigDecimal roi18;
+
+    /**
+     * 19日roi
+     */
+    @Column
+    private BigDecimal roi19;
+
+    /**
+     * 20日roi
+     */
+    @Column
+    private BigDecimal roi20;
+
+    /**
+     * 21日roi
+     */
+    @Column
+    private BigDecimal roi21;
+
+    /**
+     * 22日roi
+     */
+    @Column
+    private BigDecimal roi22;
+
+    /**
+     * 23日roi
+     */
+    @Column
+    private BigDecimal roi23;
+
+    /**
+     * 24日roi
+     */
+    @Column
+    private BigDecimal roi24;
+
+    /**
+     * 25日roi
+     */
+    @Column
+    private BigDecimal roi25;
+
+    /**
+     * 26日roi
+     */
+    @Column
+    private BigDecimal roi26;
+
+    /**
+     * 27日roi
+     */
+    @Column
+    private BigDecimal roi27;
+
+    /**
+     * 28日roi
+     */
+    @Column
+    private BigDecimal roi28;
+
+    /**
+     * 29日roi
+     */
+    @Column
+    private BigDecimal roi29;
+
+    /**
+     * 30日roi
+     */
+    @Column
+    private BigDecimal roi30;
+
+    /**
+     * 60日ROI
+     */
+    @Column
+    private BigDecimal roi60;
+
+    /**
+     * 90日ROI
+     */
+    @Column
+    private BigDecimal roi90;
+
+    /**
+     * 180日ROI
+     */
+    @Column
+    private BigDecimal roi180;
+
+    /**
+     * 1年ROI
+     */
+    @Column
+    private BigDecimal roi1yaer;
+
+    /**
+     * 总ROI
+     */
+    @Column
+    private BigDecimal roiTotal;
+
+    /**
+     * 首日付费率
+     */
+    @Column
+    private BigDecimal firstRate;
+
+    /**
+     * 买量用户付费率
+     */
+    @Column
+    private BigDecimal buyUserRate;
+
+    /**
+     * 当天付费率
+     */
+    @Column
+    private BigDecimal todayRate;
+
+    /**
+     * 首日客单价
+     */
+    @Column
+    private BigDecimal firstAvg;
+
+    /**
+     * 买量客单价
+     */
+    @Column
+    private BigDecimal buyAvg;
+
+    /**
+     * 当天客单价
+     */
+    @Column
+    private BigDecimal todayAvg;
+
+    /**
+     * 账面客单价
+     */
+    @Column
+    private BigDecimal paperAvg;
+
+    /**
+     * 首日充值成本
+     */
+    @Column
+    private BigDecimal firstAmountCost;
+
+    /**
+     * 买量充值成本
+     */
+    @Column
+    private BigDecimal buyAmountCost;
+
+    /**
+     * 当天充值成本
+     */
+    @Column
+    private BigDecimal todayAmountCost;
+
+    /**
+     * 当天复充率
+     */
+    @Column
+    private BigDecimal todayAgainRate;
+
+    /**
+     * 新增注册ARPU
+     */
+    @Column
+    private BigDecimal newRegArpu;
+
+    /**
+     * 首日付费ARPU
+     */
+    @Column
+    private BigDecimal firstArpu;
+
+    /**
+     * 当天付费ARPU
+     */
+    @Column
+    private BigDecimal todayArpu;
+
+    /**
+     * 账面arpu
+     */
+    @Column
+    private BigDecimal paperArpu;
+
+    /**
+     * 付费趋势第1日总:金额/人数/增/回/倍
+     */
+    @Column
+    private String amountD1;
+
+    /**
+     * 付费趋势第2日总:金额/人数/增/回/倍
+     */
+    @Column
+    private String amountD2;
+
+    /**
+     * 付费趋势第3日总:金额/人数/增/回/倍
+     */
+    @Column
+    private String amountD3;
+
+    /**
+     * 付费趋势第4日总:金额/人数/增/回/倍
+     */
+    @Column
+    private String amountD4;
+
+    /**
+     * 付费趋势第5日总:金额/人数/增/回/倍
+     */
+    @Column
+    private String amountD5;
+
+    /**
+     * 付费趋势第6日总:金额/人数/增/回/倍
+     */
+    @Column
+    private String amountD6;
+
+    /**
+     * 付费趋势第7日总:金额/人数/增/回/倍
+     */
+    @Column
+    private String amountD7;
+
+    /**
+     * 付费趋势第8日总:金额/人数/增/回/倍
+     */
+    @Column
+    private String amountD8;
+
+    /**
+     * 付费趋势第9日总:金额/人数/增/回/倍
+     */
+    @Column
+    private String amountD9;
+
+    /**
+     * 付费趋势第10日总:金额/人数/增/回/倍
+     */
+    @Column
+    private String amountD10;
+
+    /**
+     * 付费趋势第11日总:金额/人数/增/回/倍
+     */
+    @Column
+    private String amountD11;
+
+    /**
+     * 付费趋势第12日总:金额/人数/增/回/倍
+     */
+    @Column
+    private String amountD12;
+
+    /**
+     * 付费趋势第13日总:金额/人数/增/回/倍
+     */
+    @Column
+    private String amountD13;
+
+    /**
+     * 付费趋势第14日总:金额/人数/增/回/倍
+     */
+    @Column
+    private String amountD14;
+
+    /**
+     * 付费趋势第15日总:金额/人数/增/回/倍
+     */
+    @Column
+    private String amountD15;
+
+    /**
+     * 付费趋势第16日总:金额/人数/增/回/倍
+     */
+    @Column
+    private String amountD16;
+
+    /**
+     * 付费趋势第17日总:金额/人数/增/回/倍
+     */
+    @Column
+    private String amountD17;
+
+    /**
+     * 付费趋势第18日总:金额/人数/增/回/倍
+     */
+    @Column
+    private String amountD18;
+
+    /**
+     * 付费趋势第19日总:金额/人数/增/回/倍
+     */
+    @Column
+    private String amountD19;
+
+    /**
+     * 付费趋势第20日总:金额/人数/增/回/倍
+     */
+    @Column
+    private String amountD20;
+
+    /**
+     * 付费趋势第21日总:金额/人数/增/回/倍
+     */
+    @Column
+    private String amountD21;
+
+    /**
+     * 付费趋势第22日总:金额/人数/增/回/倍
+     */
+    @Column
+    private String amountD22;
+
+    /**
+     * 付费趋势第23日总:金额/人数/增/回/倍
+     */
+    @Column
+    private String amountD23;
+
+    /**
+     * 付费趋势第24日总:金额/人数/增/回/倍
+     */
+    @Column
+    private String amountD24;
+
+    /**
+     * 付费趋势第25日总:金额/人数/增/回/倍
+     */
+    @Column
+    private String amountD25;
+
+    /**
+     * 付费趋势第26日总:金额/人数/增/回/倍
+     */
+    @Column
+    private String amountD26;
+
+    /**
+     * 付费趋势第27日总:金额/人数/增/回/倍
+     */
+    @Column
+    private String amountD27;
+
+    /**
+     * 付费趋势第28日总:金额/人数/增/回/倍
+     */
+    @Column
+    private String amountD28;
+
+    /**
+     * 付费趋势第29日总:金额/人数/增/回/倍
+     */
+    @Column
+    private String amountD29;
+
+    /**
+     * 付费趋势第30日总:金额/人数/增/回/倍
+     */
+    @Column
+    private String amountM1;
+
+    /**
+     * 付费趋势第二月总:金额/人数/增/回/倍
+     */
+    @Column
+    private String amountM2;
+
+    /**
+     * 付费趋势第三月总:金额/人数/增/回/倍
+     */
+    @Column
+    private String amountM3;
+
+    /**
+     * 付费趋势六月总:金额/人数/增/回/倍
+     */
+    @Column
+    private String amountM6;
+
+    /**
+     * 付费趋势一年总:金额/人数/增/回/倍
+     */
+    @Column
+    private String amountY1;
+
+    /**
+     * 付费趋势总:增/回/倍
+     */
+    @Column
+    private String amountSum;
+
+    /**
+     * 单日付费100+人数
+     */
+    @Column
+    private Long hundredUserNum;
+
+    /**
+     * 单日付费100+成本
+     */
+    @Column
+    private BigDecimal hundredUserNumCost;
+
+    /**
+     * 买量新用户累计充值金额
+     */
+    @Column
+    private BigDecimal buyNewUserTotalAmount;
+
+    /**
+     * 买量新用户累计充值人数
+     */
+    @Column
+    private Long buyNewUserTotalAmountNum;
+
+    /**
+     * 买量新用户累计充值次数
+     */
+    @Column
+    private Long buyNewUserTotalAmountCount;
+
+    /**
+     * 复充人数
+     */
+    @Column
+    private Long regOrderUserAgain;
+
+    /**
+     * 首日创角人数
+     */
+    @Column
+    private Long firstRoleNum;
+
+    /**
+     * 新用户累计创角人数
+     */
+    @Column
+    private Long newUserTotalRoleNum;
+
+    /**
+     * 创角人数
+     */
+    @Column
+    private Long roleNum;
+
+
+}

+ 2392 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/entity/AdsGameAcctypeDayParent.java

@@ -0,0 +1,2392 @@
+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.math.BigDecimal;
+import java.time.LocalDate;
+
+/**
+ * 游戏媒体数据表
+ */
+
+@Data
+@Table(AdsGameAcctypeDayParent.TABLE_NAME)
+@PK({"dt", "parentGameId", "accountType", "sourceSystem"})
+public class AdsGameAcctypeDayParent implements Serializable {
+    private static final long serialVersionUID = 1L;
+    public static final String TABLE_NAME = "game_ads_parent.ads_game_acctype_day_parent";
+     
+    /**
+    * 日期(充值时间)
+    */
+    private LocalDate dt;
+    
+    /**
+    * SDK来源
+    */
+    private String sourceSystem;
+    
+    /**
+    * 游戏ID
+    */
+    private String parentGameId;
+    
+    /**
+    * 推广媒体
+    */
+    private String accountType;
+    
+    /**
+    * 游戏
+    */    
+    @Column
+    private String parentGameName;
+    
+    /**
+    * 游戏CP方
+    */    
+    @Column
+    private String parentGameCp;
+    
+    /**
+    * 游戏类型
+    */    
+    @Column
+    private Long parentGameType;
+    
+    /**
+    * 消耗
+    */    
+    @Column
+    private BigDecimal cost;
+    
+    /**
+    * 推广计划数量
+    */    
+    @Column
+    private Long planCount;
+    
+    /**
+    * 推广账号数量
+    */    
+    @Column
+    private Long accountCount;
+    
+    /**
+    * 推广渠道数量
+    */    
+    @Column
+    private Long agentCount;
+    
+    /**
+    * 注册人数-通过广告首次登录小游戏的独立用户数
+    */    
+    @Column
+    private Long registerNum;
+    
+    /**
+    * 新增付费次数
+    */    
+    @Column
+    private Long firstNewUserAmountCount;
+    
+    /**
+    * 新增付费人数
+    */    
+    @Column
+    private Long firstNewUserAmountNum;
+    
+    /**
+    * 新增付费金额
+    */    
+    @Column
+    private BigDecimal firstNewUserAmount;
+    
+    /**
+    * 账面充值次数
+    */    
+    @Column
+    private Long amountCount;
+    
+    /**
+    * 账面充值人数
+    */    
+    @Column
+    private Long amountNum;
+    
+    /**
+    * 账面充值金额
+    */    
+    @Column
+    private BigDecimal amount;
+    
+    /**
+    * 老用户充值次数(每日)
+    */    
+    @Column
+    private Long oldAmountCount;
+    
+    /**
+    * 老用户充值人数(每日)
+    */    
+    @Column
+    private Long oldAmountNum;
+    
+    /**
+    * 老用户充值金额(每日)
+    */    
+    @Column
+    private BigDecimal oldAmount;
+    
+    /**
+    * 至今充值次数
+    */    
+    @Column
+    private Long newUserTotalAmountCount;
+    
+    /**
+    * 至今充值人数
+    */    
+    @Column
+    private Long newUserTotalAmountNum;
+    
+    /**
+    * 至今充值金额
+    */    
+    @Column
+    private BigDecimal newUserTotalAmount;
+    
+    /**
+    * 单日付费100+人数
+    */    
+    @Column
+    private Long hundredUserNum;
+    
+    /**
+    * 买量新用户累计充值金额
+    */    
+    @Column
+    private BigDecimal buyNewUserTotalAmount;
+    
+    /**
+    * 买量新用户累计充值人数
+    */    
+    @Column
+    private Long buyNewUserTotalAmountNum;
+    
+    /**
+    * 买量新用户累计充值次数
+    */    
+    @Column
+    private Long buyNewUserTotalAmountCount;
+    
+    /**
+    * 复充人数
+    */    
+    @Column
+    private Long regOrderUserAgain;
+    
+    /**
+    * 首日创角人数
+    */    
+    @Column
+    private Long firstRoleNum;
+    
+    /**
+    * 新用户累计创角人数
+    */    
+    @Column
+    private Long newUserTotalRoleNum;
+    
+    /**
+    * 创角人数
+    */    
+    @Column
+    private Long roleNum;
+    
+    /**
+    * 注册成本=实际消耗/注册人数
+    */    
+    @Column
+    private BigDecimal registerCost;
+    
+    /**
+    * 首日回收率
+    */    
+    @Column
+    private BigDecimal firstRoi;
+    
+    /**
+    * 买量回收率
+    */    
+    @Column
+    private BigDecimal buyRoi;
+    
+    /**
+    * 当日回收率
+    */    
+    @Column
+    private BigDecimal todayRoi;
+    
+    /**
+    * 毛利额,毛利=新用户-实际消耗
+    */    
+    @Column
+    private BigDecimal grossProfit;
+    
+    /**
+    * 首日付费率
+    */    
+    @Column
+    private BigDecimal firstRate;
+    
+    /**
+    * 买量用户付费率
+    */    
+    @Column
+    private BigDecimal buyUserRate;
+    
+    /**
+    * 当天付费率
+    */    
+    @Column
+    private BigDecimal todayRate;
+    
+    /**
+    * 首日客单价
+    */    
+    @Column
+    private BigDecimal firstAvg;
+    
+    /**
+    * 买量客单价
+    */    
+    @Column
+    private BigDecimal buyAvg;
+    
+    /**
+    * 当天客单价
+    */    
+    @Column
+    private BigDecimal todayAvg;
+    
+    /**
+    * 账面客单价
+    */    
+    @Column
+    private BigDecimal paperAvg;
+    
+    /**
+    * 首日充值成本
+    */    
+    @Column
+    private BigDecimal firstAmountCost;
+    
+    /**
+    * 买量充值成本
+    */    
+    @Column
+    private BigDecimal buyAmountCost;
+    
+    /**
+    * 当天充值成本
+    */    
+    @Column
+    private BigDecimal todayAmountCost;
+    
+    /**
+    * 当天复充率
+    */    
+    @Column
+    private BigDecimal todayAgainRate;
+    
+    /**
+    * 新增注册ARPU
+    */    
+    @Column
+    private BigDecimal newRegArpu;
+    
+    /**
+    * 首日付费ARPU
+    */    
+    @Column
+    private BigDecimal firstArpu;
+    
+    /**
+    * 当天付费ARPU
+    */    
+    @Column
+    private BigDecimal todayArpu;
+    
+    /**
+    * 账面arpu
+    */    
+    @Column
+    private BigDecimal paperArpu;
+    
+    /**
+    * 单日付费100+成本
+    */    
+    @Column
+    private BigDecimal hundredUserNumCost;
+    
+    /**
+    * 1日roi
+    */    
+    @Column
+    private BigDecimal roi1;
+    
+    /**
+    * 2日roi
+    */    
+    @Column
+    private BigDecimal roi2;
+    
+    /**
+    * 3日roi
+    */    
+    @Column
+    private BigDecimal roi3;
+    
+    /**
+    * 4日roi
+    */    
+    @Column
+    private BigDecimal roi4;
+    
+    /**
+    * 5日roi
+    */    
+    @Column
+    private BigDecimal roi5;
+    
+    /**
+    * 6日roi
+    */    
+    @Column
+    private BigDecimal roi6;
+    
+    /**
+    * 7日roi
+    */    
+    @Column
+    private BigDecimal roi7;
+    
+    /**
+    * 8日roi
+    */    
+    @Column
+    private BigDecimal roi8;
+    
+    /**
+    * 9日roi
+    */    
+    @Column
+    private BigDecimal roi9;
+    
+    /**
+    * 10日roi
+    */    
+    @Column
+    private BigDecimal roi10;
+    
+    /**
+    * 11日roi
+    */    
+    @Column
+    private BigDecimal roi11;
+    
+    /**
+    * 12日roi
+    */    
+    @Column
+    private BigDecimal roi12;
+    
+    /**
+    * 13日roi
+    */    
+    @Column
+    private BigDecimal roi13;
+    
+    /**
+    * 14日roi
+    */    
+    @Column
+    private BigDecimal roi14;
+    
+    /**
+    * 15日roi
+    */    
+    @Column
+    private BigDecimal roi15;
+    
+    /**
+    * 16日roi
+    */    
+    @Column
+    private BigDecimal roi16;
+    
+    /**
+    * 17日roi
+    */    
+    @Column
+    private BigDecimal roi17;
+    
+    /**
+    * 18日roi
+    */    
+    @Column
+    private BigDecimal roi18;
+    
+    /**
+    * 19日roi
+    */    
+    @Column
+    private BigDecimal roi19;
+    
+    /**
+    * 20日roi
+    */    
+    @Column
+    private BigDecimal roi20;
+    
+    /**
+    * 21日roi
+    */    
+    @Column
+    private BigDecimal roi21;
+    
+    /**
+    * 22日roi
+    */    
+    @Column
+    private BigDecimal roi22;
+    
+    /**
+    * 23日roi
+    */    
+    @Column
+    private BigDecimal roi23;
+    
+    /**
+    * 24日roi
+    */    
+    @Column
+    private BigDecimal roi24;
+    
+    /**
+    * 25日roi
+    */    
+    @Column
+    private BigDecimal roi25;
+    
+    /**
+    * 26日roi
+    */    
+    @Column
+    private BigDecimal roi26;
+    
+    /**
+    * 27日roi
+    */    
+    @Column
+    private BigDecimal roi27;
+    
+    /**
+    * 28日roi
+    */    
+    @Column
+    private BigDecimal roi28;
+    
+    /**
+    * 29日roi
+    */    
+    @Column
+    private BigDecimal roi29;
+    
+    /**
+    * 30日roi
+    */    
+    @Column
+    private BigDecimal roi30;
+    
+    /**
+    * 60日ROI
+    */    
+    @Column
+    private BigDecimal roi60;
+    
+    /**
+    * 90日ROI
+    */    
+    @Column
+    private BigDecimal roi90;
+    
+    /**
+    * 180日ROI
+    */    
+    @Column
+    private BigDecimal roi180;
+    
+    /**
+    * 1年ROI
+    */    
+    @Column
+    private BigDecimal roi1yaer;
+    
+    /**
+    * 总ROI
+    */    
+    @Column
+    private BigDecimal roiTotal;
+    
+    /**
+    * 付费趋势第1日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD1;
+    
+    /**
+    * 付费趋势第2日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD2;
+    
+    /**
+    * 付费趋势第3日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD3;
+    
+    /**
+    * 付费趋势第4日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD4;
+    
+    /**
+    * 付费趋势第5日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD5;
+    
+    /**
+    * 付费趋势第6日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD6;
+    
+    /**
+    * 付费趋势第7日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD7;
+    
+    /**
+    * 付费趋势第8日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD8;
+    
+    /**
+    * 付费趋势第9日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD9;
+    
+    /**
+    * 付费趋势第10日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD10;
+    
+    /**
+    * 付费趋势第11日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD11;
+    
+    /**
+    * 付费趋势第12日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD12;
+    
+    /**
+    * 付费趋势第13日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD13;
+    
+    /**
+    * 付费趋势第14日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD14;
+    
+    /**
+    * 付费趋势第15日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD15;
+    
+    /**
+    * 付费趋势第16日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD16;
+    
+    /**
+    * 付费趋势第17日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD17;
+    
+    /**
+    * 付费趋势第18日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD18;
+    
+    /**
+    * 付费趋势第19日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD19;
+    
+    /**
+    * 付费趋势第20日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD20;
+    
+    /**
+    * 付费趋势第21日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD21;
+    
+    /**
+    * 付费趋势第22日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD22;
+    
+    /**
+    * 付费趋势第23日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD23;
+    
+    /**
+    * 付费趋势第24日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD24;
+    
+    /**
+    * 付费趋势第25日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD25;
+    
+    /**
+    * 付费趋势第26日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD26;
+    
+    /**
+    * 付费趋势第27日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD27;
+    
+    /**
+    * 付费趋势第28日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD28;
+    
+    /**
+    * 付费趋势第29日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD29;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD30;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD31;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD32;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD33;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD34;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD35;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD36;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD37;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD38;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD39;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD40;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD41;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD42;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD43;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD44;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD45;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD46;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD47;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD48;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD49;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD50;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD51;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD52;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD53;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD54;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD55;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD56;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD57;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD58;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD59;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD60;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD61;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD62;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD63;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD64;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD65;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD66;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD67;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD68;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD69;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD70;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD71;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD72;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD73;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD74;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD75;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD76;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD77;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD78;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD79;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD80;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD81;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD82;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD83;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD84;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD85;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD86;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD87;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD88;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD89;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD90;
+    
+    /**
+    * 付费趋势4六月总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountM4;
+    
+    /**
+    * 付费趋势5六月总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountM5;
+    
+    /**
+    * 付费趋势6六月总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountM6;
+    
+    /**
+    * 付费趋势7六月总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountM7;
+    
+    /**
+    * 付费趋势8六月总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountM8;
+    
+    /**
+    * 付费趋势9六月总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountM9;
+    
+    /**
+    * 付费趋势10六月总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountM10;
+    
+    /**
+    * 付费趋势11六月总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountM11;
+    
+    /**
+    * 付费趋势12六月总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountM12;
+    
+    /**
+    * 付费趋势总:增/回/倍
+    */    
+    @Column
+    private String amountSum;
+    
+    /**
+    * 投手游戏第1天新用户充值
+    */    
+    @Column
+    private BigDecimal da1;
+    
+    /**
+    * 投手游戏第2天新用户充值
+    */    
+    @Column
+    private BigDecimal da2;
+    
+    /**
+    * 投手游戏第3天新用户充值
+    */    
+    @Column
+    private BigDecimal da3;
+    
+    /**
+    * 投手游戏第4天新用户充值
+    */    
+    @Column
+    private BigDecimal da4;
+    
+    /**
+    * 投手游戏第5天新用户充值
+    */    
+    @Column
+    private BigDecimal da5;
+    
+    /**
+    * 投手游戏第6天新用户充值
+    */    
+    @Column
+    private BigDecimal da6;
+    
+    /**
+    * 投手游戏第7天新用户充值
+    */    
+    @Column
+    private BigDecimal da7;
+    
+    /**
+    * 投手游戏第8天新用户充值
+    */    
+    @Column
+    private BigDecimal da8;
+    
+    /**
+    * 投手游戏第9天新用户充值
+    */    
+    @Column
+    private BigDecimal da9;
+    
+    /**
+    * 投手游戏第10天新用户充值
+    */    
+    @Column
+    private BigDecimal da10;
+    
+    /**
+    * 投手游戏第11天新用户充值
+    */    
+    @Column
+    private BigDecimal da11;
+    
+    /**
+    * 投手游戏第12天新用户充值
+    */    
+    @Column
+    private BigDecimal da12;
+    
+    /**
+    * 投手游戏第13天新用户充值
+    */    
+    @Column
+    private BigDecimal da13;
+    
+    /**
+    * 投手游戏第14天新用户充值
+    */    
+    @Column
+    private BigDecimal da14;
+    
+    /**
+    * 投手游戏第15天新用户充值
+    */    
+    @Column
+    private BigDecimal da15;
+    
+    /**
+    * 投手游戏第16天新用户充值
+    */    
+    @Column
+    private BigDecimal da16;
+    
+    /**
+    * 投手游戏第17天新用户充值
+    */    
+    @Column
+    private BigDecimal da17;
+    
+    /**
+    * 投手游戏第18天新用户充值
+    */    
+    @Column
+    private BigDecimal da18;
+    
+    /**
+    * 投手游戏第19天新用户充值
+    */    
+    @Column
+    private BigDecimal da19;
+    
+    /**
+    * 投手游戏第20天新用户充值
+    */    
+    @Column
+    private BigDecimal da20;
+    
+    /**
+    * 投手游戏第21天新用户充值
+    */    
+    @Column
+    private BigDecimal da21;
+    
+    /**
+    * 投手游戏第22天新用户充值
+    */    
+    @Column
+    private BigDecimal da22;
+    
+    /**
+    * 投手游戏第23天新用户充值
+    */    
+    @Column
+    private BigDecimal da23;
+    
+    /**
+    * 投手游戏第24天新用户充值
+    */    
+    @Column
+    private BigDecimal da24;
+    
+    /**
+    * 投手游戏第25天新用户充值
+    */    
+    @Column
+    private BigDecimal da25;
+    
+    /**
+    * 投手游戏第26天新用户充值
+    */    
+    @Column
+    private BigDecimal da26;
+    
+    /**
+    * 投手游戏第27天新用户充值
+    */    
+    @Column
+    private BigDecimal da27;
+    
+    /**
+    * 投手游戏第28天新用户充值
+    */    
+    @Column
+    private BigDecimal da28;
+    
+    /**
+    * 投手游戏第29天新用户充值
+    */    
+    @Column
+    private BigDecimal da29;
+    
+    /**
+    * 投手游戏第30天新用户充值
+    */    
+    @Column
+    private BigDecimal da30;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da31;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da32;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da33;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da34;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da35;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da36;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da37;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da38;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da39;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da40;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da41;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da42;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da43;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da44;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da45;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da46;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da47;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da48;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da49;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da50;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da51;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da52;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da53;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da54;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da55;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da56;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da57;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da58;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da59;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da60;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da61;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da62;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da63;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da64;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da65;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da66;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da67;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da68;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da69;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da70;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da71;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da72;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da73;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da74;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da75;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da76;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da77;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da78;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da79;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da80;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da81;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da82;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da83;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da84;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da85;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da86;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da87;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da88;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da89;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da90;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal m4;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal m5;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal m6;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal m7;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal m8;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal m9;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal m10;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal m11;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal m12;
+    
+    /**
+    * 至今充值金额
+    */    
+    @Column
+    private BigDecimal total;
+    
+    /**
+    * 投手游戏第1天新用户人数
+    */    
+    @Column
+    private Long da1Num;
+    
+    /**
+    * 投手游戏第2天新用户人数
+    */    
+    @Column
+    private Long da2Num;
+    
+    /**
+    * 投手游戏第3天新用户人数
+    */    
+    @Column
+    private Long da3Num;
+    
+    /**
+    * 投手游戏第4天新用户人数
+    */    
+    @Column
+    private Long da4Num;
+    
+    /**
+    * 投手游戏第5天新用户人数
+    */    
+    @Column
+    private Long da5Num;
+    
+    /**
+    * 投手游戏第6天新用户人数
+    */    
+    @Column
+    private Long da6Num;
+    
+    /**
+    * 投手游戏第7天新用户人数
+    */    
+    @Column
+    private Long da7Num;
+    
+    /**
+    * 投手游戏第8天新用户人数
+    */    
+    @Column
+    private Long da8Num;
+    
+    /**
+    * 投手游戏第9天新用户人数
+    */    
+    @Column
+    private Long da9Num;
+    
+    /**
+    * 投手游戏第10天新用户人数
+    */    
+    @Column
+    private Long da10Num;
+    
+    /**
+    * 投手游戏第11天新用户人数
+    */    
+    @Column
+    private Long da11Num;
+    
+    /**
+    * 投手游戏第12天新用户人数
+    */    
+    @Column
+    private Long da12Num;
+    
+    /**
+    * 投手游戏第13天新用户人数
+    */    
+    @Column
+    private Long da13Num;
+    
+    /**
+    * 投手游戏第14天新用户人数
+    */    
+    @Column
+    private Long da14Num;
+    
+    /**
+    * 投手游戏第15天新用户人数
+    */    
+    @Column
+    private Long da15Num;
+    
+    /**
+    * 投手游戏第16天新用户人数
+    */    
+    @Column
+    private Long da16Num;
+    
+    /**
+    * 投手游戏第17天新用户人数
+    */    
+    @Column
+    private Long da17Num;
+    
+    /**
+    * 投手游戏第18天新用户人数
+    */    
+    @Column
+    private Long da18Num;
+    
+    /**
+    * 投手游戏第19天新用户人数
+    */    
+    @Column
+    private Long da19Num;
+    
+    /**
+    * 投手游戏第20天新用户人数
+    */    
+    @Column
+    private Long da20Num;
+    
+    /**
+    * 投手游戏第21天新用户人数
+    */    
+    @Column
+    private Long da21Num;
+    
+    /**
+    * 投手游戏第22天新用户人数
+    */    
+    @Column
+    private Long da22Num;
+    
+    /**
+    * 投手游戏第23天新用户人数
+    */    
+    @Column
+    private Long da23Num;
+    
+    /**
+    * 投手游戏第24天新用户人数
+    */    
+    @Column
+    private Long da24Num;
+    
+    /**
+    * 投手游戏第25天新用户人数
+    */    
+    @Column
+    private Long da25Num;
+    
+    /**
+    * 投手游戏第26天新用户人数
+    */    
+    @Column
+    private Long da26Num;
+    
+    /**
+    * 投手游戏第27天新用户人数
+    */    
+    @Column
+    private Long da27Num;
+    
+    /**
+    * 投手游戏第28天新用户人数
+    */    
+    @Column
+    private Long da28Num;
+    
+    /**
+    * 投手游戏第29天新用户人数
+    */    
+    @Column
+    private Long da29Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da30Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da31Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da32Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da33Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da34Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da35Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da36Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da37Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da38Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da39Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da40Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da41Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da42Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da43Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da44Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da45Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da46Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da47Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da48Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da49Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da50Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da51Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da52Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da53Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da54Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da55Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da56Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da57Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da58Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da59Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da60Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da61Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da62Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da63Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da64Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da65Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da66Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da67Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da68Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da69Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da70Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da71Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da72Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da73Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da74Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da75Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da76Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da77Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da78Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da79Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da80Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da81Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da82Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da83Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da84Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da85Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da86Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da87Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da88Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da89Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da90Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long m4Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long m5Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long m6Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long m7Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long m8Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long m9Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long m10Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long m11Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long m12Num;
+    
+    /**
+    * 至今充值人数
+    */    
+    @Column
+    private Long totalNum;
+    
+    /**
+    * 首日创角成本
+    */    
+    @Column
+    private BigDecimal firstRoleCost;
+    
+    /**
+    * 新用户累计创角成本
+    */    
+    @Column
+    private BigDecimal newUserTotalRoleCost;
+    
+    /**
+    * 创角成本
+    */    
+    @Column
+    private BigDecimal roleNumCost;
+    
+    /**
+    * 首日创角率
+    */    
+    @Column
+    private BigDecimal firstRoleRate;
+    
+    /**
+    * 新用户累计创角率
+    */    
+    @Column
+    private BigDecimal newUserTotalRoleRate;
+    
+    /**
+    * 创角率
+    */    
+    @Column
+    private BigDecimal roleNumRate;
+    
+    /**
+    * 新用户付费比
+    */    
+    @Column
+    private BigDecimal newUserAmountRatio;
+    
+
+}
+
+

+ 2402 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/entity/AdsGamePitcherAcctypeDayParent.java

@@ -0,0 +1,2402 @@
+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.math.BigDecimal;
+import java.time.LocalDate;
+
+/**
+ *  推广媒体数据表
+ */
+@Data
+@Table(AdsGamePitcherAcctypeDayParent.TABLE_NAME)
+@PK({"dt", "parentGameId", "pitcherId", "sourceSystem"})
+public class AdsGamePitcherAcctypeDayParent implements Serializable {
+    private static final long serialVersionUID = 1L;
+    public static final String TABLE_NAME = "game_ads_parent.ads_game_pitcher_acctype_day_parent";
+     
+    /**
+    * 日期(充值时间)
+    */
+    private LocalDate dt;
+    
+    /**
+    * SDK来源
+    */
+    private String sourceSystem;
+    
+    /**
+    * 投手ID
+    */
+    private Long pitcherId;
+    
+    /**
+    * 游戏ID
+    */
+    private String parentGameId;
+    
+    /**
+    * 投手
+    */    
+    @Column
+    private String pitcher;
+    
+    /**
+    * 游戏
+    */    
+    @Column
+    private String parentGameName;
+    
+    /**
+    * 游戏CP方
+    */    
+    @Column
+    private String parentGameCp;
+    
+    /**
+    * 游戏类型
+    */    
+    @Column
+    private Long parentGameType;
+    
+    /**
+    * 推广媒体
+    */    
+    @Column
+    private String accountType;
+    
+    /**
+    * 消耗
+    */    
+    @Column
+    private BigDecimal cost;
+    
+    /**
+    * 推广计划数量
+    */    
+    @Column
+    private Long planCount;
+    
+    /**
+    * 推广账号数量
+    */    
+    @Column
+    private Long accountCount;
+    
+    /**
+    * 推广渠道数量
+    */    
+    @Column
+    private Long agentCount;
+    
+    /**
+    * 注册人数-通过广告首次登录小游戏的独立用户数
+    */    
+    @Column
+    private Long registerNum;
+    
+    /**
+    * 新增付费次数
+    */    
+    @Column
+    private Long firstNewUserAmountCount;
+    
+    /**
+    * 新增付费人数
+    */    
+    @Column
+    private Long firstNewUserAmountNum;
+    
+    /**
+    * 新增付费金额
+    */    
+    @Column
+    private BigDecimal firstNewUserAmount;
+    
+    /**
+    * 账面充值次数
+    */    
+    @Column
+    private Long amountCount;
+    
+    /**
+    * 账面充值人数
+    */    
+    @Column
+    private Long amountNum;
+    
+    /**
+    * 账面充值金额
+    */    
+    @Column
+    private BigDecimal amount;
+    
+    /**
+    * 老用户充值次数(每日)
+    */    
+    @Column
+    private Long oldAmountCount;
+    
+    /**
+    * 老用户充值人数(每日)
+    */    
+    @Column
+    private Long oldAmountNum;
+    
+    /**
+    * 老用户充值金额(每日)
+    */    
+    @Column
+    private BigDecimal oldAmount;
+    
+    /**
+    * 至今充值次数
+    */    
+    @Column
+    private Long newUserTotalAmountCount;
+    
+    /**
+    * 至今充值人数
+    */    
+    @Column
+    private Long newUserTotalAmountNum;
+    
+    /**
+    * 至今充值金额
+    */    
+    @Column
+    private BigDecimal newUserTotalAmount;
+    
+    /**
+    * 单日付费100+人数
+    */    
+    @Column
+    private Long hundredUserNum;
+    
+    /**
+    * 买量新用户累计充值金额
+    */    
+    @Column
+    private BigDecimal buyNewUserTotalAmount;
+    
+    /**
+    * 买量新用户累计充值人数
+    */    
+    @Column
+    private Long buyNewUserTotalAmountNum;
+    
+    /**
+    * 买量新用户累计充值次数
+    */    
+    @Column
+    private Long buyNewUserTotalAmountCount;
+    
+    /**
+    * 复充人数
+    */    
+    @Column
+    private Long regOrderUserAgain;
+    
+    /**
+    * 首日创角人数
+    */    
+    @Column
+    private Long firstRoleNum;
+    
+    /**
+    * 新用户累计创角人数
+    */    
+    @Column
+    private Long newUserTotalRoleNum;
+    
+    /**
+    * 创角人数
+    */    
+    @Column
+    private Long roleNum;
+    
+    /**
+    * 注册成本=实际消耗/注册人数
+    */    
+    @Column
+    private BigDecimal registerCost;
+    
+    /**
+    * 首日回收率
+    */    
+    @Column
+    private BigDecimal firstRoi;
+    
+    /**
+    * 买量回收率
+    */    
+    @Column
+    private BigDecimal buyRoi;
+    
+    /**
+    * 当日回收率
+    */    
+    @Column
+    private BigDecimal todayRoi;
+    
+    /**
+    * 毛利额,毛利=新用户-实际消耗
+    */    
+    @Column
+    private BigDecimal grossProfit;
+    
+    /**
+    * 首日付费率
+    */    
+    @Column
+    private BigDecimal firstRate;
+    
+    /**
+    * 买量用户付费率
+    */    
+    @Column
+    private BigDecimal buyUserRate;
+    
+    /**
+    * 当天付费率
+    */    
+    @Column
+    private BigDecimal todayRate;
+    
+    /**
+    * 首日客单价
+    */    
+    @Column
+    private BigDecimal firstAvg;
+    
+    /**
+    * 买量客单价
+    */    
+    @Column
+    private BigDecimal buyAvg;
+    
+    /**
+    * 当天客单价
+    */    
+    @Column
+    private BigDecimal todayAvg;
+    
+    /**
+    * 账面客单价
+    */    
+    @Column
+    private BigDecimal paperAvg;
+    
+    /**
+    * 首日充值成本
+    */    
+    @Column
+    private BigDecimal firstAmountCost;
+    
+    /**
+    * 买量充值成本
+    */    
+    @Column
+    private BigDecimal buyAmountCost;
+    
+    /**
+    * 当天充值成本
+    */    
+    @Column
+    private BigDecimal todayAmountCost;
+    
+    /**
+    * 当天复充率
+    */    
+    @Column
+    private BigDecimal todayAgainRate;
+    
+    /**
+    * 新增注册ARPU
+    */    
+    @Column
+    private BigDecimal newRegArpu;
+    
+    /**
+    * 首日付费ARPU
+    */    
+    @Column
+    private BigDecimal firstArpu;
+    
+    /**
+    * 当天付费ARPU
+    */    
+    @Column
+    private BigDecimal todayArpu;
+    
+    /**
+    * 账面arpu
+    */    
+    @Column
+    private BigDecimal paperArpu;
+    
+    /**
+    * 单日付费100+成本
+    */    
+    @Column
+    private BigDecimal hundredUserNumCost;
+    
+    /**
+    * 1日roi
+    */    
+    @Column
+    private BigDecimal roi1;
+    
+    /**
+    * 2日roi
+    */    
+    @Column
+    private BigDecimal roi2;
+    
+    /**
+    * 3日roi
+    */    
+    @Column
+    private BigDecimal roi3;
+    
+    /**
+    * 4日roi
+    */    
+    @Column
+    private BigDecimal roi4;
+    
+    /**
+    * 5日roi
+    */    
+    @Column
+    private BigDecimal roi5;
+    
+    /**
+    * 6日roi
+    */    
+    @Column
+    private BigDecimal roi6;
+    
+    /**
+    * 7日roi
+    */    
+    @Column
+    private BigDecimal roi7;
+    
+    /**
+    * 8日roi
+    */    
+    @Column
+    private BigDecimal roi8;
+    
+    /**
+    * 9日roi
+    */    
+    @Column
+    private BigDecimal roi9;
+    
+    /**
+    * 10日roi
+    */    
+    @Column
+    private BigDecimal roi10;
+    
+    /**
+    * 11日roi
+    */    
+    @Column
+    private BigDecimal roi11;
+    
+    /**
+    * 12日roi
+    */    
+    @Column
+    private BigDecimal roi12;
+    
+    /**
+    * 13日roi
+    */    
+    @Column
+    private BigDecimal roi13;
+    
+    /**
+    * 14日roi
+    */    
+    @Column
+    private BigDecimal roi14;
+    
+    /**
+    * 15日roi
+    */    
+    @Column
+    private BigDecimal roi15;
+    
+    /**
+    * 16日roi
+    */    
+    @Column
+    private BigDecimal roi16;
+    
+    /**
+    * 17日roi
+    */    
+    @Column
+    private BigDecimal roi17;
+    
+    /**
+    * 18日roi
+    */    
+    @Column
+    private BigDecimal roi18;
+    
+    /**
+    * 19日roi
+    */    
+    @Column
+    private BigDecimal roi19;
+    
+    /**
+    * 20日roi
+    */    
+    @Column
+    private BigDecimal roi20;
+    
+    /**
+    * 21日roi
+    */    
+    @Column
+    private BigDecimal roi21;
+    
+    /**
+    * 22日roi
+    */    
+    @Column
+    private BigDecimal roi22;
+    
+    /**
+    * 23日roi
+    */    
+    @Column
+    private BigDecimal roi23;
+    
+    /**
+    * 24日roi
+    */    
+    @Column
+    private BigDecimal roi24;
+    
+    /**
+    * 25日roi
+    */    
+    @Column
+    private BigDecimal roi25;
+    
+    /**
+    * 26日roi
+    */    
+    @Column
+    private BigDecimal roi26;
+    
+    /**
+    * 27日roi
+    */    
+    @Column
+    private BigDecimal roi27;
+    
+    /**
+    * 28日roi
+    */    
+    @Column
+    private BigDecimal roi28;
+    
+    /**
+    * 29日roi
+    */    
+    @Column
+    private BigDecimal roi29;
+    
+    /**
+    * 30日roi
+    */    
+    @Column
+    private BigDecimal roi30;
+    
+    /**
+    * 60日ROI
+    */    
+    @Column
+    private BigDecimal roi60;
+    
+    /**
+    * 90日ROI
+    */    
+    @Column
+    private BigDecimal roi90;
+    
+    /**
+    * 180日ROI
+    */    
+    @Column
+    private BigDecimal roi180;
+    
+    /**
+    * 1年ROI
+    */    
+    @Column
+    private BigDecimal roi1yaer;
+    
+    /**
+    * 总ROI
+    */    
+    @Column
+    private BigDecimal roiTotal;
+    
+    /**
+    * 付费趋势第1日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD1;
+    
+    /**
+    * 付费趋势第2日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD2;
+    
+    /**
+    * 付费趋势第3日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD3;
+    
+    /**
+    * 付费趋势第4日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD4;
+    
+    /**
+    * 付费趋势第5日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD5;
+    
+    /**
+    * 付费趋势第6日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD6;
+    
+    /**
+    * 付费趋势第7日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD7;
+    
+    /**
+    * 付费趋势第8日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD8;
+    
+    /**
+    * 付费趋势第9日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD9;
+    
+    /**
+    * 付费趋势第10日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD10;
+    
+    /**
+    * 付费趋势第11日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD11;
+    
+    /**
+    * 付费趋势第12日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD12;
+    
+    /**
+    * 付费趋势第13日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD13;
+    
+    /**
+    * 付费趋势第14日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD14;
+    
+    /**
+    * 付费趋势第15日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD15;
+    
+    /**
+    * 付费趋势第16日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD16;
+    
+    /**
+    * 付费趋势第17日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD17;
+    
+    /**
+    * 付费趋势第18日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD18;
+    
+    /**
+    * 付费趋势第19日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD19;
+    
+    /**
+    * 付费趋势第20日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD20;
+    
+    /**
+    * 付费趋势第21日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD21;
+    
+    /**
+    * 付费趋势第22日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD22;
+    
+    /**
+    * 付费趋势第23日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD23;
+    
+    /**
+    * 付费趋势第24日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD24;
+    
+    /**
+    * 付费趋势第25日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD25;
+    
+    /**
+    * 付费趋势第26日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD26;
+    
+    /**
+    * 付费趋势第27日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD27;
+    
+    /**
+    * 付费趋势第28日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD28;
+    
+    /**
+    * 付费趋势第29日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD29;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD30;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD31;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD32;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD33;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD34;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD35;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD36;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD37;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD38;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD39;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD40;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD41;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD42;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD43;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD44;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD45;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD46;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD47;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD48;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD49;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD50;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD51;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD52;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD53;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD54;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD55;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD56;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD57;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD58;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD59;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD60;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD61;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD62;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD63;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD64;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD65;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD66;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD67;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD68;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD69;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD70;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD71;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD72;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD73;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD74;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD75;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD76;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD77;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD78;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD79;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD80;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD81;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD82;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD83;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD84;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD85;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD86;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD87;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD88;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD89;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD90;
+    
+    /**
+    * 付费趋势4六月总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountM4;
+    
+    /**
+    * 付费趋势5六月总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountM5;
+    
+    /**
+    * 付费趋势6六月总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountM6;
+    
+    /**
+    * 付费趋势7六月总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountM7;
+    
+    /**
+    * 付费趋势8六月总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountM8;
+    
+    /**
+    * 付费趋势9六月总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountM9;
+    
+    /**
+    * 付费趋势10六月总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountM10;
+    
+    /**
+    * 付费趋势11六月总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountM11;
+    
+    /**
+    * 付费趋势12六月总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountM12;
+    
+    /**
+    * 付费趋势总:增/回/倍
+    */    
+    @Column
+    private String amountSum;
+    
+    /**
+    * 投手游戏第1天新用户充值
+    */    
+    @Column
+    private BigDecimal da1;
+    
+    /**
+    * 投手游戏第2天新用户充值
+    */    
+    @Column
+    private BigDecimal da2;
+    
+    /**
+    * 投手游戏第3天新用户充值
+    */    
+    @Column
+    private BigDecimal da3;
+    
+    /**
+    * 投手游戏第4天新用户充值
+    */    
+    @Column
+    private BigDecimal da4;
+    
+    /**
+    * 投手游戏第5天新用户充值
+    */    
+    @Column
+    private BigDecimal da5;
+    
+    /**
+    * 投手游戏第6天新用户充值
+    */    
+    @Column
+    private BigDecimal da6;
+    
+    /**
+    * 投手游戏第7天新用户充值
+    */    
+    @Column
+    private BigDecimal da7;
+    
+    /**
+    * 投手游戏第8天新用户充值
+    */    
+    @Column
+    private BigDecimal da8;
+    
+    /**
+    * 投手游戏第9天新用户充值
+    */    
+    @Column
+    private BigDecimal da9;
+    
+    /**
+    * 投手游戏第10天新用户充值
+    */    
+    @Column
+    private BigDecimal da10;
+    
+    /**
+    * 投手游戏第11天新用户充值
+    */    
+    @Column
+    private BigDecimal da11;
+    
+    /**
+    * 投手游戏第12天新用户充值
+    */    
+    @Column
+    private BigDecimal da12;
+    
+    /**
+    * 投手游戏第13天新用户充值
+    */    
+    @Column
+    private BigDecimal da13;
+    
+    /**
+    * 投手游戏第14天新用户充值
+    */    
+    @Column
+    private BigDecimal da14;
+    
+    /**
+    * 投手游戏第15天新用户充值
+    */    
+    @Column
+    private BigDecimal da15;
+    
+    /**
+    * 投手游戏第16天新用户充值
+    */    
+    @Column
+    private BigDecimal da16;
+    
+    /**
+    * 投手游戏第17天新用户充值
+    */    
+    @Column
+    private BigDecimal da17;
+    
+    /**
+    * 投手游戏第18天新用户充值
+    */    
+    @Column
+    private BigDecimal da18;
+    
+    /**
+    * 投手游戏第19天新用户充值
+    */    
+    @Column
+    private BigDecimal da19;
+    
+    /**
+    * 投手游戏第20天新用户充值
+    */    
+    @Column
+    private BigDecimal da20;
+    
+    /**
+    * 投手游戏第21天新用户充值
+    */    
+    @Column
+    private BigDecimal da21;
+    
+    /**
+    * 投手游戏第22天新用户充值
+    */    
+    @Column
+    private BigDecimal da22;
+    
+    /**
+    * 投手游戏第23天新用户充值
+    */    
+    @Column
+    private BigDecimal da23;
+    
+    /**
+    * 投手游戏第24天新用户充值
+    */    
+    @Column
+    private BigDecimal da24;
+    
+    /**
+    * 投手游戏第25天新用户充值
+    */    
+    @Column
+    private BigDecimal da25;
+    
+    /**
+    * 投手游戏第26天新用户充值
+    */    
+    @Column
+    private BigDecimal da26;
+    
+    /**
+    * 投手游戏第27天新用户充值
+    */    
+    @Column
+    private BigDecimal da27;
+    
+    /**
+    * 投手游戏第28天新用户充值
+    */    
+    @Column
+    private BigDecimal da28;
+    
+    /**
+    * 投手游戏第29天新用户充值
+    */    
+    @Column
+    private BigDecimal da29;
+    
+    /**
+    * 投手游戏第30天新用户充值
+    */    
+    @Column
+    private BigDecimal da30;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da31;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da32;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da33;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da34;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da35;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da36;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da37;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da38;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da39;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da40;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da41;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da42;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da43;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da44;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da45;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da46;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da47;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da48;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da49;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da50;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da51;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da52;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da53;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da54;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da55;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da56;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da57;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da58;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da59;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da60;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da61;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da62;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da63;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da64;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da65;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da66;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da67;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da68;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da69;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da70;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da71;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da72;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da73;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da74;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da75;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da76;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da77;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da78;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da79;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da80;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da81;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da82;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da83;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da84;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da85;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da86;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da87;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da88;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da89;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da90;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal m4;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal m5;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal m6;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal m7;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal m8;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal m9;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal m10;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal m11;
+    
+    /**
+    * 投手游戏第N天新用户充值
+    */    
+    @Column
+    private BigDecimal m12;
+    
+    /**
+    * 至今充值金额
+    */    
+    @Column
+    private BigDecimal total;
+    
+    /**
+    * 投手游戏第1天新用户人数
+    */    
+    @Column
+    private Long da1Num;
+    
+    /**
+    * 投手游戏第2天新用户人数
+    */    
+    @Column
+    private Long da2Num;
+    
+    /**
+    * 投手游戏第3天新用户人数
+    */    
+    @Column
+    private Long da3Num;
+    
+    /**
+    * 投手游戏第4天新用户人数
+    */    
+    @Column
+    private Long da4Num;
+    
+    /**
+    * 投手游戏第5天新用户人数
+    */    
+    @Column
+    private Long da5Num;
+    
+    /**
+    * 投手游戏第6天新用户人数
+    */    
+    @Column
+    private Long da6Num;
+    
+    /**
+    * 投手游戏第7天新用户人数
+    */    
+    @Column
+    private Long da7Num;
+    
+    /**
+    * 投手游戏第8天新用户人数
+    */    
+    @Column
+    private Long da8Num;
+    
+    /**
+    * 投手游戏第9天新用户人数
+    */    
+    @Column
+    private Long da9Num;
+    
+    /**
+    * 投手游戏第10天新用户人数
+    */    
+    @Column
+    private Long da10Num;
+    
+    /**
+    * 投手游戏第11天新用户人数
+    */    
+    @Column
+    private Long da11Num;
+    
+    /**
+    * 投手游戏第12天新用户人数
+    */    
+    @Column
+    private Long da12Num;
+    
+    /**
+    * 投手游戏第13天新用户人数
+    */    
+    @Column
+    private Long da13Num;
+    
+    /**
+    * 投手游戏第14天新用户人数
+    */    
+    @Column
+    private Long da14Num;
+    
+    /**
+    * 投手游戏第15天新用户人数
+    */    
+    @Column
+    private Long da15Num;
+    
+    /**
+    * 投手游戏第16天新用户人数
+    */    
+    @Column
+    private Long da16Num;
+    
+    /**
+    * 投手游戏第17天新用户人数
+    */    
+    @Column
+    private Long da17Num;
+    
+    /**
+    * 投手游戏第18天新用户人数
+    */    
+    @Column
+    private Long da18Num;
+    
+    /**
+    * 投手游戏第19天新用户人数
+    */    
+    @Column
+    private Long da19Num;
+    
+    /**
+    * 投手游戏第20天新用户人数
+    */    
+    @Column
+    private Long da20Num;
+    
+    /**
+    * 投手游戏第21天新用户人数
+    */    
+    @Column
+    private Long da21Num;
+    
+    /**
+    * 投手游戏第22天新用户人数
+    */    
+    @Column
+    private Long da22Num;
+    
+    /**
+    * 投手游戏第23天新用户人数
+    */    
+    @Column
+    private Long da23Num;
+    
+    /**
+    * 投手游戏第24天新用户人数
+    */    
+    @Column
+    private Long da24Num;
+    
+    /**
+    * 投手游戏第25天新用户人数
+    */    
+    @Column
+    private Long da25Num;
+    
+    /**
+    * 投手游戏第26天新用户人数
+    */    
+    @Column
+    private Long da26Num;
+    
+    /**
+    * 投手游戏第27天新用户人数
+    */    
+    @Column
+    private Long da27Num;
+    
+    /**
+    * 投手游戏第28天新用户人数
+    */    
+    @Column
+    private Long da28Num;
+    
+    /**
+    * 投手游戏第29天新用户人数
+    */    
+    @Column
+    private Long da29Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da30Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da31Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da32Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da33Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da34Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da35Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da36Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da37Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da38Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da39Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da40Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da41Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da42Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da43Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da44Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da45Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da46Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da47Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da48Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da49Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da50Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da51Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da52Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da53Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da54Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da55Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da56Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da57Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da58Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da59Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da60Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da61Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da62Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da63Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da64Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da65Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da66Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da67Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da68Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da69Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da70Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da71Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da72Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da73Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da74Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da75Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da76Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da77Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da78Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da79Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da80Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da81Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da82Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da83Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da84Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da85Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da86Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da87Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da88Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da89Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long da90Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long m4Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long m5Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long m6Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long m7Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long m8Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long m9Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long m10Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long m11Num;
+    
+    /**
+    * 投手游戏第N天新用户充值人数
+    */    
+    @Column
+    private Long m12Num;
+    
+    /**
+    * 至今充值人数
+    */    
+    @Column
+    private Long totalNum;
+    
+    /**
+    * 首日创角成本
+    */    
+    @Column
+    private BigDecimal firstRoleCost;
+    
+    /**
+    * 新用户累计创角成本
+    */    
+    @Column
+    private BigDecimal newUserTotalRoleCost;
+    
+    /**
+    * 创角成本
+    */    
+    @Column
+    private BigDecimal roleNumCost;
+    
+    /**
+    * 首日创角率
+    */    
+    @Column
+    private BigDecimal firstRoleRate;
+    
+    /**
+    * 新用户累计创角率
+    */    
+    @Column
+    private BigDecimal newUserTotalRoleRate;
+    
+    /**
+    * 创角率
+    */    
+    @Column
+    private BigDecimal roleNumRate;
+    
+    /**
+    * 新用户付费比
+    */    
+    @Column
+    private BigDecimal newUserAmountRatio;
+    
+}
+
+

+ 357 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/entity/AdsGameServerDayParent.java

@@ -0,0 +1,357 @@
+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.math.BigDecimal;
+import java.time.LocalDate;
+
+@Data
+@Table(AdsGameServerDayParent.TABLE_NAME)
+@PK({"dt", "sourceSystem", "serverId", "serverName", "parentGameId", "parentGameName"})
+public class AdsGameServerDayParent implements Serializable {
+    private static final long serialVersionUID = 1L;
+    public static final String TABLE_NAME = "game_ads_parent.ads_game_server_day_parent";
+     
+    /**
+    * 开服时间
+    */
+    private LocalDate dt;
+    
+    /**
+    * SDK来源
+    */
+    private String sourceSystem;
+    
+    /**
+    * 区服ID
+    */
+    private Long serverId;
+    
+    /**
+    * 区服名称
+    */
+    private String serverName;
+    
+    /**
+    * 游戏ID
+    */
+    private Long parentGameId;
+    
+    /**
+    * 游戏名称
+    */
+    private String parentGameName;
+    
+    /**
+    * 游戏类别
+    */    
+    @Column
+    private Long classify;
+    
+    /**
+    * 滚服人数
+    */    
+    @Column
+    private Long outTotalNum;
+    
+    /**
+    * 滚服付费人数
+    */    
+    @Column
+    private Long outTotalAmountNum;
+    
+    /**
+    * 滚服付费金额
+    */    
+    @Column
+    private BigDecimal outTotalAmount;
+    
+    /**
+    * 滚服付费占比
+    */    
+    @Column
+    private BigDecimal outTotalRate;
+    
+    /**
+    * 创角人数
+    */    
+    @Column
+    private Long totalRoleNum;
+    
+    /**
+    * 注册人数
+    */    
+    @Column
+    private Long totalRegNum;
+    
+    /**
+    * 付费人数
+    */    
+    @Column
+    private Long totalAmountNum;
+    
+    /**
+    * 付费金额
+    */    
+    @Column
+    private BigDecimal totalAmount;
+    
+    /**
+    * 区服第1天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da1;
+    
+    /**
+    * 区服在第2天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da2;
+    
+    /**
+    * 区服在第3天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da3;
+    
+    /**
+    * 区服在第4天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da4;
+    
+    /**
+    * 区服在第5天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da5;
+    
+    /**
+    * 区服在第6天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da6;
+    
+    /**
+    * 区服在第7天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da7;
+    
+    /**
+    * 区服在第8天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da8;
+    
+    /**
+    * 区服在第9天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da9;
+    
+    /**
+    * 区服在第10天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da10;
+    
+    /**
+    * 区服在第11天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da11;
+    
+    /**
+    * 区服在第12天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da12;
+    
+    /**
+    * 区服在第13天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da13;
+    
+    /**
+    * 区服在第14天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da14;
+    
+    /**
+    * 区服在第15天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da15;
+    
+    /**
+    * 区服在第16天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da16;
+    
+    /**
+    * 区服在第17天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da17;
+    
+    /**
+    * 区服在第18天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da18;
+    
+    /**
+    * 区服在第19天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da19;
+    
+    /**
+    * 区服在第20天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da20;
+    
+    /**
+    * 区服在第21天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da21;
+    
+    /**
+    * 区服在第22天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da22;
+    
+    /**
+    * 区服在第23天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da23;
+    
+    /**
+    * 区服在第24天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da24;
+    
+    /**
+    * 区服在第25天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da25;
+    
+    /**
+    * 区服在第26天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da26;
+    
+    /**
+    * 区服在第27天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da27;
+    
+    /**
+    * 区服在第28天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da28;
+    
+    /**
+    * 区服在第29天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da29;
+    
+    /**
+    * 区服在第30天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da30;
+    
+    /**
+    * 区服在第2月:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String m2;
+    
+    /**
+    * 区服在第3月:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String m3;
+    
+    /**
+    * 区服在第4月:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String m4;
+    
+    /**
+    * 区服在第5月:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String m5;
+    
+    /**
+    * 区服在第6月:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String m6;
+    
+    /**
+    * 区服在第7月:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String m7;
+    
+    /**
+    * 区服在第8月:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String m8;
+    
+    /**
+    * 区服在第9月:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String m9;
+    
+    /**
+    * 区服在第10月:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String m10;
+    
+    /**
+    * 区服在第11月:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String m11;
+    
+    /**
+    * 区服在第1年:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String y1;
+    
+    /**
+    * 区服至今:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String total;
+
+}
+
+

+ 368 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/entity/AdsGameServerSumDayParent.java

@@ -0,0 +1,368 @@
+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.math.BigDecimal;
+import java.time.LocalDate;
+
+@Data
+@Table(AdsGameServerSumDayParent.TABLE_NAME)
+@PK({"id"})
+public class AdsGameServerSumDayParent implements Serializable {
+    private static final long serialVersionUID = 1L;
+    public static final String TABLE_NAME = "game_ads_parent.ads_game_server_day_sum_parent";
+
+    /**
+     * 主键id
+     */
+    private String id;
+
+    /**
+    * 开服时间
+    */
+    @Column
+    private LocalDate dt;
+    
+    /**
+    * SDK来源
+    */
+    @Column
+    private String sourceSystem;
+    
+    /**
+    * 区服ID
+    */
+    @Column
+    private String serverId;
+    
+    /**
+    * 区服名称
+    */
+    @Column
+    private String serverName;
+    
+    /**
+    * 游戏ID
+    */
+    @Column
+    private Long parentGameId;
+    
+    /**
+    * 游戏名称
+    */
+    @Column
+    private String parentGameName;
+    
+    /**
+    * 游戏类别
+    */    
+    @Column
+    private Long parentGameClassify;
+    
+    /**
+    * 滚服人数
+    */    
+    @Column
+    private Long outTotalNum;
+    
+    /**
+    * 滚服付费人数
+    */    
+    @Column
+    private Long outTotalAmountNum;
+    
+    /**
+    * 滚服付费金额
+    */    
+    @Column
+    private BigDecimal outTotalAmount;
+    
+    /**
+    * 滚服付费占比
+    */    
+    @Column
+    private BigDecimal outTotalRate;
+    
+    /**
+    * 创角人数
+    */    
+    @Column
+    private Long totalRoleNum;
+    
+    /**
+    * 注册人数
+    */    
+    @Column
+    private Long totalRegNum;
+    
+    /**
+    * 付费人数
+    */    
+    @Column
+    private Long totalAmountNum;
+    
+    /**
+    * 付费金额
+    */    
+    @Column
+    private BigDecimal totalAmount;
+    
+    /**
+    * 区服第1天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da1;
+    
+    /**
+    * 区服在第2天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da2;
+    
+    /**
+    * 区服在第3天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da3;
+    
+    /**
+    * 区服在第4天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da4;
+    
+    /**
+    * 区服在第5天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da5;
+    
+    /**
+    * 区服在第6天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da6;
+    
+    /**
+    * 区服在第7天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da7;
+    
+    /**
+    * 区服在第8天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da8;
+    
+    /**
+    * 区服在第9天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da9;
+    
+    /**
+    * 区服在第10天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da10;
+    
+    /**
+    * 区服在第11天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da11;
+    
+    /**
+    * 区服在第12天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da12;
+    
+    /**
+    * 区服在第13天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da13;
+    
+    /**
+    * 区服在第14天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da14;
+    
+    /**
+    * 区服在第15天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da15;
+    
+    /**
+    * 区服在第16天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da16;
+    
+    /**
+    * 区服在第17天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da17;
+    
+    /**
+    * 区服在第18天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da18;
+    
+    /**
+    * 区服在第19天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da19;
+    
+    /**
+    * 区服在第20天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da20;
+    
+    /**
+    * 区服在第21天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da21;
+    
+    /**
+    * 区服在第22天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da22;
+    
+    /**
+    * 区服在第23天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da23;
+    
+    /**
+    * 区服在第24天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da24;
+    
+    /**
+    * 区服在第25天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da25;
+    
+    /**
+    * 区服在第26天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da26;
+    
+    /**
+    * 区服在第27天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da27;
+    
+    /**
+    * 区服在第28天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da28;
+    
+    /**
+    * 区服在第29天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da29;
+    
+    /**
+    * 区服在第30天:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String da30;
+    
+    /**
+    * 区服在第2月:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String m2;
+    
+    /**
+    * 区服在第3月:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String m3;
+    
+    /**
+    * 区服在第4月:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String m4;
+    
+    /**
+    * 区服在第5月:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String m5;
+    
+    /**
+    * 区服在第6月:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String m6;
+    
+    /**
+    * 区服在第7月:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String m7;
+    
+    /**
+    * 区服在第8月:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String m8;
+    
+    /**
+    * 区服在第9月:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String m9;
+    
+    /**
+    * 区服在第10月:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String m10;
+    
+    /**
+    * 区服在第11月:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String m11;
+    
+    /**
+    * 区服在第1年:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String y1;
+    
+    /**
+    * 区服至今:注册人数/创角人数/活跃人数/付费人数/付费金额/滚服人数/滚服付费人数/滚服付费金额/滚服付费占比
+    */    
+    @Column
+    private String total;
+
+}
+
+

+ 2378 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/entity/AdsPitcherAcctypeDayParent.java

@@ -0,0 +1,2378 @@
+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.math.BigDecimal;
+import java.time.LocalDate;
+
+/**
+ * 投手媒体数据表
+ */
+@Data
+@Table(AdsPitcherAcctypeDayParent.TABLE_NAME)
+@PK({"dt", "pitcherId", "accountType", "sourceSystem"})
+public class AdsPitcherAcctypeDayParent implements Serializable {
+    private static final long serialVersionUID = 1L;
+    public static final String TABLE_NAME = "game_ads_parent.ads_pitcher_acctype_day_parent";
+     
+    /**
+    * 日期(充值时间)
+    */
+    private LocalDate dt;
+    
+    /**
+    * SDK来源
+    */
+    private String sourceSystem;
+    
+    /**
+    * 投手ID
+    */
+    private Long pitcherId;
+    
+    /**
+    * 推广媒体
+    */
+    private String accountType;
+    
+    /**
+    * 投手
+    */    
+    @Column
+    private String pitcher;
+    
+    /**
+    * 消耗
+    */    
+    @Column
+    private BigDecimal cost;
+    
+    /**
+    * 推广计划数量
+    */    
+    @Column
+    private Long planCount;
+    
+    /**
+    * 推广账号数量
+    */    
+    @Column
+    private Long accountCount;
+    
+    /**
+    * 推广渠道数量
+    */    
+    @Column
+    private Long agentCount;
+    
+    /**
+    * 注册人数-通过广告首次登录小媒体的独立用户数
+    */    
+    @Column
+    private Long registerNum;
+    
+    /**
+    * 新增付费次数
+    */    
+    @Column
+    private Long firstNewUserAmountCount;
+    
+    /**
+    * 新增付费人数
+    */    
+    @Column
+    private Long firstNewUserAmountNum;
+    
+    /**
+    * 新增付费金额
+    */    
+    @Column
+    private BigDecimal firstNewUserAmount;
+    
+    /**
+    * 账面充值次数
+    */    
+    @Column
+    private Long amountCount;
+    
+    /**
+    * 账面充值人数
+    */    
+    @Column
+    private Long amountNum;
+    
+    /**
+    * 账面充值金额
+    */    
+    @Column
+    private BigDecimal amount;
+    
+    /**
+    * 老用户充值次数(每日)
+    */    
+    @Column
+    private Long oldAmountCount;
+    
+    /**
+    * 老用户充值人数(每日)
+    */    
+    @Column
+    private Long oldAmountNum;
+    
+    /**
+    * 老用户充值金额(每日)
+    */    
+    @Column
+    private BigDecimal oldAmount;
+    
+    /**
+    * 至今充值次数
+    */    
+    @Column
+    private Long newUserTotalAmountCount;
+    
+    /**
+    * 至今充值人数
+    */    
+    @Column
+    private Long newUserTotalAmountNum;
+    
+    /**
+    * 至今充值金额
+    */    
+    @Column
+    private BigDecimal newUserTotalAmount;
+    
+    /**
+    * 单日付费100+人数
+    */    
+    @Column
+    private Long hundredUserNum;
+    
+    /**
+    * 买量新用户累计充值金额
+    */    
+    @Column
+    private BigDecimal buyNewUserTotalAmount;
+    
+    /**
+    * 买量新用户累计充值人数
+    */    
+    @Column
+    private Long buyNewUserTotalAmountNum;
+    
+    /**
+    * 买量新用户累计充值次数
+    */    
+    @Column
+    private Long buyNewUserTotalAmountCount;
+    
+    /**
+    * 复充人数
+    */    
+    @Column
+    private Long regOrderUserAgain;
+    
+    /**
+    * 首日创角人数
+    */    
+    @Column
+    private Long firstRoleNum;
+    
+    /**
+    * 新用户累计创角人数
+    */    
+    @Column
+    private Long newUserTotalRoleNum;
+    
+    /**
+    * 创角人数
+    */    
+    @Column
+    private Long roleNum;
+    
+    /**
+    * 注册成本=实际消耗/注册人数
+    */    
+    @Column
+    private BigDecimal registerCost;
+    
+    /**
+    * 首日回收率
+    */    
+    @Column
+    private BigDecimal firstRoi;
+    
+    /**
+    * 买量回收率
+    */    
+    @Column
+    private BigDecimal buyRoi;
+    
+    /**
+    * 当日回收率
+    */    
+    @Column
+    private BigDecimal todayRoi;
+    
+    /**
+    * 毛利额,毛利=新用户-实际消耗
+    */    
+    @Column
+    private BigDecimal grossProfit;
+    
+    /**
+    * 首日付费率
+    */    
+    @Column
+    private BigDecimal firstRate;
+    
+    /**
+    * 买量用户付费率
+    */    
+    @Column
+    private BigDecimal buyUserRate;
+    
+    /**
+    * 当天付费率
+    */    
+    @Column
+    private BigDecimal todayRate;
+    
+    /**
+    * 首日客单价
+    */    
+    @Column
+    private BigDecimal firstAvg;
+    
+    /**
+    * 买量客单价
+    */    
+    @Column
+    private BigDecimal buyAvg;
+    
+    /**
+    * 当天客单价
+    */    
+    @Column
+    private BigDecimal todayAvg;
+    
+    /**
+    * 账面客单价
+    */    
+    @Column
+    private BigDecimal paperAvg;
+    
+    /**
+    * 首日充值成本
+    */    
+    @Column
+    private BigDecimal firstAmountCost;
+    
+    /**
+    * 买量充值成本
+    */    
+    @Column
+    private BigDecimal buyAmountCost;
+    
+    /**
+    * 当天充值成本
+    */    
+    @Column
+    private BigDecimal todayAmountCost;
+    
+    /**
+    * 当天复充率
+    */    
+    @Column
+    private BigDecimal todayAgainRate;
+    
+    /**
+    * 新增注册ARPU
+    */    
+    @Column
+    private BigDecimal newRegArpu;
+    
+    /**
+    * 首日付费ARPU
+    */    
+    @Column
+    private BigDecimal firstArpu;
+    
+    /**
+    * 当天付费ARPU
+    */    
+    @Column
+    private BigDecimal todayArpu;
+    
+    /**
+    * 账面arpu
+    */    
+    @Column
+    private BigDecimal paperArpu;
+    
+    /**
+    * 单日付费100+成本
+    */    
+    @Column
+    private BigDecimal hundredUserNumCost;
+    
+    /**
+    * 1日roi
+    */    
+    @Column
+    private BigDecimal roi1;
+    
+    /**
+    * 2日roi
+    */    
+    @Column
+    private BigDecimal roi2;
+    
+    /**
+    * 3日roi
+    */    
+    @Column
+    private BigDecimal roi3;
+    
+    /**
+    * 4日roi
+    */    
+    @Column
+    private BigDecimal roi4;
+    
+    /**
+    * 5日roi
+    */    
+    @Column
+    private BigDecimal roi5;
+    
+    /**
+    * 6日roi
+    */    
+    @Column
+    private BigDecimal roi6;
+    
+    /**
+    * 7日roi
+    */    
+    @Column
+    private BigDecimal roi7;
+    
+    /**
+    * 8日roi
+    */    
+    @Column
+    private BigDecimal roi8;
+    
+    /**
+    * 9日roi
+    */    
+    @Column
+    private BigDecimal roi9;
+    
+    /**
+    * 10日roi
+    */    
+    @Column
+    private BigDecimal roi10;
+    
+    /**
+    * 11日roi
+    */    
+    @Column
+    private BigDecimal roi11;
+    
+    /**
+    * 12日roi
+    */    
+    @Column
+    private BigDecimal roi12;
+    
+    /**
+    * 13日roi
+    */    
+    @Column
+    private BigDecimal roi13;
+    
+    /**
+    * 14日roi
+    */    
+    @Column
+    private BigDecimal roi14;
+    
+    /**
+    * 15日roi
+    */    
+    @Column
+    private BigDecimal roi15;
+    
+    /**
+    * 16日roi
+    */    
+    @Column
+    private BigDecimal roi16;
+    
+    /**
+    * 17日roi
+    */    
+    @Column
+    private BigDecimal roi17;
+    
+    /**
+    * 18日roi
+    */    
+    @Column
+    private BigDecimal roi18;
+    
+    /**
+    * 19日roi
+    */    
+    @Column
+    private BigDecimal roi19;
+    
+    /**
+    * 20日roi
+    */    
+    @Column
+    private BigDecimal roi20;
+    
+    /**
+    * 21日roi
+    */    
+    @Column
+    private BigDecimal roi21;
+    
+    /**
+    * 22日roi
+    */    
+    @Column
+    private BigDecimal roi22;
+    
+    /**
+    * 23日roi
+    */    
+    @Column
+    private BigDecimal roi23;
+    
+    /**
+    * 24日roi
+    */    
+    @Column
+    private BigDecimal roi24;
+    
+    /**
+    * 25日roi
+    */    
+    @Column
+    private BigDecimal roi25;
+    
+    /**
+    * 26日roi
+    */    
+    @Column
+    private BigDecimal roi26;
+    
+    /**
+    * 27日roi
+    */    
+    @Column
+    private BigDecimal roi27;
+    
+    /**
+    * 28日roi
+    */    
+    @Column
+    private BigDecimal roi28;
+    
+    /**
+    * 29日roi
+    */    
+    @Column
+    private BigDecimal roi29;
+    
+    /**
+    * 30日roi
+    */    
+    @Column
+    private BigDecimal roi30;
+    
+    /**
+    * 60日ROI
+    */    
+    @Column
+    private BigDecimal roi60;
+    
+    /**
+    * 90日ROI
+    */    
+    @Column
+    private BigDecimal roi90;
+    
+    /**
+    * 180日ROI
+    */    
+    @Column
+    private BigDecimal roi180;
+    
+    /**
+    * 1年ROI
+    */    
+    @Column
+    private BigDecimal roi1yaer;
+    
+    /**
+    * 总ROI
+    */    
+    @Column
+    private BigDecimal roiTotal;
+    
+    /**
+    * 付费趋势第1日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD1;
+    
+    /**
+    * 付费趋势第2日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD2;
+    
+    /**
+    * 付费趋势第3日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD3;
+    
+    /**
+    * 付费趋势第4日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD4;
+    
+    /**
+    * 付费趋势第5日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD5;
+    
+    /**
+    * 付费趋势第6日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD6;
+    
+    /**
+    * 付费趋势第7日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD7;
+    
+    /**
+    * 付费趋势第8日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD8;
+    
+    /**
+    * 付费趋势第9日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD9;
+    
+    /**
+    * 付费趋势第10日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD10;
+    
+    /**
+    * 付费趋势第11日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD11;
+    
+    /**
+    * 付费趋势第12日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD12;
+    
+    /**
+    * 付费趋势第13日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD13;
+    
+    /**
+    * 付费趋势第14日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD14;
+    
+    /**
+    * 付费趋势第15日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD15;
+    
+    /**
+    * 付费趋势第16日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD16;
+    
+    /**
+    * 付费趋势第17日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD17;
+    
+    /**
+    * 付费趋势第18日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD18;
+    
+    /**
+    * 付费趋势第19日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD19;
+    
+    /**
+    * 付费趋势第20日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD20;
+    
+    /**
+    * 付费趋势第21日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD21;
+    
+    /**
+    * 付费趋势第22日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD22;
+    
+    /**
+    * 付费趋势第23日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD23;
+    
+    /**
+    * 付费趋势第24日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD24;
+    
+    /**
+    * 付费趋势第25日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD25;
+    
+    /**
+    * 付费趋势第26日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD26;
+    
+    /**
+    * 付费趋势第27日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD27;
+    
+    /**
+    * 付费趋势第28日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD28;
+    
+    /**
+    * 付费趋势第29日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD29;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD30;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD31;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD32;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD33;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD34;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD35;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD36;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD37;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD38;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD39;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD40;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD41;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD42;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD43;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD44;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD45;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD46;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD47;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD48;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD49;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD50;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD51;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD52;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD53;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD54;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD55;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD56;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD57;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD58;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD59;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD60;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD61;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD62;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD63;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD64;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD65;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD66;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD67;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD68;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD69;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD70;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD71;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD72;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD73;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD74;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD75;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD76;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD77;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD78;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD79;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD80;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD81;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD82;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD83;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD84;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD85;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD86;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD87;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD88;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD89;
+    
+    /**
+    * 付费趋势第N日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD90;
+    
+    /**
+    * 付费趋势4六月总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountM4;
+    
+    /**
+    * 付费趋势5六月总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountM5;
+    
+    /**
+    * 付费趋势6六月总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountM6;
+    
+    /**
+    * 付费趋势7六月总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountM7;
+    
+    /**
+    * 付费趋势8六月总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountM8;
+    
+    /**
+    * 付费趋势9六月总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountM9;
+    
+    /**
+    * 付费趋势10六月总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountM10;
+    
+    /**
+    * 付费趋势11六月总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountM11;
+    
+    /**
+    * 付费趋势12六月总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountM12;
+    
+    /**
+    * 付费趋势总:增/回/倍
+    */    
+    @Column
+    private String amountSum;
+    
+    /**
+    * 投手媒体第1天新用户充值
+    */    
+    @Column
+    private BigDecimal da1;
+    
+    /**
+    * 投手媒体第2天新用户充值
+    */    
+    @Column
+    private BigDecimal da2;
+    
+    /**
+    * 投手媒体第3天新用户充值
+    */    
+    @Column
+    private BigDecimal da3;
+    
+    /**
+    * 投手媒体第4天新用户充值
+    */    
+    @Column
+    private BigDecimal da4;
+    
+    /**
+    * 投手媒体第5天新用户充值
+    */    
+    @Column
+    private BigDecimal da5;
+    
+    /**
+    * 投手媒体第6天新用户充值
+    */    
+    @Column
+    private BigDecimal da6;
+    
+    /**
+    * 投手媒体第7天新用户充值
+    */    
+    @Column
+    private BigDecimal da7;
+    
+    /**
+    * 投手媒体第8天新用户充值
+    */    
+    @Column
+    private BigDecimal da8;
+    
+    /**
+    * 投手媒体第9天新用户充值
+    */    
+    @Column
+    private BigDecimal da9;
+    
+    /**
+    * 投手媒体第10天新用户充值
+    */    
+    @Column
+    private BigDecimal da10;
+    
+    /**
+    * 投手媒体第11天新用户充值
+    */    
+    @Column
+    private BigDecimal da11;
+    
+    /**
+    * 投手媒体第12天新用户充值
+    */    
+    @Column
+    private BigDecimal da12;
+    
+    /**
+    * 投手媒体第13天新用户充值
+    */    
+    @Column
+    private BigDecimal da13;
+    
+    /**
+    * 投手媒体第14天新用户充值
+    */    
+    @Column
+    private BigDecimal da14;
+    
+    /**
+    * 投手媒体第15天新用户充值
+    */    
+    @Column
+    private BigDecimal da15;
+    
+    /**
+    * 投手媒体第16天新用户充值
+    */    
+    @Column
+    private BigDecimal da16;
+    
+    /**
+    * 投手媒体第17天新用户充值
+    */    
+    @Column
+    private BigDecimal da17;
+    
+    /**
+    * 投手媒体第18天新用户充值
+    */    
+    @Column
+    private BigDecimal da18;
+    
+    /**
+    * 投手媒体第19天新用户充值
+    */    
+    @Column
+    private BigDecimal da19;
+    
+    /**
+    * 投手媒体第20天新用户充值
+    */    
+    @Column
+    private BigDecimal da20;
+    
+    /**
+    * 投手媒体第21天新用户充值
+    */    
+    @Column
+    private BigDecimal da21;
+    
+    /**
+    * 投手媒体第22天新用户充值
+    */    
+    @Column
+    private BigDecimal da22;
+    
+    /**
+    * 投手媒体第23天新用户充值
+    */    
+    @Column
+    private BigDecimal da23;
+    
+    /**
+    * 投手媒体第24天新用户充值
+    */    
+    @Column
+    private BigDecimal da24;
+    
+    /**
+    * 投手媒体第25天新用户充值
+    */    
+    @Column
+    private BigDecimal da25;
+    
+    /**
+    * 投手媒体第26天新用户充值
+    */    
+    @Column
+    private BigDecimal da26;
+    
+    /**
+    * 投手媒体第27天新用户充值
+    */    
+    @Column
+    private BigDecimal da27;
+    
+    /**
+    * 投手媒体第28天新用户充值
+    */    
+    @Column
+    private BigDecimal da28;
+    
+    /**
+    * 投手媒体第29天新用户充值
+    */    
+    @Column
+    private BigDecimal da29;
+    
+    /**
+    * 投手媒体第30天新用户充值
+    */    
+    @Column
+    private BigDecimal da30;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da31;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da32;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da33;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da34;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da35;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da36;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da37;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da38;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da39;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da40;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da41;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da42;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da43;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da44;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da45;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da46;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da47;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da48;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da49;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da50;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da51;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da52;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da53;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da54;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da55;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da56;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da57;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da58;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da59;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da60;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da61;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da62;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da63;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da64;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da65;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da66;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da67;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da68;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da69;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da70;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da71;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da72;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da73;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da74;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da75;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da76;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da77;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da78;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da79;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da80;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da81;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da82;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da83;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da84;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da85;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da86;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da87;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da88;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da89;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal da90;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal m4;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal m5;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal m6;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal m7;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal m8;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal m9;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal m10;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal m11;
+    
+    /**
+    * 投手媒体第N天新用户充值
+    */    
+    @Column
+    private BigDecimal m12;
+    
+    /**
+    * 至今充值金额
+    */    
+    @Column
+    private BigDecimal total;
+    
+    /**
+    * 投手媒体第1天新用户人数
+    */    
+    @Column
+    private Long da1Num;
+    
+    /**
+    * 投手媒体第2天新用户人数
+    */    
+    @Column
+    private Long da2Num;
+    
+    /**
+    * 投手媒体第3天新用户人数
+    */    
+    @Column
+    private Long da3Num;
+    
+    /**
+    * 投手媒体第4天新用户人数
+    */    
+    @Column
+    private Long da4Num;
+    
+    /**
+    * 投手媒体第5天新用户人数
+    */    
+    @Column
+    private Long da5Num;
+    
+    /**
+    * 投手媒体第6天新用户人数
+    */    
+    @Column
+    private Long da6Num;
+    
+    /**
+    * 投手媒体第7天新用户人数
+    */    
+    @Column
+    private Long da7Num;
+    
+    /**
+    * 投手媒体第8天新用户人数
+    */    
+    @Column
+    private Long da8Num;
+    
+    /**
+    * 投手媒体第9天新用户人数
+    */    
+    @Column
+    private Long da9Num;
+    
+    /**
+    * 投手媒体第10天新用户人数
+    */    
+    @Column
+    private Long da10Num;
+    
+    /**
+    * 投手媒体第11天新用户人数
+    */    
+    @Column
+    private Long da11Num;
+    
+    /**
+    * 投手媒体第12天新用户人数
+    */    
+    @Column
+    private Long da12Num;
+    
+    /**
+    * 投手媒体第13天新用户人数
+    */    
+    @Column
+    private Long da13Num;
+    
+    /**
+    * 投手媒体第14天新用户人数
+    */    
+    @Column
+    private Long da14Num;
+    
+    /**
+    * 投手媒体第15天新用户人数
+    */    
+    @Column
+    private Long da15Num;
+    
+    /**
+    * 投手媒体第16天新用户人数
+    */    
+    @Column
+    private Long da16Num;
+    
+    /**
+    * 投手媒体第17天新用户人数
+    */    
+    @Column
+    private Long da17Num;
+    
+    /**
+    * 投手媒体第18天新用户人数
+    */    
+    @Column
+    private Long da18Num;
+    
+    /**
+    * 投手媒体第19天新用户人数
+    */    
+    @Column
+    private Long da19Num;
+    
+    /**
+    * 投手媒体第20天新用户人数
+    */    
+    @Column
+    private Long da20Num;
+    
+    /**
+    * 投手媒体第21天新用户人数
+    */    
+    @Column
+    private Long da21Num;
+    
+    /**
+    * 投手媒体第22天新用户人数
+    */    
+    @Column
+    private Long da22Num;
+    
+    /**
+    * 投手媒体第23天新用户人数
+    */    
+    @Column
+    private Long da23Num;
+    
+    /**
+    * 投手媒体第24天新用户人数
+    */    
+    @Column
+    private Long da24Num;
+    
+    /**
+    * 投手媒体第25天新用户人数
+    */    
+    @Column
+    private Long da25Num;
+    
+    /**
+    * 投手媒体第26天新用户人数
+    */    
+    @Column
+    private Long da26Num;
+    
+    /**
+    * 投手媒体第27天新用户人数
+    */    
+    @Column
+    private Long da27Num;
+    
+    /**
+    * 投手媒体第28天新用户人数
+    */    
+    @Column
+    private Long da28Num;
+    
+    /**
+    * 投手媒体第29天新用户人数
+    */    
+    @Column
+    private Long da29Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da30Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da31Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da32Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da33Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da34Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da35Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da36Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da37Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da38Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da39Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da40Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da41Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da42Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da43Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da44Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da45Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da46Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da47Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da48Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da49Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da50Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da51Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da52Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da53Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da54Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da55Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da56Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da57Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da58Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da59Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da60Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da61Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da62Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da63Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da64Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da65Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da66Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da67Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da68Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da69Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da70Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da71Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da72Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da73Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da74Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da75Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da76Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da77Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da78Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da79Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da80Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da81Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da82Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da83Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da84Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da85Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da86Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da87Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da88Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da89Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long da90Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long m4Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long m5Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long m6Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long m7Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long m8Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long m9Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long m10Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long m11Num;
+    
+    /**
+    * 投手媒体第N天新用户充值人数
+    */    
+    @Column
+    private Long m12Num;
+    
+    /**
+    * 至今充值人数
+    */    
+    @Column
+    private Long totalNum;
+    
+    /**
+    * 首日创角成本
+    */    
+    @Column
+    private BigDecimal firstRoleCost;
+    
+    /**
+    * 新用户累计创角成本
+    */    
+    @Column
+    private BigDecimal newUserTotalRoleCost;
+    
+    /**
+    * 创角成本
+    */    
+    @Column
+    private BigDecimal roleNumCost;
+    
+    /**
+    * 首日创角率
+    */    
+    @Column
+    private BigDecimal firstRoleRate;
+    
+    /**
+    * 新用户累计创角率
+    */    
+    @Column
+    private BigDecimal newUserTotalRoleRate;
+    
+    /**
+    * 创角率
+    */    
+    @Column
+    private BigDecimal roleNumRate;
+    
+    /**
+    * 新用户付费比
+    */    
+    @Column
+    private BigDecimal newUserAmountRatio;
+
+}
+
+

+ 1158 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/entity/AdsPitcherDayParent.java

@@ -0,0 +1,1158 @@
+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(AdsPitcherDayParent.TABLE_NAME)
+@PK({"dt", "sourceSystem", "pitcherId"})
+public class AdsPitcherDayParent implements Serializable {
+    private static final long serialVersionUID = 1L;
+    public static final String TABLE_NAME = "game_ads_parent.ads_pitcher_day_parent";
+     
+    /**
+    * 日期(充值时间)
+    */
+    private LocalDate dt;
+    
+    /**
+    * SDK来源
+    */
+    private String sourceSystem;
+    
+    /**
+    * 投手ID
+    */
+    private Long pitcherId;
+    
+    /**
+    * 投手
+    */    
+    @Column
+    private String pitcher;
+    
+    /**
+    * 消耗
+    */    
+    @Column
+    private Double cost;
+    
+    /**
+    * 推广计划数量
+    */    
+    @Column
+    private Long planCount;
+    
+    /**
+    * 推广账号数量
+    */    
+    @Column
+    private Long accountCount;
+    
+    /**
+    * 推广渠道数量
+    */    
+    @Column
+    private Long agentCount;
+    
+    /**
+    * 注册人数-通过广告首次登录小游戏的独立用户数
+    */    
+    @Column
+    private Long registerNum;
+    
+    /**
+    * 新增付费次数
+    */    
+    @Column
+    private Long firstNewUserAmountCount;
+    
+    /**
+    * 新增付费人数
+    */    
+    @Column
+    private Long firstNewUserAmountNum;
+    
+    /**
+    * 新增付费金额
+    */    
+    @Column
+    private Double firstNewUserAmount;
+    
+    /**
+    * 账面充值次数
+    */    
+    @Column
+    private Long amountCount;
+    
+    /**
+    * 账面充值人数
+    */    
+    @Column
+    private Long amountNum;
+    
+    /**
+    * 账面充值金额
+    */    
+    @Column
+    private Double amount;
+    
+    /**
+    * 老用户充值次数(每日)
+    */    
+    @Column
+    private Long oldAmountCount;
+    
+    /**
+    * 老用户充值人数(每日)
+    */    
+    @Column
+    private Long oldAmountNum;
+    
+    /**
+    * 老用户充值金额(每日)
+    */    
+    @Column
+    private Double oldAmount;
+    
+    /**
+    * 至今充值次数
+    */    
+    @Column
+    private Long newUserTotalAmountCount;
+    
+    /**
+    * 至今充值人数
+    */    
+    @Column
+    private Long newUserTotalAmountNum;
+    
+    /**
+    * 至今充值金额
+    */    
+    @Column
+    private Double newUserTotalAmount;
+    
+    /**
+    * 单日付费100+人数
+    */    
+    @Column
+    private Long hundredUserNum;
+    
+    /**
+    * 买量新用户累计充值金额
+    */    
+    @Column
+    private Double buyNewUserTotalAmount;
+    
+    /**
+    * 买量新用户累计充值人数
+    */    
+    @Column
+    private Long buyNewUserTotalAmountNum;
+    
+    /**
+    * 买量新用户累计充值次数
+    */    
+    @Column
+    private Long buyNewUserTotalAmountCount;
+    
+    /**
+    * 复充人数
+    */    
+    @Column
+    private Long regOrderUserAgain;
+    
+    /**
+    * 首日创角人数
+    */    
+    @Column
+    private Long firstRoleNum;
+    
+    /**
+    * 新用户累计创角人数
+    */    
+    @Column
+    private Long newUserTotalRoleNum;
+    
+    /**
+    * 创角人数
+    */    
+    @Column
+    private Long roleNum;
+    
+    /**
+    * 注册成本=实际消耗/注册人数
+    */    
+    @Column
+    private Double registerCost;
+    
+    /**
+    * 首日回收率
+    */    
+    @Column
+    private Double firstRoi;
+    
+    /**
+    * 买量回收率
+    */    
+    @Column
+    private Double buyRoi;
+    
+    /**
+    * 当日回收率
+    */    
+    @Column
+    private Double todayRoi;
+    
+    /**
+    * 毛利额,毛利=新用户-实际消耗
+    */    
+    @Column
+    private Double grossProfit;
+    
+    /**
+    * 首日付费率
+    */    
+    @Column
+    private Double firstRate;
+    
+    /**
+    * 买量用户付费率
+    */    
+    @Column
+    private Double buyUserRate;
+    
+    /**
+    * 当天付费率
+    */    
+    @Column
+    private Double todayRate;
+    
+    /**
+    * 首日客单价
+    */    
+    @Column
+    private Double firstAvg;
+    
+    /**
+    * 买量客单价
+    */    
+    @Column
+    private Double buyAvg;
+    
+    /**
+    * 当天客单价
+    */    
+    @Column
+    private Double todayAvg;
+    
+    /**
+    * 账面客单价
+    */    
+    @Column
+    private Double paperAvg;
+    
+    /**
+    * 首日充值成本
+    */    
+    @Column
+    private Double firstAmountCost;
+    
+    /**
+    * 买量充值成本
+    */    
+    @Column
+    private Double buyAmountCost;
+    
+    /**
+    * 当天充值成本
+    */    
+    @Column
+    private Double todayAmountCost;
+    
+    /**
+    * 当天复充率
+    */    
+    @Column
+    private Double todayAgainRate;
+    
+    /**
+    * 新增注册ARPU
+    */    
+    @Column
+    private Double newRegArpu;
+    
+    /**
+    * 首日付费ARPU
+    */    
+    @Column
+    private Double firstArpu;
+    
+    /**
+    * 当天付费ARPU
+    */    
+    @Column
+    private Double todayArpu;
+    
+    /**
+    * 账面arpu
+    */    
+    @Column
+    private Double paperArpu;
+    
+    /**
+    * 单日付费100+成本
+    */    
+    @Column
+    private Double hundredUserNumCost;
+    
+    /**
+    * 1日roi
+    */    
+    @Column
+    private Double roi1;
+    
+    /**
+    * 2日roi
+    */    
+    @Column
+    private Double roi2;
+    
+    /**
+    * 3日roi
+    */    
+    @Column
+    private Double roi3;
+    
+    /**
+    * 4日roi
+    */    
+    @Column
+    private Double roi4;
+    
+    /**
+    * 5日roi
+    */    
+    @Column
+    private Double roi5;
+    
+    /**
+    * 6日roi
+    */    
+    @Column
+    private Double roi6;
+    
+    /**
+    * 7日roi
+    */    
+    @Column
+    private Double roi7;
+    
+    /**
+    * 8日roi
+    */    
+    @Column
+    private Double roi8;
+    
+    /**
+    * 9日roi
+    */    
+    @Column
+    private Double roi9;
+    
+    /**
+    * 10日roi
+    */    
+    @Column
+    private Double roi10;
+    
+    /**
+    * 11日roi
+    */    
+    @Column
+    private Double roi11;
+    
+    /**
+    * 12日roi
+    */    
+    @Column
+    private Double roi12;
+    
+    /**
+    * 13日roi
+    */    
+    @Column
+    private Double roi13;
+    
+    /**
+    * 14日roi
+    */    
+    @Column
+    private Double roi14;
+    
+    /**
+    * 15日roi
+    */    
+    @Column
+    private Double roi15;
+    
+    /**
+    * 16日roi
+    */    
+    @Column
+    private Double roi16;
+    
+    /**
+    * 17日roi
+    */    
+    @Column
+    private Double roi17;
+    
+    /**
+    * 18日roi
+    */    
+    @Column
+    private Double roi18;
+    
+    /**
+    * 19日roi
+    */    
+    @Column
+    private Double roi19;
+    
+    /**
+    * 20日roi
+    */    
+    @Column
+    private Double roi20;
+    
+    /**
+    * 21日roi
+    */    
+    @Column
+    private Double roi21;
+    
+    /**
+    * 22日roi
+    */    
+    @Column
+    private Double roi22;
+    
+    /**
+    * 23日roi
+    */    
+    @Column
+    private Double roi23;
+    
+    /**
+    * 24日roi
+    */    
+    @Column
+    private Double roi24;
+    
+    /**
+    * 25日roi
+    */    
+    @Column
+    private Double roi25;
+    
+    /**
+    * 26日roi
+    */    
+    @Column
+    private Double roi26;
+    
+    /**
+    * 27日roi
+    */    
+    @Column
+    private Double roi27;
+    
+    /**
+    * 28日roi
+    */    
+    @Column
+    private Double roi28;
+    
+    /**
+    * 29日roi
+    */    
+    @Column
+    private Double roi29;
+    
+    /**
+    * 30日roi
+    */    
+    @Column
+    private Double roi30;
+    
+    /**
+    * 60日ROI
+    */    
+    @Column
+    private Double roi60;
+    
+    /**
+    * 90日ROI
+    */    
+    @Column
+    private Double roi90;
+    
+    /**
+    * 180日ROI
+    */    
+    @Column
+    private Double roi180;
+    
+    /**
+    * 1年ROI
+    */    
+    @Column
+    private Double roi1yaer;
+    
+    /**
+    * 总ROI
+    */    
+    @Column
+    private Double roiTotal;
+    
+    /**
+    * 付费趋势第1日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD1;
+    
+    /**
+    * 付费趋势第2日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD2;
+    
+    /**
+    * 付费趋势第3日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD3;
+    
+    /**
+    * 付费趋势第4日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD4;
+    
+    /**
+    * 付费趋势第5日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD5;
+    
+    /**
+    * 付费趋势第6日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD6;
+    
+    /**
+    * 付费趋势第7日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD7;
+    
+    /**
+    * 付费趋势第8日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD8;
+    
+    /**
+    * 付费趋势第9日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD9;
+    
+    /**
+    * 付费趋势第10日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD10;
+    
+    /**
+    * 付费趋势第11日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD11;
+    
+    /**
+    * 付费趋势第12日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD12;
+    
+    /**
+    * 付费趋势第13日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD13;
+    
+    /**
+    * 付费趋势第14日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD14;
+    
+    /**
+    * 付费趋势第15日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD15;
+    
+    /**
+    * 付费趋势第16日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD16;
+    
+    /**
+    * 付费趋势第17日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD17;
+    
+    /**
+    * 付费趋势第18日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD18;
+    
+    /**
+    * 付费趋势第19日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD19;
+    
+    /**
+    * 付费趋势第20日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD20;
+    
+    /**
+    * 付费趋势第21日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD21;
+    
+    /**
+    * 付费趋势第22日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD22;
+    
+    /**
+    * 付费趋势第23日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD23;
+    
+    /**
+    * 付费趋势第24日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD24;
+    
+    /**
+    * 付费趋势第25日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD25;
+    
+    /**
+    * 付费趋势第26日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD26;
+    
+    /**
+    * 付费趋势第27日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD27;
+    
+    /**
+    * 付费趋势第28日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD28;
+    
+    /**
+    * 付费趋势第29日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountD29;
+    
+    /**
+    * 付费趋势第30日总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountM1;
+    
+    /**
+    * 付费趋势第二月总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountM2;
+    
+    /**
+    * 付费趋势第三月总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountM3;
+    
+    /**
+    * 付费趋势六月总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountM6;
+    
+    /**
+    * 付费趋势一年总:金额/人数/增/回/倍
+    */    
+    @Column
+    private String amountY1;
+    
+    /**
+    * 付费趋势总:增/回/倍
+    */    
+    @Column
+    private String amountSum;
+    
+    /**
+    * 投手游戏第1天新用户充值
+    */    
+    @Column
+    private Double da1;
+    
+    /**
+    * 投手游戏第2天新用户充值
+    */    
+    @Column
+    private Double da2;
+    
+    /**
+    * 投手游戏第3天新用户充值
+    */    
+    @Column
+    private Double da3;
+    
+    /**
+    * 投手游戏第4天新用户充值
+    */    
+    @Column
+    private Double da4;
+    
+    /**
+    * 投手游戏第5天新用户充值
+    */    
+    @Column
+    private Double da5;
+    
+    /**
+    * 投手游戏第6天新用户充值
+    */    
+    @Column
+    private Double da6;
+    
+    /**
+    * 投手游戏第7天新用户充值
+    */    
+    @Column
+    private Double da7;
+    
+    /**
+    * 投手游戏第8天新用户充值
+    */    
+    @Column
+    private Double da8;
+    
+    /**
+    * 投手游戏第9天新用户充值
+    */    
+    @Column
+    private Double da9;
+    
+    /**
+    * 投手游戏第10天新用户充值
+    */    
+    @Column
+    private Double da10;
+    
+    /**
+    * 投手游戏第11天新用户充值
+    */    
+    @Column
+    private Double da11;
+    
+    /**
+    * 投手游戏第12天新用户充值
+    */    
+    @Column
+    private Double da12;
+    
+    /**
+    * 投手游戏第13天新用户充值
+    */    
+    @Column
+    private Double da13;
+    
+    /**
+    * 投手游戏第14天新用户充值
+    */    
+    @Column
+    private Double da14;
+    
+    /**
+    * 投手游戏第15天新用户充值
+    */    
+    @Column
+    private Double da15;
+    
+    /**
+    * 投手游戏第16天新用户充值
+    */    
+    @Column
+    private Double da16;
+    
+    /**
+    * 投手游戏第17天新用户充值
+    */    
+    @Column
+    private Double da17;
+    
+    /**
+    * 投手游戏第18天新用户充值
+    */    
+    @Column
+    private Double da18;
+    
+    /**
+    * 投手游戏第19天新用户充值
+    */    
+    @Column
+    private Double da19;
+    
+    /**
+    * 投手游戏第20天新用户充值
+    */    
+    @Column
+    private Double da20;
+    
+    /**
+    * 投手游戏第21天新用户充值
+    */    
+    @Column
+    private Double da21;
+    
+    /**
+    * 投手游戏第22天新用户充值
+    */    
+    @Column
+    private Double da22;
+    
+    /**
+    * 投手游戏第23天新用户充值
+    */    
+    @Column
+    private Double da23;
+    
+    /**
+    * 投手游戏第24天新用户充值
+    */    
+    @Column
+    private Double da24;
+    
+    /**
+    * 投手游戏第25天新用户充值
+    */    
+    @Column
+    private Double da25;
+    
+    /**
+    * 投手游戏第26天新用户充值
+    */    
+    @Column
+    private Double da26;
+    
+    /**
+    * 投手游戏第27天新用户充值
+    */    
+    @Column
+    private Double da27;
+    
+    /**
+    * 投手游戏第28天新用户充值
+    */    
+    @Column
+    private Double da28;
+    
+    /**
+    * 投手游戏第29天新用户充值
+    */    
+    @Column
+    private Double da29;
+    
+    /**
+    * 投手游戏第30天新用户充值
+    */    
+    @Column
+    private Double da30;
+    
+    /**
+    * 投手游戏第2月新用户充值
+    */    
+    @Column
+    private Double m2;
+    
+    /**
+    * 投手游戏第3月新用户充值
+    */    
+    @Column
+    private Double m3;
+    
+    /**
+    * 投手游戏第6月新用户充值
+    */    
+    @Column
+    private Double m6;
+    
+    /**
+    * 投手游戏第1年新用户充值
+    */    
+    @Column
+    private Double y1;
+    
+    /**
+    * 至今充值金额
+    */    
+    @Column
+    private Double total;
+    
+    /**
+    * 投手游戏第1天新用户人数
+    */    
+    @Column
+    private Long da1Num;
+    
+    /**
+    * 投手游戏第2天新用户人数
+    */    
+    @Column
+    private Long da2Num;
+    
+    /**
+    * 投手游戏第3天新用户人数
+    */    
+    @Column
+    private Long da3Num;
+    
+    /**
+    * 投手游戏第4天新用户人数
+    */    
+    @Column
+    private Long da4Num;
+    
+    /**
+    * 投手游戏第5天新用户人数
+    */    
+    @Column
+    private Long da5Num;
+    
+    /**
+    * 投手游戏第6天新用户人数
+    */    
+    @Column
+    private Long da6Num;
+    
+    /**
+    * 投手游戏第7天新用户人数
+    */    
+    @Column
+    private Long da7Num;
+    
+    /**
+    * 投手游戏第8天新用户人数
+    */    
+    @Column
+    private Long da8Num;
+    
+    /**
+    * 投手游戏第9天新用户人数
+    */    
+    @Column
+    private Long da9Num;
+    
+    /**
+    * 投手游戏第10天新用户人数
+    */    
+    @Column
+    private Long da10Num;
+    
+    /**
+    * 投手游戏第11天新用户人数
+    */    
+    @Column
+    private Long da11Num;
+    
+    /**
+    * 投手游戏第12天新用户人数
+    */    
+    @Column
+    private Long da12Num;
+    
+    /**
+    * 投手游戏第13天新用户人数
+    */    
+    @Column
+    private Long da13Num;
+    
+    /**
+    * 投手游戏第14天新用户人数
+    */    
+    @Column
+    private Long da14Num;
+    
+    /**
+    * 投手游戏第15天新用户人数
+    */    
+    @Column
+    private Long da15Num;
+    
+    /**
+    * 投手游戏第16天新用户人数
+    */    
+    @Column
+    private Long da16Num;
+    
+    /**
+    * 投手游戏第17天新用户人数
+    */    
+    @Column
+    private Long da17Num;
+    
+    /**
+    * 投手游戏第18天新用户人数
+    */    
+    @Column
+    private Long da18Num;
+    
+    /**
+    * 投手游戏第19天新用户人数
+    */    
+    @Column
+    private Long da19Num;
+    
+    /**
+    * 投手游戏第20天新用户人数
+    */    
+    @Column
+    private Long da20Num;
+    
+    /**
+    * 投手游戏第21天新用户人数
+    */    
+    @Column
+    private Long da21Num;
+    
+    /**
+    * 投手游戏第22天新用户人数
+    */    
+    @Column
+    private Long da22Num;
+    
+    /**
+    * 投手游戏第23天新用户人数
+    */    
+    @Column
+    private Long da23Num;
+    
+    /**
+    * 投手游戏第24天新用户人数
+    */    
+    @Column
+    private Long da24Num;
+    
+    /**
+    * 投手游戏第25天新用户人数
+    */    
+    @Column
+    private Long da25Num;
+    
+    /**
+    * 投手游戏第26天新用户人数
+    */    
+    @Column
+    private Long da26Num;
+    
+    /**
+    * 投手游戏第27天新用户人数
+    */    
+    @Column
+    private Long da27Num;
+    
+    /**
+    * 投手游戏第28天新用户人数
+    */    
+    @Column
+    private Long da28Num;
+    
+    /**
+    * 投手游戏第29天新用户人数
+    */    
+    @Column
+    private Long da29Num;
+    
+    /**
+    * 投手游戏第30天新用户人数
+    */    
+    @Column
+    private Long da30Num;
+    
+    /**
+    * 投手游戏第2月新用户人数
+    */    
+    @Column
+    private Long m2Num;
+    
+    /**
+    * 投手游戏第3月新用户人数
+    */    
+    @Column
+    private Long m3Num;
+    
+    /**
+    * 投手游戏第6月新用户人数
+    */    
+    @Column
+    private Long m6Num;
+    
+    /**
+    * 投手游戏第1年新用户人数
+    */    
+    @Column
+    private Long y1Num;
+    
+    /**
+    * 至今充值人数
+    */    
+    @Column
+    private Long totalNum;
+    
+
+}
+
+

+ 277 - 23
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/AccountAgentDayServiceImpl.java

@@ -6,6 +6,7 @@ import com.google.gson.Gson;
 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;
+import com.zanxiang.game.data.serve.pojo.entity.AdsAccountAgentDayParent;
 import com.zanxiang.game.data.serve.pojo.entity.AdsAgentDayAgain;
 import com.zanxiang.game.data.serve.pojo.enums.OrderByEnum;
 import com.zanxiang.game.data.serve.pojo.vo.*;
@@ -18,6 +19,7 @@ import lombok.Builder;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.nutz.dao.Cnd;
 import org.nutz.dao.Dao;
@@ -30,7 +32,6 @@ import org.nutz.dao.util.Daos;
 import org.nutz.dao.util.cri.SimpleCriteria;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import org.springframework.util.CollectionUtils;
 
 import java.lang.reflect.Method;
 import java.math.BigDecimal;
@@ -52,21 +53,32 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
     @Override
     public Page<GamePromoteDayVO> accountAgentDay(GamePromoteDayDTO dto) {
         Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo(dto.getSourceSystem());
-        List<Long> userIds = dto.getSysUserId() == null ? poerInfo.first : Collections.singletonList(dto.getSysUserId());
-        List<Long> gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
+        List<Long> userIds = StringUtils.isBlank(dto.getSysUserId()) ? poerInfo.first : List.of(Long.valueOf(dto.getSysUserId()));
+        List<Long> gameIds = CollectionUtils.isEmpty(dto.getGameId()) ? poerInfo.second : dto.getGameId();
 
-        /*Long sysUserId = SecurityUtil.isAdmin() ? null : SecurityUtil.getUserId();
-        sysUserId = null == dto.getSysUserId() ? sysUserId : dto.getSysUserId();
-        dto.setSysUserId(sysUserId);*/
         if (null == dto.getBeginDay() || null == dto.getEndDay()) {
             dto.setBeginDay(LocalDate.now());
             dto.setEndDay(LocalDate.now());
         }
+        if (dto.getGameDimension() == null) {
+            //默认查询子游戏维度
+            dto.setGameDimension(1L);
+        }
+        String gameColumn = "game_id";
+        String gameNameColumn = "game_name";
+        String gameTypeColumn = "game_type";
+        Class<?> clazz = AdsAccountAgentDay.class;
+        if (dto.getGameDimension() == 2L) {
+            gameColumn = "parent_game_id";
+            gameNameColumn = "parent_game_name";
+            gameTypeColumn = "parent_game_type";
+            clazz = AdsAccountAgentDayParent.class;
+        }
         Pager pager = dao.createPager(dto.getPageNum(), dto.getPageSize());
         // 创建一个 Criteria 接口实例
         SimpleCriteria cri = Cnd.cri();
         // 组装条件
-        if (userIds != null) {
+        if (CollectionUtils.isNotEmpty(userIds)) {
             cri.where().andInList("pitcher_id", userIds);
         }
         if (StringUtils.isNotBlank(dto.getAccountId())) {
@@ -82,13 +94,13 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
             cri.where().andLike("game_cp", dto.getCpName());
         }
         if (StringUtils.isNotBlank(dto.getGameName())) {
-            cri.where().andLike("game_name", dto.getGameName());
+            cri.where().andLike(gameNameColumn, dto.getGameName());
         }
-        if (gameIds != null) {
-            cri.where().andInList("game_id", gameIds);
+        if (CollectionUtils.isNotEmpty(gameIds)) {
+            cri.where().andInList(gameColumn, gameIds);
         }
         if (StringUtils.isNotBlank(dto.getGameType())) {
-            cri.where().andEquals("game_type", dto.getGameType());
+            cri.where().andEquals(gameTypeColumn, dto.getGameType());
         }
         if (null != dto.getBeginDay()) {
             cri.where().and("dt", ">=", dto.getBeginDay());
@@ -108,12 +120,17 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
         } else {
             cri.orderBy(CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, dto.getSortFiled()), dto.getSortType());
         }
-        Sql sql = Sqls.queryEntity(accountAgentDaySql() + "$condition");
+        Sql sql;
+        if (dto.getGameDimension() == 1L) {
+            sql = Sqls.queryEntity(accountAgentDaySql() + "$condition");
+        } else {
+            sql = Sqls.queryEntity(accountAgentDaySqlForParent() + "$condition");
+        }
         sql.setPager(pager);
         Entity<GamePromoteDayVO> entity = dao.getEntity(GamePromoteDayVO.class);
         sql.setEntity(entity).setCondition(cri);
         dao.execute(sql);
-        pager.setRecordCount(dao.count(AdsAccountAgentDay.class, cri));
+        pager.setRecordCount(dao.count(clazz, cri));
         List<GamePromoteDayVO> collect = sql.getList(GamePromoteDayVO.class).stream().map(item -> {
             setDayRechargeTrend(item);
             return item;
@@ -247,20 +264,29 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
     @Override
     public GamePromoteDayTotalVO accountAgentDayTotal(GamePromoteDayTotalDTO dto) {
         Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo(dto.getSourceSystem());
-        List<Long> userIds = dto.getSysUserId() == null ? poerInfo.first : Collections.singletonList(dto.getSysUserId());
-        List<Long> gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
+        List<Long> userIds = StringUtils.isBlank(dto.getSysUserId()) ? poerInfo.first : List.of(Long.valueOf(dto.getSysUserId()));
+        List<Long> gameIds = CollectionUtils.isEmpty(dto.getGameId()) ? poerInfo.second : dto.getGameId();
 
-        /*Long sysUserId = SecurityUtil.isAdmin() ? null : SecurityUtil.getUserId();
-        sysUserId = null == dto.getSysUserId() ? sysUserId : dto.getSysUserId();
-        dto.setSysUserId(sysUserId);*/
         if (null == dto.getBeginDay() || null == dto.getEndDay()) {
             dto.setBeginDay(LocalDate.now());
             dto.setEndDay(LocalDate.now());
         }
+        if (dto.getGameDimension() == null) {
+            //默认查询子游戏维度
+            dto.setGameDimension(1L);
+        }
+        String gameColumn = "game_id";
+        String gameNameColumn = "game_name";
+        String gameTypeColumn = "game_type";
+        if (dto.getGameDimension() == 2L) {
+            gameColumn = "parent_game_id";
+            gameNameColumn = "parent_game_name";
+            gameTypeColumn = "parent_game_type";
+        }
         // 创建一个 Criteria 接口实例
         SimpleCriteria cri = Cnd.cri();
         // 组装条件
-        if (null != userIds) {
+        if (CollectionUtils.isNotEmpty(userIds)) {
             cri.where().andInList("pitcher_id", userIds);
         }
         if (StringUtils.isNotBlank(dto.getAccountId())) {
@@ -276,13 +302,13 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
             cri.where().andLike("game_cp", dto.getCpName());
         }
         if (StringUtils.isNotBlank(dto.getGameName())) {
-            cri.where().andLike("game_name", dto.getGameName());
+            cri.where().andLike(gameNameColumn, dto.getGameName());
         }
         if (StringUtils.isNotBlank(dto.getGameType())) {
-            cri.where().andEquals("game_type", dto.getGameType());
+            cri.where().andEquals(gameTypeColumn, dto.getGameType());
         }
-        if (gameIds != null) {
-            cri.where().andInList("game_id", gameIds);
+        if (CollectionUtils.isNotEmpty(gameIds)) {
+            cri.where().andInList(gameColumn, gameIds);
         }
         if (null != dto.getBeginDay()) {
             cri.where().and("dt", ">=", dto.getBeginDay());
@@ -1468,6 +1494,234 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
                 """;
     }
 
+    /**
+     * 推广每日数据SQL- 父游戏维度
+     *
+     * @return
+     */
+    private String accountAgentDaySqlForParent() {
+        return """
+                select
+                    dt,
+                	concat( dt, account_id, agent_id ) AS id,
+                	source_system,
+                	agent_id,
+                	agent_name,
+                	account_type,
+                	account_id,
+                	agent_id,
+                	pitcher AS sys_user_name,
+                	game_cp AS cp_name,
+                	parent_game_id as game_id,
+                	parent_game_name as game_name,
+                	parent_game_type as game_type,
+                	dt AS cost_day,
+                	pitcher_id AS sys_user_id,
+                	cost,
+                	plan_count AS ad_plan_count,
+                	view_count,
+                	click_count,
+                	change_count AS convert_count,
+                	change_rate AS convert_rate,
+                	avg_change_price AS avg_convert_cost,
+                	depth_change_count AS deep_convert_count,
+                	depth_change_rate AS deep_convert_rate,
+                	avg_depth_change_price AS deep_convert_cost,
+                	thousand_display_price AS thousand_view_cost,
+                	click_rate,
+                	avg_click_price AS avg_click_cost,
+                	download_start AS app_download_count,
+                	download_start_cost AS app_download_cost,
+                	download_start_rate AS app_download_rate,
+                	download_finish,
+                	download_finish_cost,
+                	download_finish_rate,
+                	install_finish AS app_install_count,
+                	install_finish_cost AS app_install_cost,
+                	install_finish_rate AS app_install_rate,
+                	active AS app_active_count,
+                	active_cost AS app_active_cost,
+                	active_rate AS app_active_rate,
+                	register_num AS reg_user_count,
+                	register_cost AS reg_cost,
+                	first_new_user_amount_count AS first_user_recharge_count,
+                	first_new_user_amount_num AS first_user_recharge_user,
+                	first_new_user_amount AS first_user_recharge_money,
+                	amount_count AS show_recharge_count,
+                	amount_num AS show_recharge_user,
+                	amount AS show_recharge_money,
+                	old_amount_count AS old_user_recharge_count,
+                	old_amount_num AS old_user_recharge_user,
+                	old_amount AS old_user_recharge_money,
+                	new_user_total_amount_count AS new_user_recharge_count,
+                	new_user_total_amount_num AS new_user_recharge_user,
+                	new_user_total_amount AS new_user_recharge_money,
+                	today_roi AS today_recovery_rate,
+                	first_roi AS first_recovery_rate,
+                	buy_roi AS buy_recovery_rate,
+                	gross_profit AS gross_margin,
+                        roi1 AS roi_day1,
+                        roi2 AS roi_day2,
+                        roi3 AS roi_day3,
+                        roi4 AS roi_day4,
+                        roi5 AS roi_day5,
+                        roi6 AS roi_day6,
+                        roi7 AS roi_day7,
+                        roi8 AS roi_day8,
+                        roi9 AS roi_day9,
+                        roi10 AS roi_day10,
+                        roi11 AS roi_day11,
+                        roi12 AS roi_day12,
+                        roi13 AS roi_day13,
+                        roi14 AS roi_day14,
+                        roi15 AS roi_day15,
+                        roi16 AS roi_day16,
+                        roi17 AS roi_day17,
+                        roi18 AS roi_day18,
+                        roi19 AS roi_day19,
+                        roi20 AS roi_day20,
+                        roi21 AS roi_day21,
+                        roi22 AS roi_day22,
+                        roi23 AS roi_day23,
+                        roi24 AS roi_day24,
+                        roi25 AS roi_day25,
+                        roi26 AS roi_day26,
+                        roi27 AS roi_day27,
+                        roi28 AS roi_day28,
+                        roi29 AS roi_day29,
+                        roi30 AS roi_day30,
+                        roi60 AS roi_day60,
+                        roi90 AS roi_day90,
+                        roi180 AS roi_day180,
+                        roi1yaer AS roi_year1,
+                        roi_total AS roi_total,
+                	first_rate AS first_recharge_rate,
+                	buy_user_rate AS buy_user_recharge_rate,
+                	today_rate AS new_user_recharge_rate,
+                	first_avg AS avg_first_user_recharge,
+                	buy_avg AS avg_buy_user_recharge,
+                	paper_avg AS avg_show_user_recharge,
+                	first_amount_cost AS first_recharge_cost,
+                	buy_amount_cost AS buy_user_recharge_cost,
+                	today_again_rate AS repeat_recharge_rate,
+                	new_reg_arpu,
+                	first_arpu AS first_recharge_arpu,
+                	today_arpu AS today_recharge_arpu,
+                	paper_arpu AS show_recharge_arpu,
+                       amount_d1 AS trend_day1,
+                       amount_d2 AS trend_day2,
+                       amount_d3 AS trend_day3,
+                       amount_d4 AS trend_day4,
+                       amount_d5 AS trend_day5,
+                       amount_d6 AS trend_day6,
+                       amount_d7 AS trend_day7,
+                       amount_d8 AS trend_day8,
+                       amount_d9 AS trend_day9,
+                       amount_d10 AS trend_day10,
+                       amount_d11 AS trend_day11,
+                       amount_d12 AS trend_day12,
+                       amount_d13 AS trend_day13,
+                       amount_d14 AS trend_day14,
+                       amount_d15 AS trend_day15,
+                       amount_d16 AS trend_day16,
+                       amount_d17 AS trend_day17,
+                       amount_d18 AS trend_day18,
+                       amount_d19 AS trend_day19,
+                       amount_d20 AS trend_day20,
+                       amount_d21 AS trend_day21,
+                       amount_d22 AS trend_day22,
+                       amount_d23 AS trend_day23,
+                       amount_d24 AS trend_day24,
+                       amount_d25 AS trend_day25,
+                       amount_d26 AS trend_day26,
+                       amount_d27 AS trend_day27,
+                       amount_d28 AS trend_day28,
+                       amount_d29 AS trend_day29,
+                       amount_d30 AS trend_day30,
+                       amount_d31 AS trend_day31,
+                       amount_d32 AS trend_day32,
+                       amount_d33 AS trend_day33,
+                       amount_d34 AS trend_day34,
+                       amount_d35 AS trend_day35,
+                       amount_d36 AS trend_day36,
+                       amount_d37 AS trend_day37,
+                       amount_d38 AS trend_day38,
+                       amount_d39 AS trend_day39,
+                       amount_d40 AS trend_day40,
+                       amount_d41 AS trend_day41,
+                       amount_d42 AS trend_day42,
+                       amount_d43 AS trend_day43,
+                       amount_d44 AS trend_day44,
+                       amount_d45 AS trend_day45,
+                       amount_d46 AS trend_day46,
+                       amount_d47 AS trend_day47,
+                       amount_d48 AS trend_day48,
+                       amount_d49 AS trend_day49,
+                       amount_d50 AS trend_day50,
+                       amount_d51 AS trend_day51,
+                       amount_d52 AS trend_day52,
+                       amount_d53 AS trend_day53,
+                       amount_d54 AS trend_day54,
+                       amount_d55 AS trend_day55,
+                       amount_d56 AS trend_day56,
+                       amount_d57 AS trend_day57,
+                       amount_d58 AS trend_day58,
+                       amount_d59 AS trend_day59,
+                       amount_d60 AS trend_day60,
+                       amount_d61 AS trend_day61,
+                       amount_d62 AS trend_day62,
+                       amount_d63 AS trend_day63,
+                       amount_d64 AS trend_day64,
+                       amount_d65 AS trend_day65,
+                       amount_d66 AS trend_day66,
+                       amount_d67 AS trend_day67,
+                       amount_d68 AS trend_day68,
+                       amount_d69 AS trend_day69,
+                       amount_d70 AS trend_day70,
+                       amount_d71 AS trend_day71,
+                       amount_d72 AS trend_day72,
+                       amount_d73 AS trend_day73,
+                       amount_d74 AS trend_day74,
+                       amount_d75 AS trend_day75,
+                       amount_d76 AS trend_day76,
+                       amount_d77 AS trend_day77,
+                       amount_d78 AS trend_day78,
+                       amount_d79 AS trend_day79,
+                       amount_d80 AS trend_day80,
+                       amount_d81 AS trend_day81,
+                       amount_d82 AS trend_day82,
+                       amount_d83 AS trend_day83,
+                       amount_d84 AS trend_day84,
+                       amount_d85 AS trend_day85,
+                       amount_d86 AS trend_day86,
+                       amount_d87 AS trend_day87,
+                       amount_d88 AS trend_day88,
+                       amount_d89 AS trend_day89,
+                       amount_d90 AS trend_day90,
+                       amount_m4 AS trend_month4,
+                       amount_m5 AS trend_month5,
+                       amount_m6 AS trend_month6,
+                       amount_m7 AS trend_month7,
+                       amount_m8 AS trend_month8,
+                       amount_m9 AS trend_month9,
+                       amount_m10 AS trend_month10,
+                       amount_m11 AS trend_month11,
+                       amount_m12 AS trend_month12,
+                       amount_sum AS trend_total,
+                	round(if(first_new_user_amount_count > 0, cost / first_new_user_amount_count, 0), 4) as first_recharge_count_cost,
+                	round(if(old_amount_count > 0, cost / old_amount_count, 0), 4) as old_user_recharge_count_cost,
+                	round(if(amount_count > 0, cost / amount_count, 0), 4) as show_recharge_count_cost,
+                	round(if(new_user_total_amount_count > 0, cost / new_user_total_amount_count, 0), 4) as new_user_recharge_count_cost,
+                	hundred_user_num,
+                	hundred_user_num_cost,
+                	first_role_num,
+                	new_user_total_role_num,
+                	role_num
+                from
+                	game_ads_parent.ads_account_agent_day_parent
+                """;
+    }
+
     /**
      * 推广每日数据总计SQL
      *

+ 568 - 66
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/GameDataServiceImpl.java

@@ -258,7 +258,7 @@ public class GameDataServiceImpl implements IGameDataService {
         } else {
             cri.getOrderBy().orderBy(CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, dto.getSortFiled()), dto.getSortType());
         }
-        //编写sql语句 拼接查询条件
+        //编写sql语句 拼接查询条件1
         Sql sql = Sqls.create(gameDataDayForSonSql(dto.getTableTypes()) + cri);
         //设置自定义回显对象
         sql.setCallback(Sqls.callback.entities());
@@ -626,7 +626,12 @@ public class GameDataServiceImpl implements IGameDataService {
     @Override
     public Page<GameDataTotalVO> getGameDataTotal(GameDataTotalDTO dto) {
         com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo(dto.getSourceSystem());
-        List<Long> gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
+        List<Long> gameIds = CollectionUtils.isEmpty(dto.getGameId()) ? poerInfo.second : dto.getGameId();
+
+        if (dto.getGameDimension() == null) {
+            //默认查询子游戏维度
+            dto.setGameDimension(1L);
+        }
         //如果注册时间参数为空,默认设置查询当天数据
         if (dto.getRegisteredBeginDate() == null || dto.getRegisteredEndDate() == null) {
             dto.setRegisteredBeginDate(LocalDate.now());
@@ -662,7 +667,12 @@ public class GameDataServiceImpl implements IGameDataService {
         }
         orderByCri.getOrderBy().orderBy(CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, dto.getSortFiled()), dto.getSortType());
         //创建sql语句 执行sql
-        Sql sql = Sqls.create(getGameDataTotalSql(dto.getTableTypes(), criA, criB, criAmount, criNewUser, criRoleNum) + orderByCri);
+        Sql sql;
+        if (dto.getGameDimension() == 1L) {
+            sql = Sqls.create(getGameDataTotalSql(dto.getTableTypes(), criA, criB, criAmount, criNewUser, criRoleNum) + orderByCri);
+        } else {
+            sql = Sqls.create(getGameDataTotalSqlForParent(dto.getTableTypes(), criA, criB, criAmount, criNewUser, criRoleNum) + orderByCri);
+        }
         //设置自定义回显对象
         sql.setCallback(Sqls.callback.entities());
         sql.setEntity(dao.getEntity(GameDataTotalVO.class));
@@ -673,16 +683,30 @@ public class GameDataServiceImpl implements IGameDataService {
         //得到结果集list
         List<GameDataTotalVO> list = sql.getList(GameDataTotalVO.class);
         //设置查询总数
-        Sql sqlCount = Sqls.queryEntity("select count(*) from ads_game_day" + criA);
+        Sql sqlCount;
+        if (dto.getGameDimension() == 1L) {
+            sqlCount = Sqls.queryEntity("select count(*) from ads_game_day" + criA);
+        } else {
+            sqlCount = Sqls.queryEntity("select count(*) from game_ads_parent.ads_game_day_parent" + criA);
+        }
         pager.setRecordCount((int) Daos.queryCount(dao, sqlCount));
 
         //不同类型的数据查询不同的dayN表
         Map<String, DayN> dayNMap;
-        switch (dto.getTableTypes()) {
-            case "buy" -> dayNMap = tempDayNData(dto, "ads_dayn_game_buy");
-            case "nature" -> dayNMap = tempDayNData(dto, "ads_dayn_game_nature");
-            case "total" -> dayNMap = tempDayNData(dto, "ads_dayn_game");
-            default -> dayNMap = tempDayNData(dto, "ads_dayn_game");
+        if (dto.getGameDimension() == 1L) {
+            switch (dto.getTableTypes()) {
+                case "buy" -> dayNMap = tempDayNData(dto, "ads_dayn_game_buy");
+                case "nature" -> dayNMap = tempDayNData(dto, "ads_dayn_game_nature");
+                case "total" -> dayNMap = tempDayNData(dto, "ads_dayn_game");
+                default -> dayNMap = tempDayNData(dto, "ads_dayn_game");
+            }
+        } else {
+            switch (dto.getTableTypes()) {
+                case "buy" -> dayNMap = tempDayNData(dto, "game_ads_parent.ads_dayn_game_buy_parent");
+                case "nature" -> dayNMap = tempDayNData(dto, "game_ads_parent.ads_dayn_game_nature_parent");
+                case "total" -> dayNMap = tempDayNData(dto, "game_ads_parent.ads_dayn_game_parent");
+                default -> dayNMap = tempDayNData(dto, "game_ads_parent.ads_dayn_game_parent");
+            }
         }
 
         //根据充值时间修改值
@@ -748,7 +772,16 @@ public class GameDataServiceImpl implements IGameDataService {
      */
     public GameDataTotalTotalVO getGameDataTotalTotal(GameDataTotalTotalDTO dto) {
         com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo(dto.getSourceSystem());
-        List<Long> gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
+        List<Long> gameIds = CollectionUtils.isEmpty(dto.getGameId()) ? poerInfo.second : dto.getGameId();
+
+        if (dto.getGameDimension() == null) {
+            //默认查询子游戏维度
+            dto.setGameDimension(1L);
+        }
+        String tableName = "game_ads.ads_game_day";
+        if (dto.getGameDimension() == 2L){
+            tableName = "game_ads_parent.ads_game_day_parent";
+        }
         //如果注册时间参数为空,默认设置查询当天数据
         if (dto.getRegisteredBeginDate() == null || dto.getRegisteredEndDate() == null) {
             dto.setRegisteredBeginDate(LocalDate.now());
@@ -777,7 +810,7 @@ public class GameDataServiceImpl implements IGameDataService {
         //创角人数查询条件
         Criteria criRoleNum = myCriRole(gameIds, totalDTO);
         //创建sql语句 执行sql
-        Sql sql = Sqls.create(gameDataTotalTotalSql(dto.getTableTypes()) + criA);
+        Sql sql = Sqls.create(gameDataTotalTotalSql(dto.getTableTypes(), tableName) + criA);
         //设置自定义回显对象
         sql.setCallback(Sqls.callback.entity());
         sql.setEntity(dao.getEntity(GameDataTotalTotalVO.class));
@@ -786,7 +819,7 @@ public class GameDataServiceImpl implements IGameDataService {
         //得到含有部分总数据总计结果的GameDataTotalTotalVO
         GameDataTotalTotalVO vo = sql.getObject(GameDataTotalTotalVO.class);
         //处理账面、新用户充值人数、新用户复充人数、创角人数相关数据
-        GameDataTotalTotalVO tempVO = getGameDataTotalSumAmountData(dto.getTableTypes(), criB, criAmount, criNewUser, criRoleNum);
+        GameDataTotalTotalVO tempVO = getGameDataTotalSumAmountData(dto, criB, criAmount, criNewUser, criRoleNum);
         //将两个处理的对象合并
         copyNullProperties(tempVO, vo);
         //得到dayN相关数据
@@ -801,19 +834,24 @@ public class GameDataServiceImpl implements IGameDataService {
      *
      * @return PitcherDataTotalSumVO
      */
-    private GameDataTotalTotalVO getGameDataTotalSumAmountData(String tableType, Criteria criB, Criteria criAmount, Criteria criNewUser, Criteria criRoleNum) {
+    private GameDataTotalTotalVO getGameDataTotalSumAmountData(GameDataTotalTotalDTO dto, Criteria criB, Criteria criAmount, Criteria criNewUser, Criteria criRoleNum) {
         //不同类型的数据需要额外添加条件
-        if ("buy".equals(tableType)) {
+        if ("buy".equals(dto.getTableTypes())) {
             criAmount.where().andNotEquals("agent_id", 0);
             criNewUser.where().andNotEquals("agent_id", 0);
             criRoleNum.where().andNotEquals("user_agent_id", 0);
-        } else if ("nature".equals(tableType)) {
+        } else if ("nature".equals(dto.getTableTypes())) {
             criAmount.where().andEquals("agent_id", 0);
             criNewUser.where().andEquals("agent_id", 0);
             criRoleNum.where().andEquals("user_agent_id", 0);
         }
+        //默认查询的表-子游戏维度
+        String tableName = "game_ads.ads_game_day";
+        if (dto.getGameDimension() == 2L) {
+            tableName = "game_ads_parent.ads_game_day_parent";
+        }
         //得到账面相关数据
-        Sql sqlAmountData = Sqls.create(gameDataTotalSumAmountSql(tableType) + criB);
+        Sql sqlAmountData = Sqls.create(gameDataTotalSumAmountSql(dto.getTableTypes(), tableName) + criB);
         //设置回传对象
         sqlAmountData.setCallback(Sqls.callback.entity());
         sqlAmountData.setEntity(dao.getEntity(GameDataTotalTotalVO.class));
@@ -906,19 +944,29 @@ public class GameDataServiceImpl implements IGameDataService {
         dayNMap.put("rechargeBeginDate", dto.getRechargeBeginDate());
         dayNMap.put("rechargeEndDate", dto.getRechargeEndDate());
         dayNMap.put("gameId", dto.getGameId());
+        dayNMap.put("gameDimension", dto.getGameDimension());
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
             dayNMap.put("sourceSystem", dto.getSourceSystem());
         }
 
         //得到dayN数据
         DayN dayN;
-        switch (dto.getTableTypes()) {
-            case "buy" -> dayN = getDayNByTableName(dayNMap, "ads_dayn_game_buy");
-            case "nature" -> dayN = getDayNByTableName(dayNMap, "ads_dayn_game_nature");
-            case "total" -> dayN = getDayNByTableName(dayNMap, "ads_dayn_game");
-            default -> dayN = getDayNByTableName(dayNMap, "ads_dayn_game");
+        if (dto.getGameDimension() == 1L) {
+            switch (dto.getTableTypes()) {
+                case "buy" -> dayN = getDayNByTableName(dayNMap, "ads_dayn_game_buy");
+                case "nature" -> dayN = getDayNByTableName(dayNMap, "ads_dayn_game_nature");
+                case "total" -> dayN = getDayNByTableName(dayNMap, "ads_dayn_game");
+                default -> dayN = getDayNByTableName(dayNMap, "ads_dayn_game");
+            }
+        } else {
+            //父游戏维度
+            switch (dto.getTableTypes()) {
+                case "buy" -> dayN = getDayNByTableName(dayNMap, "game_ads_parent.ads_dayn_game_buy_parent");
+                case "nature" -> dayN = getDayNByTableName(dayNMap, "game_ads_parent.ads_dayn_game_nature_parent");
+                case "total" -> dayN = getDayNByTableName(dayNMap, "game_ads_parent.ads_dayn_game_parent");
+                default -> dayN = getDayNByTableName(dayNMap, "game_ads_parent.ads_dayn_game_parent");
+            }
         }
-
         //设置总量数据
         //新用户充值次数、金额
         vo.setNewUserAmount(dayN == null ? BigDecimal.ZERO : dayN.getRechargeMoney());
@@ -968,7 +1016,7 @@ public class GameDataServiceImpl implements IGameDataService {
     @Override
     public Page<GameDataWaterVO> getGameDataWater(GameDataWaterDTO dto) {
         com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
-        List<Long> userGameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
+        List<Long> userGameIds = CollectionUtils.isEmpty(dto.getGameId()) ? poerInfo.second : dto.getGameId();
 
         if (dto.getGameDimension() == null) {
             //默认查询子游戏维度
@@ -1040,7 +1088,12 @@ public class GameDataServiceImpl implements IGameDataService {
         SimpleCriteria templateCri = Cnd.cri();
         templateCri.where().and("dt", "=", dto.getRechargeDate());
         templateCri.where().andInList(gameColumn, gameIds);
-        Sql templateSql = Sqls.queryEntity(waterTemplateSql() + "$condition");
+        Sql templateSql;
+        if (dto.getGameDimension() == 1L) {
+            templateSql = Sqls.queryEntity(waterTemplateSql() + "$condition");
+        } else {
+            templateSql = Sqls.queryEntity(waterTemplateSqlForParent() + "$condition");
+        }
         Entity<AdsEverydayWater> everydayWaterEntity = dao.getEntity(AdsEverydayWater.class);
         templateSql.setEntity(everydayWaterEntity).setCondition(templateCri);
         dao.execute(templateSql);
@@ -1249,23 +1302,28 @@ public class GameDataServiceImpl implements IGameDataService {
      * @return Map
      */
     private Map<String, DayN> tempDayNData(GameDataTotalDTO dto, String tableName) {
-
+        String gameColumn = "game_id";
+        if (dto.getGameDimension() == 2L){
+            gameColumn = "parent_game_id";
+        }
         //创建查询条件
         Criteria cri = Cnd.cri();
         if (dto.getRegisteredBeginDate() != null && dto.getRegisteredEndDate() != null) {
             //拼接注册时间查询条件
             cri.where().andBetween("dt", dto.getRegisteredBeginDate(), dto.getRegisteredEndDate());
         }
-        if (dto.getGameId() != null) {
+        if (CollectionUtils.isNotEmpty(dto.getGameId())) {
             //拼接游戏ID查询条件
-            cri.where().andEquals("game_id", dto.getGameId());
+            cri.where().andInList(gameColumn, dto.getGameId());
         }
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
             //拼接SDK来源查询条件
             cri.where().andEquals("source_system", dto.getSourceSystem());
         }
 
-        Sql dayNSql = Sqls.create("""
+        Sql dayNSql;
+        if (dto.getGameDimension() == 1L) {
+            dayNSql = Sqls.create("""
                 SELECT
                     dt,
                     game_id,
@@ -1274,7 +1332,17 @@ public class GameDataServiceImpl implements IGameDataService {
                 FROM
                     $tableName
                 """ + cri);
-
+        } else {
+            dayNSql = Sqls.create("""
+                SELECT
+                    dt,
+                    parent_game_id as game_id,
+                    source_system,
+                    dayN as day_n
+                FROM
+                    $tableName
+                """ + cri);
+        }
         //给定查询的表名
         dayNSql.vars().set("tableName", tableName);
         //设置回传
@@ -1364,31 +1432,40 @@ public class GameDataServiceImpl implements IGameDataService {
      * @return 查询条件
      */
     private Criteria myCri(List<Long> gameIds, GameDataTotalDTO dto, String type, Boolean needGroupBy) {
+        String gameColumn = "game_id";
+        String gameNameColumn = "game_name";
+        String classifyColumn = "game_classify";
+        if (dto.getGameDimension() == 2L) {
+            gameColumn = "parent_game_id";
+            gameNameColumn = "parent_game_name";
+            classifyColumn = "parent_game_name_classify";
+        }
+
         //根据传入的dto拼接查询参数
         Criteria cri = Cnd.cri();
         if (StringUtils.isNotBlank(dto.getGameName())) {
             //拼接游戏名称查询条件
-            cri.where().andEquals("game_name", dto.getGameName());
+            cri.where().andEquals(gameNameColumn, dto.getGameName());
         }
-        if (gameIds != null) {
+        if (CollectionUtils.isNotEmpty(gameIds)) {
             //拼接游戏id查询条件
-            cri.where().andInList("game_id", gameIds);
+            cri.where().andInList(gameColumn, gameIds);
         }
         if (dto.getGameClassify() != null) {
             //拼接游戏类型查询条件
-            cri.where().andEquals("game_classify", dto.getGameClassify());
+            cri.where().andEquals(classifyColumn, dto.getGameClassify());
         }
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
             //拼接SDK来源
             cri.where().andEquals("source_system", dto.getSourceSystem());
         }
         //根据type拼接不同的时间查询条件
-        if (type.equals("criA")) {
+        if ("criA".equals(type)) {
             if (dto.getRegisteredBeginDate() != null && dto.getRegisteredEndDate() != null) {
                 //拼接注册日期查询条件
                 cri.where().andBetween("dt", dto.getRegisteredBeginDate(), dto.getRegisteredEndDate());
             }
-        } else if (type.equals("criB")) {
+        } else if ("criB".equals(type)) {
             if (dto.getRechargeBeginDate() != null && dto.getRechargeEndDate() != null) {
                 //拼接充值日期查询条件
                 cri.where().andBetween("dt", dto.getRechargeBeginDate(), dto.getRechargeEndDate());
@@ -1396,7 +1473,7 @@ public class GameDataServiceImpl implements IGameDataService {
         }
         if (needGroupBy) {
             //拼接分组条件
-            cri.getGroupBy().groupBy("game_id", "game_classify", "source_system");
+            cri.getGroupBy().groupBy(gameColumn, classifyColumn, "source_system");
         }
 
         return cri;
@@ -1410,15 +1487,22 @@ public class GameDataServiceImpl implements IGameDataService {
      * @return 查询条件
      */
     private Criteria myCriRecharge(List<Long> gameIds, GameDataTotalDTO dto, Boolean needRegTime) {
+        String gameColumn = "game_id";
+        String classifyColumn = "classify";
+        if (dto.getGameDimension() == 2L) {
+            gameColumn = "parent_game_id";
+            classifyColumn = "parent_game_classify";
+        }
+
         //根据传入的dto拼接查询参数
         Criteria cri = Cnd.cri();
-        if (gameIds != null) {
+        if (CollectionUtils.isNotEmpty(gameIds)) {
             //拼接游戏id查询条件
-            cri.where().andInList("game_id", gameIds);
+            cri.where().andInList(gameColumn, gameIds);
         }
         if (dto.getGameClassify() != null) {
             //拼接游戏类型查询条件
-            cri.where().andEquals("classify", dto.getGameClassify());
+            cri.where().andEquals(classifyColumn, dto.getGameClassify());
         }
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
             //拼接SDK来源
@@ -1444,11 +1528,15 @@ public class GameDataServiceImpl implements IGameDataService {
      * @return 查询条件
      */
     private Criteria myCriRole(List<Long> gameIds, GameDataTotalDTO dto) {
+        String gameColumn = "user_game_id";
+        if (dto.getGameDimension() == 2L) {
+            gameColumn = "parent_game_id";
+        }
         //根据传入的dto拼接查询参数
         Criteria cri = Cnd.cri();
-        if (gameIds != null) {
+        if (CollectionUtils.isNotEmpty(gameIds)) {
             //拼接游戏id查询条件
-            cri.where().andInList("user_game_id", gameIds);
+            cri.where().andInList(gameColumn, gameIds);
         }
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
             //拼接SDK来源
@@ -1511,6 +1599,8 @@ public class GameDataServiceImpl implements IGameDataService {
      * @return DayN数据
      */
     private DayN getDayNByTableName(Map<String, Object> dayNMap, String tableName) {
+        //查询的游戏维度
+        Long gameDimension = (Long) dayNMap.get("gameDimension");
 
         //创建查询条件
         Criteria cri = Cnd.cri();
@@ -1518,9 +1608,14 @@ public class GameDataServiceImpl implements IGameDataService {
             //拼接注册时间查询条件
             cri.where().andBetween("dt", dayNMap.get("registerBeginDate"), dayNMap.get("registerEndDate"));
         }
-        if (dayNMap.get("gameId") != null) {
-            //拼接游戏ID查询条件
-            cri.where().andEquals("game_id", dayNMap.get("gameId"));
+        if (CollectionUtils.isNotEmpty((List<?>)dayNMap.get("gameId"))) {
+            if (gameDimension == 1L) {
+                // 子游戏维度
+                cri.where().andInList("game_id", (List<Long>) dayNMap.get("gameId"));
+            } else {
+                // 父游戏维度
+                cri.where().andInList("parent_game_id", (List<Long>) dayNMap.get("gameId"));
+            }
         }
         if (dayNMap.get("sourceSystem") != null) {
             //拼接SDK来源查询条件
@@ -3760,13 +3855,403 @@ public class GameDataServiceImpl implements IGameDataService {
                 """;
     }
 
+    /**
+     * 游戏总数据SQL-父游戏维度
+     *
+     * @param tableType 查询类型
+     * @param criA       主表查询条件
+     * @param criB       账面相关查询条件
+     * @param criAmount  账面充值人数查询条件
+     * @param criNewUser 新用户相关查询条件
+     * @param criRoleNum 创角人数相关查询条件
+     * @return String
+     */
+    private String getGameDataTotalSqlForParent(String tableType, Criteria criA, Criteria criB, Criteria criAmount, Criteria criNewUser, Criteria criRoleNum) {
+        if ("buy".equals(tableType)) {
+            return """
+                    SELECT
+                        a.*,
+                        IFNULL(amount_count, 0) amount_count,
+                        IFNULL(amount, 0) amount,
+                        IFNULL(avg_amount, 0) avg_amount,
+                        IFNULL(new_user_amount_num, 0) new_user_amount_num,
+                        IFNULL(new_user_again_num, 0) new_user_again_num,
+                        IFNULL(amount_num, 0) amount_num,
+                        IFNULL(role_num, 0) role_num
+                    FROM(
+                        SELECT
+                            source_system,
+                            parent_game_id as game_id,
+                            MAX(parent_game_name) as game_name,
+                            parent_game_name_classify as game_classify,
+                            sum(buy_reg_num) reg_num,
+                            sum(cost) cost,
+                            sum(buy_first_new_user_amount_count) first_new_user_amount_count,
+                            sum(buy_first_new_user_amount_num) first_new_user_amount_num,
+                            sum(buy_first_new_user_amount) first_new_user_amount,
+                            sum(buy_new_user_total_amount_count) new_user_total_amount_count,
+                            sum(buy_new_user_total_amount_num) new_user_total_amount_num,
+                            sum(buy_new_user_total_amount) new_user_total_amount,
+                            round(if(SUM(cost) > 0 , SUM(buy_first_new_user_amount) / SUM(cost) , 0), 4) first_roi,
+                            round(if(sum(buy_reg_num) > 0 , sum(buy_first_new_user_amount_num) / sum(buy_reg_num), 0), 4) first_amount_rate,
+                            round(if(sum(buy_reg_num) > 0, sum(buy_new_user_total_amount_num) / sum(buy_reg_num), 0), 4) today_amount_rate,
+                            round(if(sum(buy_first_new_user_amount_count) > 0, sum(buy_first_new_user_amount) / sum(buy_first_new_user_amount_count), 0), 2) first_avg_amount,
+                            round(if(sum(buy_new_user_total_amount_count) > 0, sum(buy_new_user_total_amount) / sum(buy_new_user_total_amount_count), 0), 2) today_avg_amount,
+                            round(if(sum(buy_new_user_total_amount_num) > 0 , sum(buy_reg_order_user_again) / sum(buy_new_user_total_amount_num), 0), 4) today_again_rate,
+                            round(if(sum(buy_reg_num) > 0 , sum(buy_new_user_total_amount) / sum(buy_reg_num), 0), 2) reg_user_arpu,
+                            round(if(sum(buy_first_new_user_amount_num) > 0 , sum(buy_first_new_user_amount) / sum(buy_first_new_user_amount_num), 0), 2) first_amount_arpu,
+                            round(if(sum(buy_new_user_total_amount_num) > 0 , sum(buy_new_user_total_amount) / sum(buy_new_user_total_amount_num), 0), 2) today_amount_arpu,
+                            round(if(SUM(buy_reg_num) > 0, SUM(cost) / SUM(buy_reg_num), 0), 2) reg_cost,
+                            round(if(SUM(cost) > 0 , SUM(buy_new_user_total_amount) / SUM(cost), 0), 4) total_roi,
+                            round(if(SUM(buy_first_new_user_amount_num) > 0, SUM(cost) / SUM(buy_first_new_user_amount_num), 0), 2) first_new_user_recharge_cost,
+                            round(if(SUM(buy_new_user_total_amount_num) > 0, SUM(cost) / SUM(buy_new_user_total_amount_num), 0), 2) total_recharge_cost,
+                            IFNULL(SUM(buy_hundred_user_num), 0) hundred_user_num,
+                            round(IF(SUM(buy_hundred_user_num) > 0, SUM(cost) / SUM(buy_hundred_user_num), 0), 2) hundred_user_num_cost,
+                            IFNULL(SUM(buy_first_role_num), 0) first_role_num,
+                            IFNULL(SUM(buy_new_user_total_role_num), 0) new_user_total_role_num,
+                            round(IF(SUM(buy_first_role_num) > 0, SUM(cost) / SUM(buy_first_role_num), 0), 2) first_role_num_cost,
+                            round(IF(SUM(buy_new_user_total_role_num) >0, SUM(cost) / SUM(buy_new_user_total_role_num), 0), 2) new_user_total_role_num_cost,
+                            round(IF(SUM(buy_reg_num) >0, SUM(buy_first_role_num) / SUM(buy_reg_num), 0), 4) first_role_num_rate,
+                            round(IF(SUM(buy_reg_num) >0, SUM(buy_new_user_total_role_num) / SUM(buy_reg_num), 0), 4) new_user_total_role_num_rate
+                        FROM
+                            game_ads_parent.ads_game_day_parent
+                    """ + criA +
+                    """
+                         ) a
+                    LEFT JOIN (
+                        SELECT
+                            source_system as b_source_system,
+                            parent_game_id as b_game_id,
+                            MAX(parent_game_name) as b_game_name,
+                            IFNULL(sum(buy_amount_count), 0) amount_count,
+                            IFNULL(sum(buy_amount), 0) amount,
+                            round(if(sum(buy_amount_count) > 0, sum(buy_amount) / sum(buy_amount_count), 0), 2) avg_amount
+                        FROM
+                            game_ads_parent.ads_game_day_parent
+                    """ + criB +
+                    """
+                        ) b
+                    ON a.game_id = b.b_game_id and a.game_name = b.b_game_name and a.source_system = b.b_source_system
+                    LEFT JOIN(
+                        SELECT
+                            source_system as d_source_system,
+                            parent_game_id as d_game_id,
+                            IFNULL(COUNT(DISTINCT user_id), 0) amount_num
+                        FROM
+                            game_ads.ads_information
+                    """ + criAmount +
+                    """
+                            AND NOT agent_id = 0
+                        GROUP BY parent_game_id, source_system) d
+                    ON a.game_id = d.d_game_id and a.source_system = d.d_source_system
+                    LEFT JOIN (
+                        SELECT
+                            source_system as f_source_system,
+                            parent_game_id as f_game_id,
+                            COUNT(DISTINCT user_id) new_user_amount_num
+                        FROM
+                            game_ads.ads_information
+                    """ + criNewUser +
+                    """
+                            AND NOT agent_id = 0
+                        GROUP BY parent_game_id, source_system) f
+                    ON a.game_id = f.f_game_id and a.source_system = f.f_source_system
+                    LEFT JOIN(
+                        SELECT
+                            source_system as g_source_system,
+                            parent_game_id as g_game_id,
+                            COUNT(tempA.num) as new_user_again_num
+                        FROM (
+                                SELECT
+                                    source_system,
+                                    parent_game_id,
+                                    COUNT(user_id) num
+                                FROM
+                                    game_ads.ads_information
+                    """ + criNewUser +
+                    """
+                                    AND NOT agent_id = 0
+                                GROUP BY
+                                    user_id,
+                                    parent_game_id,
+                                    source_system
+                                HAVING
+                                    COUNT(user_id) > 1 ) tempA
+                        GROUP BY tempA.parent_game_id, tempA.source_system) g
+                    ON a.game_id = g.g_game_id and a.source_system = g.g_source_system
+                    LEFT JOIN (
+                        SELECT
+                            source_system as n_source_system,
+                            parent_game_id ,
+                            COUNT(DISTINCT role_user_id) as role_num
+                        FROM
+                            dw_create_role_detail
+                    """ + criRoleNum +
+                    """
+                            AND NOT user_agent_id = 0
+                        GROUP BY parent_game_id,source_system
+                    ) n
+                    ON a.game_id = n.parent_game_id and a.source_system = n.n_source_system
+                    """;
+        } else if ("nature".equals(tableType)) {
+            return """
+                    SELECT
+                        a.*,
+                        IFNULL(amount_count, 0) amount_count,
+                        IFNULL(amount, 0) amount,
+                        IFNULL(avg_amount, 0) avg_amount,
+                        IFNULL(new_user_amount_num, 0) new_user_amount_num,
+                        IFNULL(new_user_again_num, 0) new_user_again_num,
+                        IFNULL(amount_num, 0) amount_num,
+                        IFNULL(role_num, 0) role_num
+                    FROM(
+                        SELECT
+                            source_system,
+                            parent_game_id as game_id,
+                            MAX(parent_game_name) as game_name,
+                            parent_game_name_classify as game_classify,
+                            sum(nature_reg_num) reg_num,
+                            sum(cost) cost,
+                            sum(nature_first_new_user_amount_count) first_new_user_amount_count,
+                            sum(nature_first_new_user_amount_num) first_new_user_amount_num,
+                            sum(nature_first_new_user_amount) first_new_user_amount,
+                            sum(nature_new_user_total_amount_count) new_user_total_amount_count,
+                            sum(nature_new_user_total_amount_num) new_user_total_amount_num,
+                            sum(nature_new_user_total_amount) new_user_total_amount,
+                            round(if(SUM(cost) > 0 , SUM(nature_first_new_user_amount) / SUM(cost) , 0), 4) first_roi,
+                            round(if(sum(nature_reg_num) > 0 , sum(nature_first_new_user_amount_num) / sum(nature_reg_num), 0), 4) first_amount_rate,
+                            round(if(sum(nature_reg_num) > 0, sum(nature_new_user_total_amount_num) / sum(nature_reg_num), 0), 4) today_amount_rate,
+                            round(if(sum(nature_first_new_user_amount_count) > 0, sum(nature_first_new_user_amount) / sum(nature_first_new_user_amount_count), 0), 2) first_avg_amount,
+                            round(if(sum(nature_new_user_total_amount_count) > 0, sum(nature_new_user_total_amount) / sum(nature_new_user_total_amount_count), 0), 2) today_avg_amount,
+                            round(if(sum(nature_new_user_total_amount_num) > 0 , sum(nature_reg_order_user_again) / sum(nature_new_user_total_amount_num), 0), 4) today_again_rate,
+                            round(if(sum(nature_reg_num) > 0 , sum(nature_new_user_total_amount) / sum(nature_reg_num), 0), 2) reg_user_arpu,
+                            round(if(sum(nature_first_new_user_amount_num) > 0 , sum(nature_first_new_user_amount) / sum(nature_first_new_user_amount_num), 0), 2) first_amount_arpu,
+                            round(if(sum(nature_new_user_total_amount_num) > 0 , sum(nature_new_user_total_amount) / sum(nature_new_user_total_amount_num), 0), 2) today_amount_arpu,
+                            round(if(SUM(nature_reg_num) > 0, SUM(cost) / SUM(nature_reg_num), 0), 2) reg_cost,
+                            round(if(SUM(cost) > 0 , SUM(nature_new_user_total_amount) / SUM(cost), 0), 4) total_roi,
+                            round(if(SUM(nature_first_new_user_amount_num) > 0, SUM(cost) / SUM(nature_first_new_user_amount_num), 0), 2) first_new_user_recharge_cost,
+                            round(if(SUM(nature_new_user_total_amount_num) > 0, SUM(cost) / SUM(nature_new_user_total_amount_num), 0), 2) total_recharge_cost,
+                            IFNULL(SUM(nature_hundred_user_num), 0) hundred_user_num,
+                            round(IF(SUM(nature_hundred_user_num) > 0, SUM(cost) / SUM(nature_hundred_user_num), 0), 2) hundred_user_num_cost,
+                            SUM(nature_first_role_num) first_role_num,
+                            SUM(nature_new_user_total_role_num) new_user_total_role_num,
+                            round(IF(SUM(nature_first_role_num) > 0, SUM(cost) / SUM(nature_first_role_num), 0), 2) first_role_num_cost,
+                            round(IF(SUM(nature_new_user_total_role_num) >0, SUM(cost) / SUM(nature_new_user_total_role_num), 0), 2) new_user_total_role_num_cost,
+                            round(IF(SUM(nature_reg_num) >0, SUM(nature_first_role_num) / SUM(nature_reg_num), 0), 4) first_role_num_rate,
+                            round(IF(SUM(nature_reg_num) >0, SUM(nature_new_user_total_role_num) / SUM(nature_reg_num), 0), 4) new_user_total_role_num_rate
+                        FROM
+                            game_ads_parent.ads_game_day_parent
+                    """ + criA +
+                    """
+                         ) a
+                    LEFT JOIN (
+                        SELECT
+                            source_system as b_source_system,
+                            parent_game_id as b_game_id,
+                            MAX(parent_game_name) as b_game_name,
+                            IFNULL(sum(nature_amount_count), 0) amount_count,
+                            IFNULL(sum(nature_amount), 0) amount,
+                            round(if(sum(nature_amount_count) > 0, sum(nature_amount) / sum(nature_amount_count), 0), 2) avg_amount
+                        FROM
+                            game_ads_parent.ads_game_day_parent
+                    """ + criB +
+                    """
+                        ) b
+                    ON a.game_id = b.b_game_id and a.game_name = b.b_game_name and a.source_system = b.b_source_system
+                    LEFT JOIN (
+                        SELECT
+                            source_system as e_source_system,
+                            parent_game_id as e_game_id,
+                            IFNULL(COUNT(DISTINCT user_id), 0) amount_num
+                        FROM
+                            game_ads.ads_information
+                    """ + criAmount +
+                    """
+                            AND agent_id = 0
+                        GROUP BY parent_game_id, source_system ) e
+                    ON a.game_id = e.e_game_id and a.source_system = e.e_source_system
+                    LEFT JOIN(
+                        SELECT
+                            source_system as h_source_system,
+                            parent_game_id as h_game_id,
+                            COUNT(DISTINCT user_id) as new_user_amount_num
+                        FROM
+                            game_ads.ads_information
+                    """ + criNewUser +
+                    """
+                            AND agent_id = 0
+                        GROUP BY parent_game_id, source_system) h
+                    ON a.game_id = h.h_game_id and a.source_system = h.h_source_system
+                    LEFT JOIN (
+                        SELECT
+                            source_system as i_source_system,
+                            parent_game_id as i_game_id,
+                            COUNT(tempB.num) as new_user_again_num
+                        FROM (
+                                SELECT
+                                    source_system,
+                                    parent_game_id,
+                                    COUNT(user_id) num
+                                FROM
+                                    game_ads.ads_information
+                    """ + criNewUser +
+                    """
+                                    AND agent_id = 0
+                                GROUP BY
+                                    user_id,
+                                    parent_game_id,
+                                    source_system
+                                HAVING
+                                    COUNT(user_id) > 1 ) tempB
+                            GROUP BY tempB.parent_game_id, tempB.source_system ) i
+                    ON a.game_id = i.i_game_id and a.source_system = i.i_source_system
+                    LEFT JOIN (
+                        SELECT
+                            source_system as m_source_system,
+                            parent_game_id ,
+                            COUNT(DISTINCT role_user_id) as role_num
+                        FROM
+                            dw_create_role_detail
+                    """ + criRoleNum +
+                    """
+                            AND user_agent_id = 0
+                        GROUP BY parent_game_id, source_system
+                    ) m
+                    ON a.game_id = m.parent_game_id and a.source_system = m.m_source_system
+                    """;
+        }
+        //总量
+        return """
+                SELECT
+                    a.*,
+                    IFNULL(amount_count, 0) amount_count,
+                    IFNULL(amount, 0) amount,
+                    IFNULL(avg_amount, 0) avg_amount,
+                 	IFNULL(new_user_amount_num, 0) new_user_amount_num,
+                 	IFNULL(new_user_again_num, 0) new_user_again_num,
+                 	IFNULL(amount_num, 0) amount_num,
+                  	IFNULL(role_num, 0) role_num
+                FROM(
+                	SELECT
+                	    source_system,
+                		parent_game_id as game_id,
+                		MAX(parent_game_name) as game_name,
+                		parent_game_name_classify as game_classify,
+                		sum(reg_num) reg_num,
+                		sum(cost) cost,
+                		sum(first_new_user_amount_count) first_new_user_amount_count,
+                		sum(first_new_user_amount_num) first_new_user_amount_num,
+                		sum(first_new_user_amount) first_new_user_amount,
+                		sum(new_user_total_amount_count) new_user_total_amount_count,
+                		sum(new_user_total_amount_num) new_user_total_amount_num,
+                		sum(new_user_total_amount) new_user_total_amount,
+                		round(if(SUM(cost) > 0 , SUM(first_new_user_amount) / SUM(cost) , 0), 4) first_roi,
+                		round(if(sum(reg_num) > 0 , sum(first_new_user_amount_num) / sum(reg_num), 0), 4) first_amount_rate,
+                		round(if(sum(reg_num) > 0, sum(new_user_total_amount_num) / sum(reg_num), 0), 4) today_amount_rate,
+                		round(if(sum(first_new_user_amount_count) > 0, sum(first_new_user_amount) / sum(first_new_user_amount_count), 0), 2) first_avg_amount,
+                		round(if(sum(new_user_total_amount_count) > 0, sum(new_user_total_amount) / sum(new_user_total_amount_count), 0), 2) today_avg_amount,
+                		round(if(sum(new_user_total_amount_num) > 0 , sum(reg_order_user_again) / sum(new_user_total_amount_num), 0), 4) today_again_rate,
+                		round(if(sum(reg_num) > 0 , sum(new_user_total_amount) / sum(reg_num), 0), 2) reg_user_arpu,
+                		round(if(sum(first_new_user_amount_num) > 0 , sum(first_new_user_amount) / sum(first_new_user_amount_num), 0), 2) first_amount_arpu,
+                		round(if(sum(new_user_total_amount_num) > 0 , sum(new_user_total_amount) / sum(new_user_total_amount_num), 0), 2) today_amount_arpu,
+                		round(if(SUM(reg_num) > 0, SUM(cost) / SUM(reg_num), 0), 2) reg_cost,
+                		round(if(SUM(cost) > 0 , SUM(new_user_total_amount) / SUM(cost), 0), 4) total_roi,
+                		round(if(SUM(first_new_user_amount_num) > 0, SUM(cost) / SUM(first_new_user_amount_num), 0), 2) first_new_user_recharge_cost,
+                		round(if(SUM(new_user_total_amount_num) > 0, SUM(cost) / SUM(new_user_total_amount_num), 0), 2) total_recharge_cost,
+                		SUM(hundred_user_num) hundred_user_num,
+                		round(IF(SUM(hundred_user_num) > 0, SUM(cost) / SUM(hundred_user_num), 0), 2) hundred_user_num_cost,
+                		SUM(first_role_num) first_role_num,
+                		SUM(new_user_total_role_num) new_user_total_role_num,
+                		round(IF(SUM(first_role_num) > 0, SUM(cost) / SUM(first_role_num), 0), 2) first_role_num_cost,
+                		round(IF(SUM(new_user_total_role_num) >0, SUM(cost) / SUM(new_user_total_role_num), 0), 2) new_user_total_role_num_cost,
+                		round(IF(SUM(reg_num) >0, SUM(first_role_num) / SUM(reg_num), 0), 4) first_role_num_rate,
+                		round(IF(SUM(reg_num) >0, SUM(new_user_total_role_num) / SUM(reg_num), 0), 4) new_user_total_role_num_rate
+                	FROM
+                		game_ads_parent.ads_game_day_parent
+                """ + criA +
+                """
+                     ) a
+                LEFT JOIN (
+                    SELECT
+                        source_system as b_source_system,
+                        parent_game_id as b_game_id,
+                        MAX(parent_game_name) as b_game_name,
+                        IFNULL(sum(amount_count), 0) amount_count,
+                        IFNULL(sum(amount), 0) amount,
+                        round(if(sum(amount_count) > 0, sum(amount) / sum(amount_count), 0), 2) avg_amount
+                    FROM
+                        game_ads_parent.ads_game_day_parent
+                """ + criB +
+                """
+                    ) b
+                ON a.game_id = b.b_game_id and a.game_name = b.b_game_name and a.source_system = b.b_source_system
+                LEFT JOIN (
+                    SELECT
+                        source_system as c_source_system,
+                        parent_game_id as c_game_id,
+                        IFNULL(COUNT(DISTINCT user_id), 0) amount_num
+                    FROM
+                        game_ads.ads_information
+                """ + criAmount +
+                """
+                    GROUP BY parent_game_id, source_system) c
+                ON a.game_id = c.c_game_id and a.source_system = c.c_source_system
+                LEFT JOIN (
+                    SELECT
+                        source_system as j_source_system,
+                        parent_game_id as j_game_id,
+                        COUNT(DISTINCT user_id) new_user_amount_num
+                    FROM
+                        game_ads.ads_information
+                """
+                + criNewUser +
+                """
+                    GROUP BY parent_game_id, source_system) j
+                ON a.game_id = j.j_game_id and a.source_system = j.j_source_system
+                LEFT JOIN (
+                    SELECT
+                        source_system as k_source_system,
+                        parent_game_id as k_game_id,
+                        COUNT(tempC.num) as new_user_again_num
+                    FROM (
+                            SELECT
+                                source_system,
+                                parent_game_id,
+                                COUNT(user_id) num
+                            FROM
+                                game_ads.ads_information
+                """ + criNewUser +
+                """
+                            GROUP BY
+                                user_id,
+                                parent_game_id,
+                                source_system
+                            HAVING
+                                COUNT(user_id) > 1 ) tempC
+                        GROUP BY tempC.parent_game_id, tempC.source_system ) k
+                ON a.game_id = k.k_game_id and a.source_system = k.k_source_system
+                LEFT JOIN (
+                    SELECT
+                        source_system as l_source_system,
+                        parent_game_id ,
+                        COUNT(DISTINCT role_user_id) as role_num
+                    FROM
+                        dw_create_role_detail
+                """ + criRoleNum +
+                """
+                    GROUP BY parent_game_id, source_system
+                ) l
+                ON a.game_id = l.parent_game_id and a.source_system = l.l_source_system
+                """;
+    }
+
     /**
      * 游戏总数据总计一栏sql
      *
      * @param tableType 查询的类型
      * @return String
      */
-    private String gameDataTotalTotalSql(String tableType) {
+    private String gameDataTotalTotalSql(String tableType, String tableName) {
         if ("buy".equals(tableType)) {
             return """
                     SELECT
@@ -3799,9 +4284,8 @@ public class GameDataServiceImpl implements IGameDataService {
                         round(IF(SUM(buy_new_user_total_role_num) >0, SUM(cost) / SUM(buy_new_user_total_role_num), 0), 2) new_user_total_role_num_cost,
                         round(IF(SUM(buy_reg_num) >0, SUM(buy_first_role_num) / SUM(buy_reg_num), 0), 4) first_role_num_rate,
                         round(IF(SUM(buy_reg_num) >0, SUM(buy_new_user_total_role_num) / SUM(buy_reg_num), 0), 4) new_user_total_role_num_rate
-                    FROM
-                        game_ads.ads_game_day
-                    """;
+                    FROM 
+                    """ + tableName;
         } else if ("nature".equals(tableType)) {
             return """
                     SELECT
@@ -3834,9 +4318,8 @@ public class GameDataServiceImpl implements IGameDataService {
                         round(IF(SUM(nature_new_user_total_role_num) >0, SUM(cost) / SUM(nature_new_user_total_role_num), 0), 2) new_user_total_role_num_cost,
                         round(IF(SUM(nature_reg_num) >0, SUM(nature_first_role_num) / SUM(nature_reg_num), 0), 4) first_role_num_rate,
                         round(IF(SUM(nature_reg_num) >0, SUM(nature_new_user_total_role_num) / SUM(nature_reg_num), 0), 4) new_user_total_role_num_rate
-                    FROM
-                        game_ads.ads_game_day
-                    """;
+                    FROM 
+                    """ + tableName;
         }
         //总量数据
         return """
@@ -3870,9 +4353,8 @@ public class GameDataServiceImpl implements IGameDataService {
                     round(IF(SUM(new_user_total_role_num) >0, SUM(cost) / SUM(new_user_total_role_num), 0), 2) new_user_total_role_num_cost,
                     round(IF(SUM(reg_num) >0, SUM(first_role_num) / SUM(reg_num), 0), 4) first_role_num_rate,
                     round(IF(SUM(reg_num) >0, SUM(new_user_total_role_num) / SUM(reg_num), 0), 4) new_user_total_role_num_rate
-                FROM
-                    game_ads.ads_game_day
-                """;
+                FROM 
+                """ + tableName;
     }
 
     /**
@@ -3881,25 +4363,23 @@ public class GameDataServiceImpl implements IGameDataService {
      * @param tableType 查询的类型
      * @return String
      */
-    private String gameDataTotalSumAmountSql(String tableType) {
+    private String gameDataTotalSumAmountSql(String tableType, String tableName) {
         if ("buy".equals(tableType)) {
             return """
                     SELECT
                         IFNULL(sum(buy_amount_count),0) amount_count,
                         IFNULL(sum(buy_amount),0) amount,
                         round(if(sum(buy_amount_count) > 0, sum(buy_amount) / sum(buy_amount_count), 0), 2) avg_amount
-                    FROM
-                        game_ads.ads_game_day
-                    """;
+                    FROM 
+                    """ + tableName;
         } else if ("nature".equals(tableType)) {
             return """
                     SELECT
                         IFNULL(sum(nature_amount_count),0) amount_count,
                         IFNULL(sum(nature_amount),0) amount,
                         round(if(sum(nature_amount_count) > 0, sum(nature_amount) / sum(nature_amount_count), 0), 2) avg_amount
-                    FROM
-                        game_ads.ads_game_day
-                    """;
+                    FROM 
+                    """ + tableName;
         }
         //总量数据
         return """
@@ -3907,9 +4387,8 @@ public class GameDataServiceImpl implements IGameDataService {
                     IFNULL(sum(amount_count),0) amount_count,
                     IFNULL(sum(amount),0) amount,
                     round(if(sum(amount_count) > 0, sum(amount) / sum(amount_count), 0), 2) avg_amount
-                FROM
-                    game_ads.ads_game_day
-                """;
+                FROM 
+                """ + tableName;
     }
 
     /**
@@ -4547,11 +5026,11 @@ public class GameDataServiceImpl implements IGameDataService {
             queryStr.append(" INTERVAL 0 day)");
         }
         //拼接sourceSystem条件
-        if (againTrendVO.getSourceSystem() != null) {
+        if (StringUtils.isNotBlank(againTrendVO.getSourceSystem())) {
             queryStr.append(" and source_system = '")
                     .append(againTrendVO.getSourceSystem())
                     .append("'");
-        } else if (dto.getSourceSystem() != null) {
+        } else if (StringUtils.isNotBlank(dto.getSourceSystem())) {
             queryStr.append(" and source_system = '")
                     .append(dto.getSourceSystem())
                     .append("'");
@@ -8902,6 +9381,29 @@ public class GameDataServiceImpl implements IGameDataService {
                 """;
     }
 
+    /**
+     * 流水临时sql-父游戏维度
+     *
+     * @return String
+     */
+    private String waterTemplateSqlForParent() {
+        return """
+                select
+                parent_game_id as game_id,
+                user_order_by,
+                user_id,
+                user_name,
+                user_amount,
+                amount_order_by,
+                amount_post,
+                amount_count,
+                role_name,
+                server_name,
+                amount_num
+                from game_ads_parent.ads_everyday_water_parent
+                """;
+    }
+
     /**
      * 用户详情sql-子游戏维度
      */

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

@@ -4,7 +4,9 @@ import com.google.common.base.CaseFormat;
 import com.zanxiang.game.data.serve.component.DataPowerComponent;
 import com.zanxiang.game.data.serve.pojo.dto.*;
 import com.zanxiang.game.data.serve.pojo.entity.AdsGameServerDay;
+import com.zanxiang.game.data.serve.pojo.entity.AdsGameServerDayParent;
 import com.zanxiang.game.data.serve.pojo.entity.AdsGameServerSumDay;
+import com.zanxiang.game.data.serve.pojo.entity.AdsGameServerSumDayParent;
 import com.zanxiang.game.data.serve.pojo.enums.OrderByEnum;
 import com.zanxiang.game.data.serve.pojo.vo.*;
 import com.zanxiang.game.data.serve.service.IGameServerService;
@@ -198,13 +200,22 @@ public class GameServerServiceImpl implements IGameServerService {
     @Override
     public Page<GameServerDayVO> getGameServerDataDay(GameServerDayDTO dto) {
         com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
-        List<Long> gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
+        List<Long> gameIds = dto.getGameId() == null ? poerInfo.second : dto.getGameId();
 
+        if (dto.getGameDimension() == null) {
+            //默认查询子游戏维度
+            dto.setGameDimension(1L);
+        }
+        //默认查询子游戏维度字段
+        String gameColumn = "game_id";
+        if (dto.getGameDimension() == 2L) {
+            gameColumn = "parent_game_id";
+        }
         //创建查询条件
         Criteria cri = Cnd.cri();
-        if (gameIds != null) {
+        if (CollectionUtils.isNotEmpty(gameIds)) {
             //拼接游戏ID查询条件
-            cri.where().andInList("game_id", gameIds);
+            cri.where().andInList(gameColumn, gameIds);
         }
         if (dto.getServerId() != null) {
             //拼接区服ID查询条件
@@ -233,18 +244,25 @@ public class GameServerServiceImpl implements IGameServerService {
         } else {
             cri.getOrderBy().orderBy(CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, dto.getSortFiled()), dto.getSortType());
         }
+        //设置分页对象
+        Pager pager = dao.createPager(dto.getPageNum(), dto.getPageSize());
         //创建sql语句查询数据
-        Sql sql = Sqls.create(gameServerDaySql() + cri);
+        Sql sql;
+        if (dto.getGameDimension() == 1L) {
+            sql = Sqls.create(gameServerDaySql() + cri);
+            //设置总记录数
+            pager.setRecordCount(dao.count(AdsGameServerDay.class, cri));
+        } else {
+            sql = Sqls.create(gameServerDaySqlForParent() + cri);
+            //设置总记录数
+            pager.setRecordCount(dao.count(AdsGameServerDayParent.class, cri));
+        }
         //设置自定义回传对象
         sql.setCallback(Sqls.callback.entities());
         sql.setEntity(dao.getEntity(GameServerDayVO.class));
-        //设置分页对象
-        Pager pager = dao.createPager(dto.getPageNum(), dto.getPageSize());
         sql.setPager(pager);
         //执行sql
         dao.execute(sql);
-        //设置总记录数
-        pager.setRecordCount(dao.count(AdsGameServerDay.class, cri));
         List<GameServerDayVO> tempList = sql.getList(GameServerDayVO.class);
         List<GameServerDayVO> list = tempList.stream().map(vo -> {
                 formatDayN(vo);
@@ -263,16 +281,26 @@ public class GameServerServiceImpl implements IGameServerService {
     @Override
     public GameServerDayTotalVO getGameServerDataDayTotal(GameServerDayTotalDTO dto) {
         com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
-        List<Long> gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
+        List<Long> gameIds = dto.getGameId() == null ? poerInfo.second : dto.getGameId();
+
         //默认查询注册留存数据
         if (StringUtils.isBlank(dto.getActiveTypes())) {
             dto.setActiveTypes("reg");
         }
+        if (dto.getGameDimension() == null) {
+            //默认查询子游戏维度
+            dto.setGameDimension(1L);
+        }
+        //默认查询子游戏维度字段
+        String gameColumn = "game_id";
+        if (dto.getGameDimension() == 2L) {
+            gameColumn = "parent_game_id";
+        }
         //创建查询条件
         Criteria cri = Cnd.cri();
-        if (gameIds != null) {
+        if (CollectionUtils.isNotEmpty(gameIds)) {
             //拼接游戏ID查询条件
-            cri.where().andInList("game_id", gameIds);
+            cri.where().andInList(gameColumn, gameIds);
         }
         if (dto.getServerId() != null) {
             //拼接区服ID查询条件
@@ -291,7 +319,12 @@ public class GameServerServiceImpl implements IGameServerService {
             cri.where().andEquals("source_system", dto.getSourceSystem());
         }
         //创建sql语句查询数据
-        Sql sql = Sqls.create(gameServerDayTotalSql(dto.getActiveTypes()) + cri);
+        Sql sql;
+        if (dto.getGameDimension() == 1L) {
+            sql = Sqls.create(gameServerDayTotalSql(dto.getActiveTypes()) + cri);
+        } else {
+            sql = Sqls.create(gameServerDayTotalSqlForParent(dto.getActiveTypes()) + cri);
+        }
         //设置自定义回传对象
         sql.setCallback(Sqls.callback.entity());
         sql.setEntity(dao.getEntity(GameServerDayTotalVO.class));
@@ -315,12 +348,22 @@ public class GameServerServiceImpl implements IGameServerService {
     public Page<GameServerSumDayVO> getGameServerDataSumDay(GameServerSumDayDTO dto) {
         //添加权限
         com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
-        List<Long> gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
+        List<Long> gameIds = dto.getGameId() == null ? poerInfo.second : dto.getGameId();
+
+        if (dto.getGameDimension() == null) {
+            //默认查询子游戏维度
+            dto.setGameDimension(1L);
+        }
+        //默认查询子游戏维度字段
+        String gameColumn = "game_id";
+        if (dto.getGameDimension() == 2L) {
+            gameColumn = "parent_game_id";
+        }
         //创建查询条件
         Criteria cri = Cnd.cri();
-        if (gameIds != null) {
+        if (CollectionUtils.isNotEmpty(gameIds)) {
             //拼接游戏ID查询条件
-            cri.where().andInList("game_id", gameIds);
+            cri.where().andInList(gameColumn, gameIds);
         }
         if (dto.getBeginDate() != null && dto.getEndDate() != null) {
             //拼接开服时间查询条件
@@ -341,18 +384,25 @@ public class GameServerServiceImpl implements IGameServerService {
         } else {
             cri.getOrderBy().orderBy(CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, dto.getSortFiled()), dto.getSortType());
         }
+        //设置分页对象
+        Pager pager = dao.createPager(dto.getPageNum(), dto.getPageSize());
         //创建sql语句查询数据
-        Sql sql = Sqls.create(gameServerSumDaySql() + cri);
+        Sql sql;
+        if (dto.getGameDimension() == 1L) {
+            sql = Sqls.create(gameServerSumDaySql() + cri);
+            //设置总记录数
+            pager.setRecordCount(dao.count(AdsGameServerSumDay.class, cri));
+        } else {
+            sql = Sqls.create(gameServerSumDaySqlForParent() + cri);
+            //设置总记录数
+            pager.setRecordCount(dao.count(AdsGameServerSumDayParent.class, cri));
+        }
         //设置自定义回传对象
         sql.setCallback(Sqls.callback.entities());
         sql.setEntity(dao.getEntity(GameServerSumDayVO.class));
-        //设置分页对象
-        Pager pager = dao.createPager(dto.getPageNum(), dto.getPageSize());
         sql.setPager(pager);
         //执行sql
         dao.execute(sql);
-        //设置总记录数
-        pager.setRecordCount(dao.count(AdsGameServerSumDay.class, cri));
         List<GameServerSumDayVO> tempList = sql.getList(GameServerSumDayVO.class);
         List<GameServerSumDayVO> list = tempList.stream().map(vo -> {
             formatDayNForServerDay(vo);
@@ -371,13 +421,23 @@ public class GameServerServiceImpl implements IGameServerService {
     @Override
     public GameServerSumDayTotalVO getGameServerDataSumDayTotal(GameServerSumDayTotalDTO dto) {
         com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
-        List<Long> gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
+        List<Long> gameIds = dto.getGameId() == null ? poerInfo.second : dto.getGameId();
+
+        if (dto.getGameDimension() == null) {
+            //默认查询子游戏维度
+            dto.setGameDimension(1L);
+        }
+        //默认查询子游戏维度字段
+        String gameColumn = "game_id";
+        if (dto.getGameDimension() == 2L) {
+            gameColumn = "parent_game_id";
+        }
 
         //创建查询条件
         Criteria cri = Cnd.cri();
-        if (gameIds != null) {
+        if (CollectionUtils.isNotEmpty(gameIds)) {
             //拼接游戏ID查询条件
-            cri.where().andInList("game_id", gameIds);
+            cri.where().andInList(gameColumn, gameIds);
         }
         if (dto.getBeginDate() != null && dto.getEndDate() != null) {
             //拼接开服时间查询条件
@@ -388,7 +448,12 @@ public class GameServerServiceImpl implements IGameServerService {
             cri.where().andEquals("source_system", dto.getSourceSystem());
         }
         //创建sql语句查询数据
-        Sql sql = Sqls.create(gameServerSumDayTotalSql() + cri);
+        Sql sql;
+        if (dto.getGameDimension() == 1L) {
+            sql = Sqls.create(gameServerSumDayTotalSql() + cri);
+        } else {
+            sql = Sqls.create(gameServerSumDayTotalSqlForParent() + cri);
+        }
         //设置自定义回传对象
         sql.setCallback(Sqls.callback.entity());
         sql.setEntity(dao.getEntity(GameServerSumDayTotalVO.class));
@@ -1003,6 +1068,133 @@ public class GameServerServiceImpl implements IGameServerService {
                 """;
     }
 
+    /**
+     * 游戏区服数据SQL-父游戏维度
+     * @return String
+     */
+    private String gameServerDaySqlForParent() {
+        return """
+                SELECT
+                    dt,
+                    source_system,
+                    server_id,
+                    server_name,
+                    parent_game_id as game_id,
+                    parent_game_name as game_name,
+                    parent_game_classify as classify,
+                    out_total_num,
+                    out_total_amount_num,
+                    out_total_amount,
+                    out_total_rate,
+                    total_role_num,
+                    total_reg_num,
+                    total_amount_num,
+                    total_amount,
+                    da1,
+                    da2,
+                    da3,
+                    da4,
+                    da5,
+                    da6,
+                    da7,
+                    da8,
+                    da9,
+                    da10,
+                    da11,
+                    da12,
+                    da13,
+                    da14,
+                    da15,
+                    da16,
+                    da17,
+                    da18,
+                    da19,
+                    da20,
+                    da21,
+                    da22,
+                    da23,
+                    da24,
+                    da25,
+                    da26,
+                    da27,
+                    da28,
+                    da29,
+                    da30,
+                    da31,
+                    da32,
+                    da33,
+                    da34,
+                    da35,
+                    da36,
+                    da37,
+                    da38,
+                    da39,
+                    da40,
+                    da41,
+                    da42,
+                    da43,
+                    da44,
+                    da45,
+                    da46,
+                    da47,
+                    da48,
+                    da49,
+                    da50,
+                    da51,
+                    da52,
+                    da53,
+                    da54,
+                    da55,
+                    da56,
+                    da57,
+                    da58,
+                    da59,
+                    da60,
+                    da61,
+                    da62,
+                    da63,
+                    da64,
+                    da65,
+                    da66,
+                    da67,
+                    da68,
+                    da69,
+                    da70,
+                    da71,
+                    da72,
+                    da73,
+                    da74,
+                    da75,
+                    da76,
+                    da77,
+                    da78,
+                    da79,
+                    da80,
+                    da81,
+                    da82,
+                    da83,
+                    da84,
+                    da85,
+                    da86,
+                    da87,
+                    da88,
+                    da89,
+                    da90,
+                    m4,
+                    m5,
+                    m6,
+                    m7,
+                    m8,
+                    m9,
+                    m10,
+                    m11,
+                    m12,
+                    total
+                FROM
+                    game_ads_parent.ads_game_server_day_parent
+                """;
+    }
+
     /**
      * 游戏区服每日数据SQL
      * @return String
@@ -1132,118 +1324,246 @@ public class GameServerServiceImpl implements IGameServerService {
     }
 
     /**
-     * 游戏区服数据总计SQL
-     * @param activeType 查询的留存类型 reg -> 注册留存 ; role -> 角色留存 ; amount -> 付费留存
-     *
+     * 游戏区服每日数据SQL-父游戏维度
      * @return String
      */
-    private String gameServerDayTotalSql(String activeType) {
+    private String gameServerSumDaySqlForParent() {
         return """
                 SELECT
-                    IFNULL(SUM(out_total_num), 0) as out_total_num,
-                    IFNULL(SUM(out_total_amount_num), 0) as out_total_amount_num,
-                    IFNULL(SUM(out_total_amount), 0) as out_total_amount,
-                    ROUND(IF(SUM(total_amount) > 0, SUM(out_total_amount) / SUM(total_amount), 0), 4) as out_total_rate,
-                    IFNULL(SUM(total_role_num), 0) as total_role_num,
-                    IFNULL(SUM(total_reg_num), 0) as total_reg_num,
-                    IFNULL(SUM(total_amount_num), 0) as total_amount_num,
-                    IFNULL(SUM(total_amount), 0) as total_amount,
-                """ + trendDay(activeType) +
-                """
-                FROM (
-                    SELECT
-                        dt,
-                        source_system,
-                        server_id,
-                        server_name,
-                        game_id,
-                        game_name,
-                        classify,
-                        out_total_num,
-                        out_total_amount_num,
-                        out_total_amount,
-                        out_total_rate,
-                        total_role_num,
-                        total_reg_num,
-                        total_amount_num,
-                        total_amount,
-                        SPLIT(da1, '/') as da1,
-                        SPLIT(da2, '/') as da2,
-                        SPLIT(da3, '/') as da3,
-                        SPLIT(da4, '/') as da4,
-                        SPLIT(da5, '/') as da5,
-                        SPLIT(da6, '/') as da6,
-                        SPLIT(da7, '/') as da7,
-                        SPLIT(da8, '/') as da8,
-                        SPLIT(da9, '/') as da9,
-                        SPLIT(da10, '/') as da10,
-                        SPLIT(da11, '/') as da11,
-                        SPLIT(da12, '/') as da12,
-                        SPLIT(da13, '/') as da13,
-                        SPLIT(da14, '/') as da14,
-                        SPLIT(da15, '/') as da15,
-                        SPLIT(da16, '/') as da16,
-                        SPLIT(da17, '/') as da17,
-                        SPLIT(da18, '/') as da18,
-                        SPLIT(da19, '/') as da19,
-                        SPLIT(da20, '/') as da20,
-                        SPLIT(da21, '/') as da21,
-                        SPLIT(da22, '/') as da22,
-                        SPLIT(da23, '/') as da23,
-                        SPLIT(da24, '/') as da24,
-                        SPLIT(da25, '/') as da25,
-                        SPLIT(da26, '/') as da26,
-                        SPLIT(da27, '/') as da27,
-                        SPLIT(da28, '/') as da28,
-                        SPLIT(da29, '/') as da29,
-                        SPLIT(da30, '/') as da30,
-                        SPLIT(da31, '/') as da31,
-                        SPLIT(da32, '/') as da32,
-                        SPLIT(da33, '/') as da33,
-                        SPLIT(da34, '/') as da34,
-                        SPLIT(da35, '/') as da35,
-                        SPLIT(da36, '/') as da36,
-                        SPLIT(da37, '/') as da37,
-                        SPLIT(da38, '/') as da38,
-                        SPLIT(da39, '/') as da39,
-                        SPLIT(da40, '/') as da40,
-                        SPLIT(da41, '/') as da41,
-                        SPLIT(da42, '/') as da42,
-                        SPLIT(da43, '/') as da43,
-                        SPLIT(da44, '/') as da44,
-                        SPLIT(da45, '/') as da45,
-                        SPLIT(da46, '/') as da46,
-                        SPLIT(da47, '/') as da47,
-                        SPLIT(da48, '/') as da48,
-                        SPLIT(da49, '/') as da49,
-                        SPLIT(da50, '/') as da50,
-                        SPLIT(da51, '/') as da51,
-                        SPLIT(da52, '/') as da52,
-                        SPLIT(da53, '/') as da53,
-                        SPLIT(da54, '/') as da54,
-                        SPLIT(da55, '/') as da55,
-                        SPLIT(da56, '/') as da56,
-                        SPLIT(da57, '/') as da57,
-                        SPLIT(da58, '/') as da58,
-                        SPLIT(da59, '/') as da59,
-                        SPLIT(da60, '/') as da60,
-                        SPLIT(da61, '/') as da61,
-                        SPLIT(da62, '/') as da62,
-                        SPLIT(da63, '/') as da63,
-                        SPLIT(da64, '/') as da64,
-                        SPLIT(da65, '/') as da65,
-                        SPLIT(da66, '/') as da66,
-                        SPLIT(da67, '/') as da67,
-                        SPLIT(da68, '/') as da68,
-                        SPLIT(da69, '/') as da69,
-                        SPLIT(da70, '/') as da70,
-                        SPLIT(da71, '/') as da71,
-                        SPLIT(da72, '/') as da72,
-                        SPLIT(da73, '/') as da73,
-                        SPLIT(da74, '/') as da74,
-                        SPLIT(da75, '/') as da75,
-                        SPLIT(da76, '/') as da76,
-                        SPLIT(da77, '/') as da77,
+                    id,
+                    dt,
+                    source_system,
+                    server_id,
+                    server_name,
+                    parent_game_id as game_id,
+                    parent_game_name as game_name,
+                    parent_game_classify as classify,
+                    out_total_num,
+                    out_total_amount_num,
+                    out_total_amount,
+                    out_total_rate,
+                    total_role_num,
+                    total_reg_num,
+                    total_amount_num,
+                    total_amount,
+                    da1,
+                    da2,
+                    da3,
+                    da4,
+                    da5,
+                    da6,
+                    da7,
+                    da8,
+                    da9,
+                    da10,
+                    da11,
+                    da12,
+                    da13,
+                    da14,
+                    da15,
+                    da16,
+                    da17,
+                    da18,
+                    da19,
+                    da20,
+                    da21,
+                    da22,
+                    da23,
+                    da24,
+                    da25,
+                    da26,
+                    da27,
+                    da28,
+                    da29,
+                    da30,
+                    da31,
+                    da32,
+                    da33,
+                    da34,
+                    da35,
+                    da36,
+                    da37,
+                    da38,
+                    da39,
+                    da40,
+                    da41,
+                    da42,
+                    da43,
+                    da44,
+                    da45,
+                    da46,
+                    da47,
+                    da48,
+                    da49,
+                    da50,
+                    da51,
+                    da52,
+                    da53,
+                    da54,
+                    da55,
+                    da56,
+                    da57,
+                    da58,
+                    da59,
+                    da60,
+                    da61,
+                    da62,
+                    da63,
+                    da64,
+                    da65,
+                    da66,
+                    da67,
+                    da68,
+                    da69,
+                    da70,
+                    da71,
+                    da72,
+                    da73,
+                    da74,
+                    da75,
+                    da76,
+                    da77,
+                    da78,
+                    da79,
+                    da80,
+                    da81,
+                    da82,
+                    da83,
+                    da84,
+                    da85,
+                    da86,
+                    da87,
+                    da88,
+                    da89,
+                    da90,
+                    m4,
+                    m5,
+                    m6,
+                    m7,
+                    m8,
+                    m9,
+                    m10,
+                    m11,
+                    m12,
+                    total
+                FROM
+                    game_ads_parent.ads_game_server_day_sum_parent
+                """;
+    }
+
+    /**
+     * 游戏区服数据总计SQL
+     * @param activeType 查询的留存类型 reg -> 注册留存 ; role -> 角色留存 ; amount -> 付费留存
+     *
+     * @return String
+     */
+    private String gameServerDayTotalSql(String activeType) {
+        return """
+                SELECT
+                    IFNULL(SUM(out_total_num), 0) as out_total_num,
+                    IFNULL(SUM(out_total_amount_num), 0) as out_total_amount_num,
+                    IFNULL(SUM(out_total_amount), 0) as out_total_amount,
+                    ROUND(IF(SUM(total_amount) > 0, SUM(out_total_amount) / SUM(total_amount), 0), 4) as out_total_rate,
+                    IFNULL(SUM(total_role_num), 0) as total_role_num,
+                    IFNULL(SUM(total_reg_num), 0) as total_reg_num,
+                    IFNULL(SUM(total_amount_num), 0) as total_amount_num,
+                    IFNULL(SUM(total_amount), 0) as total_amount,
+                """ + trendDay(activeType) +
+                """
+                FROM (
+                    SELECT
+                        dt,
+                        source_system,
+                        server_id,
+                        server_name,
+                        game_id,
+                        game_name,
+                        classify,
+                        out_total_num,
+                        out_total_amount_num,
+                        out_total_amount,
+                        out_total_rate,
+                        total_role_num,
+                        total_reg_num,
+                        total_amount_num,
+                        total_amount,
+                        SPLIT(da1, '/') as da1,
+                        SPLIT(da2, '/') as da2,
+                        SPLIT(da3, '/') as da3,
+                        SPLIT(da4, '/') as da4,
+                        SPLIT(da5, '/') as da5,
+                        SPLIT(da6, '/') as da6,
+                        SPLIT(da7, '/') as da7,
+                        SPLIT(da8, '/') as da8,
+                        SPLIT(da9, '/') as da9,
+                        SPLIT(da10, '/') as da10,
+                        SPLIT(da11, '/') as da11,
+                        SPLIT(da12, '/') as da12,
+                        SPLIT(da13, '/') as da13,
+                        SPLIT(da14, '/') as da14,
+                        SPLIT(da15, '/') as da15,
+                        SPLIT(da16, '/') as da16,
+                        SPLIT(da17, '/') as da17,
+                        SPLIT(da18, '/') as da18,
+                        SPLIT(da19, '/') as da19,
+                        SPLIT(da20, '/') as da20,
+                        SPLIT(da21, '/') as da21,
+                        SPLIT(da22, '/') as da22,
+                        SPLIT(da23, '/') as da23,
+                        SPLIT(da24, '/') as da24,
+                        SPLIT(da25, '/') as da25,
+                        SPLIT(da26, '/') as da26,
+                        SPLIT(da27, '/') as da27,
+                        SPLIT(da28, '/') as da28,
+                        SPLIT(da29, '/') as da29,
+                        SPLIT(da30, '/') as da30,
+                        SPLIT(da31, '/') as da31,
+                        SPLIT(da32, '/') as da32,
+                        SPLIT(da33, '/') as da33,
+                        SPLIT(da34, '/') as da34,
+                        SPLIT(da35, '/') as da35,
+                        SPLIT(da36, '/') as da36,
+                        SPLIT(da37, '/') as da37,
+                        SPLIT(da38, '/') as da38,
+                        SPLIT(da39, '/') as da39,
+                        SPLIT(da40, '/') as da40,
+                        SPLIT(da41, '/') as da41,
+                        SPLIT(da42, '/') as da42,
+                        SPLIT(da43, '/') as da43,
+                        SPLIT(da44, '/') as da44,
+                        SPLIT(da45, '/') as da45,
+                        SPLIT(da46, '/') as da46,
+                        SPLIT(da47, '/') as da47,
+                        SPLIT(da48, '/') as da48,
+                        SPLIT(da49, '/') as da49,
+                        SPLIT(da50, '/') as da50,
+                        SPLIT(da51, '/') as da51,
+                        SPLIT(da52, '/') as da52,
+                        SPLIT(da53, '/') as da53,
+                        SPLIT(da54, '/') as da54,
+                        SPLIT(da55, '/') as da55,
+                        SPLIT(da56, '/') as da56,
+                        SPLIT(da57, '/') as da57,
+                        SPLIT(da58, '/') as da58,
+                        SPLIT(da59, '/') as da59,
+                        SPLIT(da60, '/') as da60,
+                        SPLIT(da61, '/') as da61,
+                        SPLIT(da62, '/') as da62,
+                        SPLIT(da63, '/') as da63,
+                        SPLIT(da64, '/') as da64,
+                        SPLIT(da65, '/') as da65,
+                        SPLIT(da66, '/') as da66,
+                        SPLIT(da67, '/') as da67,
+                        SPLIT(da68, '/') as da68,
+                        SPLIT(da69, '/') as da69,
+                        SPLIT(da70, '/') as da70,
+                        SPLIT(da71, '/') as da71,
+                        SPLIT(da72, '/') as da72,
+                        SPLIT(da73, '/') as da73,
+                        SPLIT(da74, '/') as da74,
+                        SPLIT(da75, '/') as da75,
+                        SPLIT(da76, '/') as da76,
+                        SPLIT(da77, '/') as da77,
                         SPLIT(da78, '/') as da78,
                         SPLIT(da79, '/') as da79,
                         SPLIT(da80, '/') as da80,
@@ -1273,6 +1593,148 @@ public class GameServerServiceImpl implements IGameServerService {
                         """;
     }
 
+    /**
+     * 游戏区服数据总计SQL-父游戏维度
+     * @param activeType 查询的留存类型 reg -> 注册留存 ; role -> 角色留存 ; amount -> 付费留存
+     *
+     * @return String
+     */
+    private String gameServerDayTotalSqlForParent(String activeType) {
+        return """
+                SELECT
+                    IFNULL(SUM(out_total_num), 0) as out_total_num,
+                    IFNULL(SUM(out_total_amount_num), 0) as out_total_amount_num,
+                    IFNULL(SUM(out_total_amount), 0) as out_total_amount,
+                    ROUND(IF(SUM(total_amount) > 0, SUM(out_total_amount) / SUM(total_amount), 0), 4) as out_total_rate,
+                    IFNULL(SUM(total_role_num), 0) as total_role_num,
+                    IFNULL(SUM(total_reg_num), 0) as total_reg_num,
+                    IFNULL(SUM(total_amount_num), 0) as total_amount_num,
+                    IFNULL(SUM(total_amount), 0) as total_amount,
+                """ + trendDay(activeType) +
+                """
+                FROM (
+                    SELECT
+                        dt,
+                        source_system,
+                        server_id,
+                        server_name,
+                        parent_game_id,
+                        parent_game_name,
+                        parent_game_classify,
+                        out_total_num,
+                        out_total_amount_num,
+                        out_total_amount,
+                        out_total_rate,
+                        total_role_num,
+                        total_reg_num,
+                        total_amount_num,
+                        total_amount,
+                        SPLIT(da1, '/') as da1,
+                        SPLIT(da2, '/') as da2,
+                        SPLIT(da3, '/') as da3,
+                        SPLIT(da4, '/') as da4,
+                        SPLIT(da5, '/') as da5,
+                        SPLIT(da6, '/') as da6,
+                        SPLIT(da7, '/') as da7,
+                        SPLIT(da8, '/') as da8,
+                        SPLIT(da9, '/') as da9,
+                        SPLIT(da10, '/') as da10,
+                        SPLIT(da11, '/') as da11,
+                        SPLIT(da12, '/') as da12,
+                        SPLIT(da13, '/') as da13,
+                        SPLIT(da14, '/') as da14,
+                        SPLIT(da15, '/') as da15,
+                        SPLIT(da16, '/') as da16,
+                        SPLIT(da17, '/') as da17,
+                        SPLIT(da18, '/') as da18,
+                        SPLIT(da19, '/') as da19,
+                        SPLIT(da20, '/') as da20,
+                        SPLIT(da21, '/') as da21,
+                        SPLIT(da22, '/') as da22,
+                        SPLIT(da23, '/') as da23,
+                        SPLIT(da24, '/') as da24,
+                        SPLIT(da25, '/') as da25,
+                        SPLIT(da26, '/') as da26,
+                        SPLIT(da27, '/') as da27,
+                        SPLIT(da28, '/') as da28,
+                        SPLIT(da29, '/') as da29,
+                        SPLIT(da30, '/') as da30,
+                        SPLIT(da31, '/') as da31,
+                        SPLIT(da32, '/') as da32,
+                        SPLIT(da33, '/') as da33,
+                        SPLIT(da34, '/') as da34,
+                        SPLIT(da35, '/') as da35,
+                        SPLIT(da36, '/') as da36,
+                        SPLIT(da37, '/') as da37,
+                        SPLIT(da38, '/') as da38,
+                        SPLIT(da39, '/') as da39,
+                        SPLIT(da40, '/') as da40,
+                        SPLIT(da41, '/') as da41,
+                        SPLIT(da42, '/') as da42,
+                        SPLIT(da43, '/') as da43,
+                        SPLIT(da44, '/') as da44,
+                        SPLIT(da45, '/') as da45,
+                        SPLIT(da46, '/') as da46,
+                        SPLIT(da47, '/') as da47,
+                        SPLIT(da48, '/') as da48,
+                        SPLIT(da49, '/') as da49,
+                        SPLIT(da50, '/') as da50,
+                        SPLIT(da51, '/') as da51,
+                        SPLIT(da52, '/') as da52,
+                        SPLIT(da53, '/') as da53,
+                        SPLIT(da54, '/') as da54,
+                        SPLIT(da55, '/') as da55,
+                        SPLIT(da56, '/') as da56,
+                        SPLIT(da57, '/') as da57,
+                        SPLIT(da58, '/') as da58,
+                        SPLIT(da59, '/') as da59,
+                        SPLIT(da60, '/') as da60,
+                        SPLIT(da61, '/') as da61,
+                        SPLIT(da62, '/') as da62,
+                        SPLIT(da63, '/') as da63,
+                        SPLIT(da64, '/') as da64,
+                        SPLIT(da65, '/') as da65,
+                        SPLIT(da66, '/') as da66,
+                        SPLIT(da67, '/') as da67,
+                        SPLIT(da68, '/') as da68,
+                        SPLIT(da69, '/') as da69,
+                        SPLIT(da70, '/') as da70,
+                        SPLIT(da71, '/') as da71,
+                        SPLIT(da72, '/') as da72,
+                        SPLIT(da73, '/') as da73,
+                        SPLIT(da74, '/') as da74,
+                        SPLIT(da75, '/') as da75,
+                        SPLIT(da76, '/') as da76,
+                        SPLIT(da77, '/') as da77,
+                        SPLIT(da78, '/') as da78,
+                        SPLIT(da79, '/') as da79,
+                        SPLIT(da80, '/') as da80,
+                        SPLIT(da81, '/') as da81,
+                        SPLIT(da82, '/') as da82,
+                        SPLIT(da83, '/') as da83,
+                        SPLIT(da84, '/') as da84,
+                        SPLIT(da85, '/') as da85,
+                        SPLIT(da86, '/') as da86,
+                        SPLIT(da87, '/') as da87,
+                        SPLIT(da88, '/') as da88,
+                        SPLIT(da89, '/') as da89,
+                        SPLIT(da90, '/') as da90,
+                        SPLIT(m4, '/') as m4,
+                        SPLIT(m5, '/') as m5,
+                        SPLIT(m6, '/') as m6,
+                        SPLIT(m7, '/') as m7,
+                        SPLIT(m8, '/') as m8,
+                        SPLIT(m9, '/') as m9,
+                        SPLIT(m10, '/') as m10,
+                        SPLIT(m11, '/') as m11,
+                        SPLIT(m12, '/') as m12,
+                        SPLIT(total, '/') as total
+                    FROM
+                        game_ads_parent.ads_game_server_day_parent
+                ) a
+                """;
+    }
+
     /**
      * 游戏区服每日数据总计SQL
      *
@@ -1414,6 +1876,147 @@ public class GameServerServiceImpl implements IGameServerService {
                         """;
     }
 
+    /**
+     * 游戏区服每日数据总计SQL-父游戏维度
+     *
+     * @return String
+     */
+    private String gameServerSumDayTotalSqlForParent() {
+        return """
+                SELECT
+                    IFNULL(SUM(out_total_num), 0) as out_total_num,
+                    IFNULL(SUM(out_total_amount_num), 0) as out_total_amount_num,
+                    IFNULL(SUM(out_total_amount), 0) as out_total_amount,
+                    ROUND(IF(SUM(total_amount) > 0, SUM(out_total_amount) / SUM(total_amount), 0), 4) as out_total_rate,
+                    IFNULL(SUM(total_role_num), 0) as total_role_num,
+                    IFNULL(SUM(total_reg_num), 0) as total_reg_num,
+                    IFNULL(SUM(total_amount_num), 0) as total_amount_num,
+                    IFNULL(SUM(total_amount), 0) as total_amount,
+                """ + trendDayForServerDay() +
+                """
+                FROM (
+                    SELECT
+                        dt,
+                        source_system,
+                        server_id,
+                        server_name,
+                        parent_game_id,
+                        parent_game_name,
+                        parent_game_classify,
+                        out_total_num,
+                        out_total_amount_num,
+                        out_total_amount,
+                        out_total_rate,
+                        total_role_num,
+                        total_reg_num,
+                        total_amount_num,
+                        total_amount,
+                        SPLIT(da1, '/') as da1,
+                        SPLIT(da2, '/') as da2,
+                        SPLIT(da3, '/') as da3,
+                        SPLIT(da4, '/') as da4,
+                        SPLIT(da5, '/') as da5,
+                        SPLIT(da6, '/') as da6,
+                        SPLIT(da7, '/') as da7,
+                        SPLIT(da8, '/') as da8,
+                        SPLIT(da9, '/') as da9,
+                        SPLIT(da10, '/') as da10,
+                        SPLIT(da11, '/') as da11,
+                        SPLIT(da12, '/') as da12,
+                        SPLIT(da13, '/') as da13,
+                        SPLIT(da14, '/') as da14,
+                        SPLIT(da15, '/') as da15,
+                        SPLIT(da16, '/') as da16,
+                        SPLIT(da17, '/') as da17,
+                        SPLIT(da18, '/') as da18,
+                        SPLIT(da19, '/') as da19,
+                        SPLIT(da20, '/') as da20,
+                        SPLIT(da21, '/') as da21,
+                        SPLIT(da22, '/') as da22,
+                        SPLIT(da23, '/') as da23,
+                        SPLIT(da24, '/') as da24,
+                        SPLIT(da25, '/') as da25,
+                        SPLIT(da26, '/') as da26,
+                        SPLIT(da27, '/') as da27,
+                        SPLIT(da28, '/') as da28,
+                        SPLIT(da29, '/') as da29,
+                        SPLIT(da30, '/') as da30,
+                        SPLIT(da31, '/') as da31,
+                        SPLIT(da32, '/') as da32,
+                        SPLIT(da33, '/') as da33,
+                        SPLIT(da34, '/') as da34,
+                        SPLIT(da35, '/') as da35,
+                        SPLIT(da36, '/') as da36,
+                        SPLIT(da37, '/') as da37,
+                        SPLIT(da38, '/') as da38,
+                        SPLIT(da39, '/') as da39,
+                        SPLIT(da40, '/') as da40,
+                        SPLIT(da41, '/') as da41,
+                        SPLIT(da42, '/') as da42,
+                        SPLIT(da43, '/') as da43,
+                        SPLIT(da44, '/') as da44,
+                        SPLIT(da45, '/') as da45,
+                        SPLIT(da46, '/') as da46,
+                        SPLIT(da47, '/') as da47,
+                        SPLIT(da48, '/') as da48,
+                        SPLIT(da49, '/') as da49,
+                        SPLIT(da50, '/') as da50,
+                        SPLIT(da51, '/') as da51,
+                        SPLIT(da52, '/') as da52,
+                        SPLIT(da53, '/') as da53,
+                        SPLIT(da54, '/') as da54,
+                        SPLIT(da55, '/') as da55,
+                        SPLIT(da56, '/') as da56,
+                        SPLIT(da57, '/') as da57,
+                        SPLIT(da58, '/') as da58,
+                        SPLIT(da59, '/') as da59,
+                        SPLIT(da60, '/') as da60,
+                        SPLIT(da61, '/') as da61,
+                        SPLIT(da62, '/') as da62,
+                        SPLIT(da63, '/') as da63,
+                        SPLIT(da64, '/') as da64,
+                        SPLIT(da65, '/') as da65,
+                        SPLIT(da66, '/') as da66,
+                        SPLIT(da67, '/') as da67,
+                        SPLIT(da68, '/') as da68,
+                        SPLIT(da69, '/') as da69,
+                        SPLIT(da70, '/') as da70,
+                        SPLIT(da71, '/') as da71,
+                        SPLIT(da72, '/') as da72,
+                        SPLIT(da73, '/') as da73,
+                        SPLIT(da74, '/') as da74,
+                        SPLIT(da75, '/') as da75,
+                        SPLIT(da76, '/') as da76,
+                        SPLIT(da77, '/') as da77,
+                        SPLIT(da78, '/') as da78,
+                        SPLIT(da79, '/') as da79,
+                        SPLIT(da80, '/') as da80,
+                        SPLIT(da81, '/') as da81,
+                        SPLIT(da82, '/') as da82,
+                        SPLIT(da83, '/') as da83,
+                        SPLIT(da84, '/') as da84,
+                        SPLIT(da85, '/') as da85,
+                        SPLIT(da86, '/') as da86,
+                        SPLIT(da87, '/') as da87,
+                        SPLIT(da88, '/') as da88,
+                        SPLIT(da89, '/') as da89,
+                        SPLIT(da90, '/') as da90,
+                        SPLIT(m4, '/') as m4,
+                        SPLIT(m5, '/') as m5,
+                        SPLIT(m6, '/') as m6,
+                        SPLIT(m7, '/') as m7,
+                        SPLIT(m8, '/') as m8,
+                        SPLIT(m9, '/') as m9,
+                        SPLIT(m10, '/') as m10,
+                        SPLIT(m11, '/') as m11,
+                        SPLIT(m12, '/') as m12,
+                        SPLIT(total, '/') as total
+                    FROM
+                        game_ads_parent.ads_game_server_day_sum_parent
+                ) a
+                """;
+    }
+
     /**
      * 获取所有区服sql
      * @return

File diff suppressed because it is too large
+ 365 - 100
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/IMediaDataServiceImpl.java


File diff suppressed because it is too large
+ 312 - 127
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/PitcherDataServiceImpl.java


Some files were not shown because too many files changed in this diff