浏览代码

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

zhimo 1 年之前
父节点
当前提交
af4b5a9d21
共有 20 个文件被更改,包括 1777 次插入735 次删除
  1. 2 1
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/config/ThreadPoolConfig.java
  2. 7 0
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/controller/AdsGameServerController.java
  3. 1 1
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/controller/RoleManageController.java
  4. 9 10
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/GSGameServerDayDTO.java
  5. 6 0
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/RoleCombatRankingDTO.java
  6. 23 0
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/SuperGameDTO.java
  7. 59 0
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/vo/GSGameServerDayRVO.java
  8. 199 317
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/vo/GSGameServerDayVO.java
  9. 52 0
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/vo/GSServerRetentionVO.java
  10. 8 0
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/IGameServerService.java
  11. 46 0
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/GSGameServerTotalRVo.java
  12. 508 22
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/GameDataServiceImpl.java
  13. 5 1
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/GameMonitorAlarmServiceImpl.java
  14. 708 350
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/GameServerServiceImpl.java
  15. 1 1
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/IWebVisitLogServiceImpl.java
  16. 64 3
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/RoleManageServiceImpl.java
  17. 30 8
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/task/GameMonitorAlarmTask.java
  18. 39 19
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/task/OrderCostMonitorAlarmTask.java
  19. 1 1
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/ManageApplication.java
  20. 9 1
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/websocket/KfMsgWebsocketHandler.java

+ 2 - 1
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/config/ThreadPoolConfig.java

@@ -15,7 +15,7 @@ import java.util.concurrent.ThreadPoolExecutor;
 @Configuration
 @Configuration
 public class ThreadPoolConfig {
 public class ThreadPoolConfig {
     // 核心线程池大小
     // 核心线程池大小
-    private final int corePoolSize = 10;
+    private final int corePoolSize = 20;
 
 
 
 
     /**
     /**
@@ -33,4 +33,5 @@ public class ThreadPoolConfig {
             }
             }
         };
         };
     }
     }
+
 }
 }

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

@@ -64,6 +64,13 @@ public class AdsGameServerController {
         return ResultVO.ok(gameServerService.getGSGameServerDataDay(dto));
         return ResultVO.ok(gameServerService.getGSGameServerDataDay(dto));
     }
     }
 
 
+    @ApiOperation(value = "GS区服总数据")
+    @PreAuthorize(permissionKey = "gameServer:GSAdsGameServerDay:total")
+    @PostMapping("/gs/total")
+    public ResultVO<GSGameServerDayVO> getGSGameServerDataDayTotal(@RequestBody GSGameServerDayDTO dto) {
+        return ResultVO.ok(gameServerService.getGSGameServerDataDayTotal(dto));
+    }
+
 
 
 
 
 
 

+ 1 - 1
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/controller/RoleManageController.java

@@ -31,7 +31,7 @@ public class RoleManageController {
     @Autowired
     @Autowired
     private IRoleManageService roleManageService;
     private IRoleManageService roleManageService;
 
 
-//    @Log(title = "角色充值排行榜")
+
     @ApiOperation(value = "角色充值排行榜")
     @ApiOperation(value = "角色充值排行榜")
     @PreAuthorize(permissionKey = "roleManage:recharge:role")
     @PreAuthorize(permissionKey = "roleManage:recharge:role")
     @PostMapping("/rechargeRanking")
     @PostMapping("/rechargeRanking")

+ 9 - 10
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/GSGameServerDayDTO.java

@@ -16,11 +16,13 @@ import java.util.List;
 @Data
 @Data
 public class GSGameServerDayDTO extends BasePage implements Serializable {
 public class GSGameServerDayDTO extends BasePage implements Serializable {
 
 
+    private static final long serialVersionUID = 1L;
+
     /**
     /**
-     * 游戏维度:1-子游戏维度;2-父游戏维度;3-超父游戏维度
+     * SDK来源
      */
      */
-    @ApiModelProperty(notes = "游戏维度:1-子游戏维度;2-父游戏维度")
-    private Integer gameDimension = 1;
+    @ApiModelProperty(value = "SDK来源")
+    private String sourceSystem;
 
 
     /**
     /**
      * 游戏id
      * 游戏id
@@ -32,7 +34,7 @@ public class GSGameServerDayDTO extends BasePage implements Serializable {
      * GS id
      * GS id
      */
      */
     @ApiModelProperty(value = "GS id")
     @ApiModelProperty(value = "GS id")
-    private List<Long> gsId;
+    private Long gsId;
 
 
     /**
     /**
      * 区服名称
      * 区服名称
@@ -44,7 +46,7 @@ public class GSGameServerDayDTO extends BasePage implements Serializable {
      * 区服id
      * 区服id
      */
      */
     @ApiModelProperty(value = "区服id")
     @ApiModelProperty(value = "区服id")
-    private Long serverId;
+    private List<Long> serverId;
 
 
     /**
     /**
      * 开服时间
      * 开服时间
@@ -58,10 +60,7 @@ public class GSGameServerDayDTO extends BasePage implements Serializable {
     @ApiModelProperty(value = "开服时间(结束)")
     @ApiModelProperty(value = "开服时间(结束)")
     private LocalDate endDate;
     private LocalDate endDate;
 
 
-    /**
-     * 开服天数
-     */
-    @ApiModelProperty(value = "开服天数")
-    private Integer day;
+    @ApiModelProperty(value = "排序类型")
+    private String sortType = "desc";
 
 
 }
 }

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

@@ -81,4 +81,10 @@ public class RoleCombatRankingDTO extends BasePage {
     @ApiModelProperty(value = "SDK来源")
     @ApiModelProperty(value = "SDK来源")
     private String sourceSystem;
     private String sourceSystem;
 
 
+    /**
+     * 是否参与过合服
+     */
+    @ApiModelProperty(value = "是否参与过合服")
+    private Boolean isParticipateMerge;
+
 }
 }

+ 23 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/SuperGameDTO.java

@@ -0,0 +1,23 @@
+package com.zanxiang.game.data.serve.pojo.dto;
+
+import lombok.Data;
+
+/**
+ * packageName com.zanxiang.game.data.serve.pojo.dto
+ *
+ * @author ZhangXianyu
+ * @date 2024/3/28
+ * @description 超父游戏dto
+ */
+@Data
+public class SuperGameDTO {
+
+    private Long id;
+
+    private String name;
+
+    private String cpSendMsgUrl;
+
+    private String cpSendMsgKey;
+
+}

+ 59 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/vo/GSGameServerDayRVO.java

@@ -0,0 +1,59 @@
+package com.zanxiang.game.data.serve.pojo.vo;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.time.LocalDate;
+
+/**
+ * packageName com.zanxiang.game.data.serve.pojo.vo
+ *
+ * @author ZhangXianyu
+ * @date 2024/4/1
+ * @description 游戏区服列表R数据
+ */
+@Data
+public class GSGameServerDayRVO implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * SDK来源
+     */
+    private String sourceSystem;
+    /**
+     * 开服时间
+     */
+    private LocalDate dt;
+    /**
+     * 订单时间
+     */
+    private LocalDate orderDay;
+    /**
+     * 区服id
+     */
+    private Long serverId;
+    /**
+     * 游戏id
+     */
+    private Long parentGameId;
+    /**
+     * 小r
+     */
+    private Long smallR = 0L;
+    /**
+     * 中r
+     */
+    private Long mediumR = 0L;
+    /**
+     * 大r
+     */
+    private Long largeR = 0L;
+    /**
+     * 超大r
+     */
+    private Long superR = 0L;
+
+
+
+}

+ 199 - 317
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/vo/GSGameServerDayVO.java

@@ -2,9 +2,12 @@ package com.zanxiang.game.data.serve.pojo.vo;
 
 
 import io.swagger.annotations.ApiModelProperty;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.Data;
+import org.ini4j.Reg;
+import org.nutz.dao.entity.annotation.Many;
 
 
 import java.io.Serializable;
 import java.io.Serializable;
 import java.time.LocalDate;
 import java.time.LocalDate;
+import java.util.List;
 
 
 /**
 /**
  * @author ZhangXianyu
  * @author ZhangXianyu
@@ -15,351 +18,230 @@ import java.time.LocalDate;
 public class GSGameServerDayVO implements Serializable {
 public class GSGameServerDayVO implements Serializable {
     private static final long serialVersionUID = 1L;
     private static final long serialVersionUID = 1L;
 
 
+    @ApiModelProperty(value = "游戏id")
+    private Long parentGameId;
 
 
     @ApiModelProperty(value = "游戏名称")
     @ApiModelProperty(value = "游戏名称")
-    private String gameName;
+    private String parentGameName;
 
 
     @ApiModelProperty(value = "游戏类别")
     @ApiModelProperty(value = "游戏类别")
     private String parentGameClassify;
     private String parentGameClassify;
 
 
+    @ApiModelProperty(value = "游戏区服id")
+    private Long serverId;
+
     @ApiModelProperty(value = "游戏区服名称")
     @ApiModelProperty(value = "游戏区服名称")
     private String serverName;
     private String serverName;
 
 
     @ApiModelProperty(value = "SDK来源")
     @ApiModelProperty(value = "SDK来源")
     private String sourceSystem;
     private String sourceSystem;
 
 
-    @ApiModelProperty(value = "开服天数")
-    private Integer day;
-
     @ApiModelProperty(value = "开服时间")
     @ApiModelProperty(value = "开服时间")
-    private LocalDate beginDate;
+    private LocalDate dt;
+
+    @ApiModelProperty(value = "gsIds")
+    private String gsIds;
 
 
 
 
     @ApiModelProperty(value = "新用户人数")
     @ApiModelProperty(value = "新用户人数")
-    private Integer newUserCount;
+    private Long totalRegNum;
 
 
     @ApiModelProperty(value = "创角人数")
     @ApiModelProperty(value = "创角人数")
-    private Integer newRoleCount;
+    private Long totalRoleNum;
 
 
     @ApiModelProperty(value = "付费人数")
     @ApiModelProperty(value = "付费人数")
-    private Integer payUserCount;
-
-    /**
-     * 区服第1天:活跃留存率/付费留存率/小R留存率/中R留存率/大R留存率/超大R留存率/第N天创角总人数/第N天付费总人数
-     */
-    @ApiModelProperty(value = "不展示")
-    private String da1;
-
-    /**
-     * 区服第1天:活跃留存率/付费留存率/小R留存率/中R留存率/大R留存率/超大R留存率/第N天创角总人数/第N天付费总人数
-     */
-    @ApiModelProperty(value = "不展示")
-    private String da2;
-
-    /**
-     * 区服第2天:活跃留存率/付费留存率/小R留存率/中R留存率/大R留存率/超大R留存率/第N天创角总人数/第N天付费总人数
-     */
-    @ApiModelProperty(value = "不展示")
-    private String da3;
-
-    /**
-     * 区服第3天:活跃留存率/付费留存率/小R留存率/中R留存率/大R留存率/超大R留存率/第N天创角总人数/第N天付费总人数
-     */
-    @ApiModelProperty(value = "不展示")
-    private String da4;
-
-    /**
-     * 区服第4天:活跃留存率/付费留存率/小R留存率/中R留存率/大R留存率/超大R留存率/第N天创角总人数/第N天付费总人数
-     */
-    @ApiModelProperty(value = "不展示")
-    private String da5;
-
-
-    @ApiModelProperty(value = "不展示")
-    private String da6;
-
-
-    @ApiModelProperty(value = "不展示")
-    private String da7;
-
-
-    @ApiModelProperty(value = "不展示")
-    private String da8;
-
-    @ApiModelProperty(value = "不展示")
-    private String da9;
-
-    @ApiModelProperty(value = "不展示")
-    private String da10;
-
-
-    @ApiModelProperty(value = "不展示")
-    private String da11;
-
-
-    @ApiModelProperty(value = "不展示")
-    private String da12;
-
-    @ApiModelProperty(value = "不展示")
-    private String da13;
-
-
-    @ApiModelProperty(value = "不展示")
-    private String da14;
-
-
-    @ApiModelProperty(value = "不展示")
-    private String da15;
-
-
-    @ApiModelProperty(value = "不展示")
-    private String da16;
-
-
-    @ApiModelProperty(value = "不展示")
-    private String da17;
-
-
-    @ApiModelProperty(value = "不展示")
-    private String da18;
-
-
-    @ApiModelProperty(value = "不展示")
-    private String da19;
-
-
-    @ApiModelProperty(value = "不展示")
-    private String da20;
-
-
-    @ApiModelProperty(value = "不展示")
-    private String da21;
-
-
-    @ApiModelProperty(value = "不展示")
-    private String da22;
-
-
-    @ApiModelProperty(value = "不展示")
-    private String da23;
-
-
-    @ApiModelProperty(value = "不展示")
-    private String da24;
-
-
-    @ApiModelProperty(value = "不展示")
-    private String da25;
-
-
-    @ApiModelProperty(value = "不展示")
-    private String da26;
-
-
-    @ApiModelProperty(value = "不展示")
-    private String da27;
-
-
-    @ApiModelProperty(value = "不展示")
-    private String da28;
-
-
-    @ApiModelProperty(value = "不展示")
-    private String da29;
-
-    @ApiModelProperty(value = "不展示")
-    private String da30;
-    @ApiModelProperty(value = "不展示")
-    private String da31;
-    @ApiModelProperty(value = "不展示")
-    private String da32;
-    @ApiModelProperty(value = "不展示")
-    private String da33;
-    @ApiModelProperty(value = "不展示")
-    private String da34;
-    @ApiModelProperty(value = "不展示")
-    private String da35;
-    @ApiModelProperty(value = "不展示")
-    private String da36;
-    @ApiModelProperty(value = "不展示")
-    private String da37;
-    @ApiModelProperty(value = "不展示")
-    private String da38;
-    @ApiModelProperty(value = "不展示")
-    private String da39;
-
-    @ApiModelProperty(value = "不展示")
-    private String da40;
-    @ApiModelProperty(value = "不展示")
-    private String da41;
-    @ApiModelProperty(value = "不展示")
-    private String da42;
-    @ApiModelProperty(value = "不展示")
-    private String da43;
-    @ApiModelProperty(value = "不展示")
-    private String da44;
-    @ApiModelProperty(value = "不展示")
-    private String da45;
-    @ApiModelProperty(value = "不展示")
-    private String da46;
-    @ApiModelProperty(value = "不展示")
-    private String da47;
-    @ApiModelProperty(value = "不展示")
-    private String da48;
-    @ApiModelProperty(value = "不展示")
-    private String da49;
-
-    @ApiModelProperty(value = "不展示")
-    private String da50;
-    @ApiModelProperty(value = "不展示")
-    private String da51;
-    @ApiModelProperty(value = "不展示")
-    private String da52;
-    @ApiModelProperty(value = "不展示")
-    private String da53;
-    @ApiModelProperty(value = "不展示")
-    private String da54;
-    @ApiModelProperty(value = "不展示")
-    private String da55;
-    @ApiModelProperty(value = "不展示")
-    private String da56;
-    @ApiModelProperty(value = "不展示")
-    private String da57;
-    @ApiModelProperty(value = "不展示")
-    private String da58;
-    @ApiModelProperty(value = "不展示")
-    private String da59;
-
-    @ApiModelProperty(value = "不展示")
-    private String da60;
-    @ApiModelProperty(value = "不展示")
-    private String da61;
-    @ApiModelProperty(value = "不展示")
-    private String da62;
-    @ApiModelProperty(value = "不展示")
-    private String da63;
-    @ApiModelProperty(value = "不展示")
-    private String da64;
-    @ApiModelProperty(value = "不展示")
-    private String da65;
-    @ApiModelProperty(value = "不展示")
-    private String da66;
-    @ApiModelProperty(value = "不展示")
-    private String da67;
-    @ApiModelProperty(value = "不展示")
-    private String da68;
-    @ApiModelProperty(value = "不展示")
-    private String da69;
-
-    @ApiModelProperty(value = "不展示")
-    private String da70;
-    @ApiModelProperty(value = "不展示")
-    private String da71;
-    @ApiModelProperty(value = "不展示")
-    private String da72;
-    @ApiModelProperty(value = "不展示")
-    private String da73;
-    @ApiModelProperty(value = "不展示")
-    private String da74;
-    @ApiModelProperty(value = "不展示")
-    private String da75;
-    @ApiModelProperty(value = "不展示")
-    private String da76;
-    @ApiModelProperty(value = "不展示")
-    private String da77;
-    @ApiModelProperty(value = "不展示")
-    private String da78;
-    @ApiModelProperty(value = "不展示")
-    private String da79;
-
-    @ApiModelProperty(value = "不展示")
-    private String da80;
-    @ApiModelProperty(value = "不展示")
-    private String da81;
-    @ApiModelProperty(value = "不展示")
-    private String da82;
-    @ApiModelProperty(value = "不展示")
-    private String da83;
-    @ApiModelProperty(value = "不展示")
-    private String da84;
-    @ApiModelProperty(value = "不展示")
-    private String da85;
-    @ApiModelProperty(value = "不展示")
-    private String da86;
-    @ApiModelProperty(value = "不展示")
-    private String da87;
-    @ApiModelProperty(value = "不展示")
-    private String da88;
-    @ApiModelProperty(value = "不展示")
-    private String da89;
-    @ApiModelProperty(value = "不展示")
-    private String da90;
+    private Long totalAmountNum;
 
 
     /**
     /**
-     * 区服在第4月:活跃留存率/付费留存率/小R留存率/中R留存率/大R留存率/超大R留存率/第N天创角总人数/第N天付费总人数
+     * 区服第1天:活跃留存率/付费留存率/小R留存率/中R留存率/大R留存率/超大R留存率
      */
      */
-    @ApiModelProperty(value = "不展示")
-    private String m4;
+    private String daStr1;
+    private String daStr2;
+    private String daStr3;
+    private String daStr4;
+    private String daStr5;
+    private String daStr6;
+    private String daStr7;
+    private String daStr8;
+    private String daStr9;
+    private String daStr10;
+    private String daStr11;
+    private String daStr12;
+    private String daStr13;
+    private String daStr14;
+    private String daStr15;
+    private String daStr16;
+    private String daStr17;
+    private String daStr18;
+    private String daStr19;
+    private String daStr20;
+    private String daStr21;
+    private String daStr22;
+    private String daStr23;
+    private String daStr24;
+    private String daStr25;
+    private String daStr26;
+    private String daStr27;
+    private String daStr28;
+    private String daStr29;
+    private String daStr30;
+    private String daStr31;
+    private String daStr32;
+    private String daStr33;
+    private String daStr34;
+    private String daStr35;
+    private String daStr36;
+    private String daStr37;
+    private String daStr38;
+    private String daStr39;
+    private String daStr40;
+    private String daStr41;
+    private String daStr42;
+    private String daStr43;
+    private String daStr44;
+    private String daStr45;
+    private String daStr46;
+    private String daStr47;
+    private String daStr48;
+    private String daStr49;
+    private String daStr50;
+    private String daStr51;
+    private String daStr52;
+    private String daStr53;
+    private String daStr54;
+    private String daStr55;
+    private String daStr56;
+    private String daStr57;
+    private String daStr58;
+    private String daStr59;
+    private String daStr60;
+    private String daStr61;
+    private String daStr62;
+    private String daStr63;
+    private String daStr64;
+    private String daStr65;
+    private String daStr66;
+    private String daStr67;
+    private String daStr68;
+    private String daStr69;
+    private String daStr70;
+    private String daStr71;
+    private String daStr72;
+    private String daStr73;
+    private String daStr74;
+    private String daStr75;
+    private String daStr76;
+    private String daStr77;
+    private String daStr78;
+    private String daStr79;
+    private String daStr80;
+    private String daStr81;
+    private String daStr82;
+    private String daStr83;
+    private String daStr84;
+    private String daStr85;
+    private String daStr86;
+    private String daStr87;
+    private String daStr88;
+    private String daStr89;
+    private String daStr90;
+
+    //1-90的留存率
+    private GSServerRetentionVO daRetention1;
+    private GSServerRetentionVO daRetention2;
+    private GSServerRetentionVO daRetention3;
+    private GSServerRetentionVO daRetention4;
+    private GSServerRetentionVO daRetention5;
+    private GSServerRetentionVO daRetention6;
+    private GSServerRetentionVO daRetention7;
+    private GSServerRetentionVO daRetention8;
+    private GSServerRetentionVO daRetention9;
+    private GSServerRetentionVO daRetention10;
+    private GSServerRetentionVO daRetention11;
+    private GSServerRetentionVO daRetention12;
+    private GSServerRetentionVO daRetention13;
+    private GSServerRetentionVO daRetention14;
+    private GSServerRetentionVO daRetention15;
+    private GSServerRetentionVO daRetention16;
+    private GSServerRetentionVO daRetention17;
+    private GSServerRetentionVO daRetention18;
+    private GSServerRetentionVO daRetention19;
+    private GSServerRetentionVO daRetention20;
+    private GSServerRetentionVO daRetention21;
+    private GSServerRetentionVO daRetention22;
+    private GSServerRetentionVO daRetention23;
+    private GSServerRetentionVO daRetention24;
+    private GSServerRetentionVO daRetention25;
+    private GSServerRetentionVO daRetention26;
+    private GSServerRetentionVO daRetention27;
+    private GSServerRetentionVO daRetention28;
+    private GSServerRetentionVO daRetention29;
+    private GSServerRetentionVO daRetention30;
+    private GSServerRetentionVO daRetention31;
+    private GSServerRetentionVO daRetention32;
+    private GSServerRetentionVO daRetention33;
+    private GSServerRetentionVO daRetention34;
+    private GSServerRetentionVO daRetention35;
+    private GSServerRetentionVO daRetention36;
+    private GSServerRetentionVO daRetention37;
+    private GSServerRetentionVO daRetention38;
+    private GSServerRetentionVO daRetention39;
+    private GSServerRetentionVO daRetention40;
+    private GSServerRetentionVO daRetention41;
+    private GSServerRetentionVO daRetention42;
+    private GSServerRetentionVO daRetention43;
+    private GSServerRetentionVO daRetention44;
+    private GSServerRetentionVO daRetention45;
+    private GSServerRetentionVO daRetention46;
+    private GSServerRetentionVO daRetention47;
+    private GSServerRetentionVO daRetention48;
+    private GSServerRetentionVO daRetention49;
+    private GSServerRetentionVO daRetention50;
+    private GSServerRetentionVO daRetention51;
+    private GSServerRetentionVO daRetention52;
+    private GSServerRetentionVO daRetention53;
+    private GSServerRetentionVO daRetention54;
+    private GSServerRetentionVO daRetention55;
+    private GSServerRetentionVO daRetention56;
+    private GSServerRetentionVO daRetention57;
+    private GSServerRetentionVO daRetention58;
+    private GSServerRetentionVO daRetention59;
+    private GSServerRetentionVO daRetention60;
+    private GSServerRetentionVO daRetention61;
+    private GSServerRetentionVO daRetention62;
+    private GSServerRetentionVO daRetention63;
+    private GSServerRetentionVO daRetention64;
+    private GSServerRetentionVO daRetention65;
+    private GSServerRetentionVO daRetention66;
+    private GSServerRetentionVO daRetention67;
+    private GSServerRetentionVO daRetention68;
+    private GSServerRetentionVO daRetention69;
+    private GSServerRetentionVO daRetention70;
+    private GSServerRetentionVO daRetention71;
+    private GSServerRetentionVO daRetention72;
+    private GSServerRetentionVO daRetention73;
+    private GSServerRetentionVO daRetention74;
+    private GSServerRetentionVO daRetention75;
+    private GSServerRetentionVO daRetention76;
+    private GSServerRetentionVO daRetention77;
+    private GSServerRetentionVO daRetention78;
+    private GSServerRetentionVO daRetention79;
+    private GSServerRetentionVO daRetention80;
+    private GSServerRetentionVO daRetention81;
+    private GSServerRetentionVO daRetention82;
+    private GSServerRetentionVO daRetention83;
+    private GSServerRetentionVO daRetention84;
+    private GSServerRetentionVO daRetention85;
+    private GSServerRetentionVO daRetention86;
+    private GSServerRetentionVO daRetention87;
+    private GSServerRetentionVO daRetention88;
+    private GSServerRetentionVO daRetention89;
+    private GSServerRetentionVO daRetention90;
 
 
-    /**
-     * 区服在第5月:活跃留存率/付费留存率/小R留存率/中R留存率/大R留存率/超大R留存率/第N天创角总人数/第N天付费总人数
-     */
-    @ApiModelProperty(value = "不展示")
-    private String m5;
-
-    /**
-     * 区服在第6月:活跃留存率/付费留存率/小R留存率/中R留存率/大R留存率/超大R留存率/第N天创角总人数/第N天付费总人数
-     */
-    @ApiModelProperty(value = "不展示")
-    private String m6;
 
 
-    /**
-     * 区服在第7月:活跃留存率/付费留存率/小R留存率/中R留存率/大R留存率/超大R留存率/第N天创角总人数/第N天付费总人数
-     */
-    @ApiModelProperty(value = "不展示")
-    private String m7;
 
 
-    /**
-     * 区服在第8月:活跃留存率/付费留存率/小R留存率/中R留存率/大R留存率/超大R留存率/第N天创角总人数/第N天付费总人数
-     */
-    @ApiModelProperty(value = "不展示")
-    private String m8;
 
 
-    /**
-     * 区服在第9月:活跃留存率/付费留存率/小R留存率/中R留存率/大R留存率/超大R留存率/第N天创角总人数/第N天付费总人数
-     */
-    @ApiModelProperty(value = "不展示")
-    private String m9;
 
 
-    /**
-     * 区服在第10月:活跃留存率/付费留存率/小R留存率/中R留存率/大R留存率/超大R留存率/第N天创角总人数/第N天付费总人数
-     */
-    @ApiModelProperty(value = "不展示")
-    private String m10;
-
-    /**
-     * 区服在第11月:活跃留存率/付费留存率/小R留存率/中R留存率/大R留存率/超大R留存率/第N天创角总人数/第N天付费总人数
-     */
-    @ApiModelProperty(value = "不展示")
-    private String m11;
-
-    /**
-     * 区服在第1年:活跃留存率/付费留存率/小R留存率/中R留存率/大R留存率/超大R留存率/第N天创角总人数/第N天付费总人数
-     */
-    @ApiModelProperty(value = "不展示")
-    private String m12;
-
-//    /**
-//     * 区服至今:活跃留存率/付费留存率/小R留存率/中R留存率/大R留存率/超大R留存率/第N天创角总人数/第N天付费总人数
-//     */
-//    @ApiModelProperty(value = "区服至今总数据")
-//    private GameServerTrendVO totalTrend;
-
-    /**
-     * 昨日区服数据:活跃留存率/付费留存率/小R留存率/中R留存率/大R留存率/超大R留存率/第N天创角总人数/第N天付费总人数
-     */
-    @ApiModelProperty(value = "不展示")
-    private String yesterday;
 
 
 
 
 
 

+ 52 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/vo/GSServerRetentionVO.java

@@ -0,0 +1,52 @@
+package com.zanxiang.game.data.serve.pojo.vo;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * packageName com.zanxiang.game.data.serve.pojo.vo
+ *
+ * @author ZhangXianyu
+ * @date 2024/4/7
+ * @description GS区服留存VO
+ */
+@Data
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
+public class GSServerRetentionVO {
+    /**
+     * 活跃留存率
+     */
+    private String activeRetention;
+    /**
+     * 付费留存率
+     */
+    private String PaidRetentionRate;
+    /**
+     * 小R留存率
+     */
+    private String smallR;
+    /**
+     * 中R留存率
+     */
+    private String mediumR;
+    /**
+     * 大R留存率
+     */
+    private String largeR;
+    /**
+     * 超大R留存率
+     */
+    private String superR;
+    /**
+     * 创角总人数
+     */
+    private String totalRegNum;
+    /**
+     * 付费总人数
+     */
+    private String totalAmountNum;
+}

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

@@ -50,4 +50,12 @@ public interface IGameServerService {
      * @return
      * @return
      */
      */
     Page<GSGameServerDayVO> getGSGameServerDataDay(GSGameServerDayDTO dto);
     Page<GSGameServerDayVO> getGSGameServerDataDay(GSGameServerDayDTO dto);
+
+    /**
+     * GS区服总数据
+     * @param dto
+     * @return
+     */
+    GSGameServerDayVO getGSGameServerDataDayTotal(GSGameServerDayDTO dto);
+
 }
 }

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

@@ -0,0 +1,46 @@
+package com.zanxiang.game.data.serve.service.impl;
+
+import lombok.Data;
+
+import java.time.LocalDate;
+
+/**
+ * packageName com.zanxiang.game.data.serve.service.impl
+ *
+ * @author ZhangXianyu
+ * @date 2024/4/3
+ * @description TODO
+ */
+@Data
+public class GSGameServerTotalRVo {
+
+    /**
+     * SDK来源
+     */
+    private String sourceSystem;
+    /**
+     * 区服id
+     */
+    private Long serverId;
+    /**
+     * 游戏id
+     */
+    private Long parentGameId;
+    /**
+     * 小r
+     */
+    private String smallR ;
+    /**
+     * 中r
+     */
+    private String mediumR;
+    /**
+     * 大r
+     */
+    private String largeR;
+    /**
+     * 超大r
+     */
+    private String superR;
+
+}

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

@@ -8,6 +8,7 @@ import com.zanxiang.game.data.serve.pojo.entity.*;
 import com.zanxiang.game.data.serve.pojo.enums.OrderByEnum;
 import com.zanxiang.game.data.serve.pojo.enums.OrderByEnum;
 import com.zanxiang.game.data.serve.pojo.vo.*;
 import com.zanxiang.game.data.serve.pojo.vo.*;
 import com.zanxiang.game.data.serve.service.IGameDataService;
 import com.zanxiang.game.data.serve.service.IGameDataService;
+import com.zanxiang.game.data.serve.service.IRoleManageService;
 import com.zanxiang.game.data.serve.utils.Page;
 import com.zanxiang.game.data.serve.utils.Page;
 import com.zanxiang.module.util.DateUtil;
 import com.zanxiang.module.util.DateUtil;
 import com.zanxiang.module.util.exception.BaseException;
 import com.zanxiang.module.util.exception.BaseException;
@@ -61,6 +62,8 @@ public class GameDataServiceImpl implements IGameDataService {
     @Resource
     @Resource
     private IGameDataService basicService;
     private IGameDataService basicService;
 
 
+
+
     //用来存储映射
     //用来存储映射
     private static final List<Tuple2<Field, Field>> dayNFieldMapList;
     private static final List<Tuple2<Field, Field>> dayNFieldMapList;
     private static final List<Tuple2<Field, Field>> dayNTotalFieldMapList;
     private static final List<Tuple2<Field, Field>> dayNTotalFieldMapList;
@@ -3957,13 +3960,13 @@ public class GameDataServiceImpl implements IGameDataService {
         //三月
         //三月
         trendDay.append("""
         trendDay.append("""
                     CONCAT(
                     CONCAT(
-                      SUM(IF(DATE_ADD(a.dt, INTERVAL 2 month) <= DATE(NOW()), %sda3, 0)),'/',
-                      IFNULL(sum(%sda3),0),'/',
-                      sum(ifnull(%sda3_num,0)),'/',
+                      SUM(IF(DATE_ADD(a.dt, INTERVAL 2 month) <= DATE(NOW()), %sm3-%sda89, 0)),'/',
+                      IFNULL(sum(%sm3),0),'/',
+                      sum(ifnull(%sda90_num,0)),'/',
                       SUM(IF(DATE_ADD(a.dt, INTERVAL 2 month) <= DATE(NOW()), cost, 0)),'/',
                       SUM(IF(DATE_ADD(a.dt, INTERVAL 2 month) <= DATE(NOW()), cost, 0)),'/',
                       SUM(IF(DATE_ADD(a.dt, INTERVAL 2 month) <= DATE(NOW()), %sda1, 0))
                       SUM(IF(DATE_ADD(a.dt, INTERVAL 2 month) <= DATE(NOW()), %sda1, 0))
-                    ) AS amount_m3 ,
-                    """.formatted(type, type, type, type));
+                    ) AS amount_d90 ,
+                    """.formatted(type, type, type, type,type));
         for (int month = 4; month <= 12; month++) {
         for (int month = 4; month <= 12; month++) {
             trendDay.append("""
             trendDay.append("""
                     CONCAT(
                     CONCAT(
@@ -5691,7 +5694,7 @@ public class GameDataServiceImpl implements IGameDataService {
 
 
         //查询总记录数
         //查询总记录数
         //默认子游戏
         //默认子游戏
-        Sql countSql = Sqls.create(getCountNumSubgameSql(cri, agentCri, subGameSql,yesterdayTotalAmountCri));
+        Sql countSql = Sqls.create(getCountNumSubgameSql2(cri, agentCri, subGameSql,yesterdayTotalAmountCri));
         if (dto.getGameDimension() == 2) {
         if (dto.getGameDimension() == 2) {
             countSql = Sqls.create(getCountNumSql(cri, agentCri,yesterdayTotalAmountCri));
             countSql = Sqls.create(getCountNumSql(cri, agentCri,yesterdayTotalAmountCri));
         }
         }
@@ -5702,7 +5705,7 @@ public class GameDataServiceImpl implements IGameDataService {
 
 
         //查询sql
         //查询sql
         //默认子游戏
         //默认子游戏
-        Sql sql = Sqls.create(flowMonitorSubgameSql(cri, agentCri, yesterdayTotalAmountCri, subGameSql));
+        Sql sql = Sqls.create(flowMonitorSubgameSql2(cri, agentCri, yesterdayTotalAmountCri, subGameSql));
         if (dto.getGameDimension() == 2) {
         if (dto.getGameDimension() == 2) {
             sql = Sqls.create(flowMonitorSql(cri, agentCri, yesterdayTotalAmountCri));
             sql = Sqls.create(flowMonitorSql(cri, agentCri, yesterdayTotalAmountCri));
         }
         }
@@ -5837,7 +5840,7 @@ public class GameDataServiceImpl implements IGameDataService {
                                 """ + cri + """
                                 """ + cri + """
                                 and hour(order_create_time) < 10
                                 and hour(order_create_time) < 10
                                 group by source_system, day, pitcher_id, order_agent_id, account_id, parent_game_id,
                                 group by source_system, day, pitcher_id, order_agent_id, account_id, parent_game_id,
-                                         account_type) b
+                                         account_type,game_id) b
                                on a.source_system = b.source_system and a.day = b.day and a.agent_id = b.order_agent_id
                                on a.source_system = b.source_system and a.day = b.day and a.agent_id = b.order_agent_id
                 and a.game_id=b.parent_game_id
                 and a.game_id=b.parent_game_id
                      left join (select source_system,
                      left join (select source_system,
@@ -5852,7 +5855,7 @@ public class GameDataServiceImpl implements IGameDataService {
                                 """ + cri + """
                                 """ + cri + """
                                 and hour(order_create_time) < 14
                                 and hour(order_create_time) < 14
                                 group by source_system, day, pitcher_id, order_agent_id, account_id, parent_game_id,
                                 group by source_system, day, pitcher_id, order_agent_id, account_id, parent_game_id,
-                                         account_type) c
+                                         account_type,game_id) c
                                on a.source_system = c.source_system and a.day = c.day and a.agent_id = c.order_agent_id
                                on a.source_system = c.source_system and a.day = c.day and a.agent_id = c.order_agent_id
                 and a.game_id=c.parent_game_id
                 and a.game_id=c.parent_game_id
                      left join (select source_system,
                      left join (select source_system,
@@ -5867,7 +5870,7 @@ public class GameDataServiceImpl implements IGameDataService {
                                 """ + cri + """
                                 """ + cri + """
                                           and hour(order_create_time) < 17
                                           and hour(order_create_time) < 17
                                           group by source_system, day, pitcher_id, order_agent_id, account_id, parent_game_id,
                                           group by source_system, day, pitcher_id, order_agent_id, account_id, parent_game_id,
-                                                   account_type) d
+                                                   account_type,game_id) d
                                          on a.source_system = d.source_system and a.day = d.day and a.agent_id = d.order_agent_id
                                          on a.source_system = d.source_system and a.day = d.day and a.agent_id = d.order_agent_id
                           and a.game_id=d.parent_game_id
                           and a.game_id=d.parent_game_id
                 """
                 """
@@ -5897,7 +5900,7 @@ public class GameDataServiceImpl implements IGameDataService {
                                                                """ + cri + """
                                                                """ + cri + """
                          and order_agent_id = 0
                          and order_agent_id = 0
                          group by source_system, day, pitcher_id, zx_pitcher_name, order_agent_id, agent_name,
                          group by source_system, day, pitcher_id, zx_pitcher_name, order_agent_id, agent_name,
-                                  account_id, parent_game_id, account_type
+                                  account_id, parent_game_id, account_type,game_id
                    )a
                    )a
                 left join (
                 left join (
                              select
                              select
@@ -5913,7 +5916,7 @@ public class GameDataServiceImpl implements IGameDataService {
                            """ + cri + """
                            """ + cri + """
                                 and hour(order_create_time) < 10 and order_agent_id=0
                                 and hour(order_create_time) < 10 and order_agent_id=0
                                 group by source_system, day, pitcher_id, order_agent_id, account_id, parent_game_id,
                                 group by source_system, day, pitcher_id, order_agent_id, account_id, parent_game_id,
-                                         account_type) b
+                                         account_type,game_id) b
                                on a.source_system = b.source_system and a.day = b.day and a.order_agent_id = b.order_agent_id
                                on a.source_system = b.source_system and a.day = b.day and a.order_agent_id = b.order_agent_id
                 and a.parent_game_id=b.parent_game_id
                 and a.parent_game_id=b.parent_game_id
                      left join (select source_system,
                      left join (select source_system,
@@ -5928,7 +5931,7 @@ public class GameDataServiceImpl implements IGameDataService {
                                 """ + cri + """
                                 """ + cri + """
                                 and hour(order_create_time) < 14 and order_agent_id = 0
                                 and hour(order_create_time) < 14 and order_agent_id = 0
                                 group by source_system, day, pitcher_id, order_agent_id, account_id, parent_game_id,
                                 group by source_system, day, pitcher_id, order_agent_id, account_id, parent_game_id,
-                                         account_type) c
+                                         account_type,game_id) c
                                on a.source_system = c.source_system and a.day = c.day and a.order_agent_id = c.order_agent_id
                                on a.source_system = c.source_system and a.day = c.day and a.order_agent_id = c.order_agent_id
                 and a.parent_game_id=c.parent_game_id
                 and a.parent_game_id=c.parent_game_id
                      left join (select source_system,
                      left join (select source_system,
@@ -5943,7 +5946,7 @@ public class GameDataServiceImpl implements IGameDataService {
                                 """ + cri + """
                                 """ + cri + """
                                                                          and hour(order_create_time) < 17 and order_agent_id = 0
                                                                          and hour(order_create_time) < 17 and order_agent_id = 0
                                                                          group by source_system, day, pitcher_id, order_agent_id, account_id, parent_game_id,
                                                                          group by source_system, day, pitcher_id, order_agent_id, account_id, parent_game_id,
-                                                                                  account_type) d
+                                                                                  account_type,game_id) d
                                                                         on a.source_system = d.source_system and a.day = d.day and a.order_agent_id = d.order_agent_id
                                                                         on a.source_system = d.source_system and a.day = d.day and a.order_agent_id = d.order_agent_id
                                                          and a.parent_game_id=d.parent_game_id
                                                          and a.parent_game_id=d.parent_game_id
                                 ) f
                                 ) f
@@ -5956,8 +5959,240 @@ public class GameDataServiceImpl implements IGameDataService {
         return sql;
         return sql;
     }
     }
 
 
+
     /**
     /**
-     * 流水监控父游戏sql
+     * 流水监控子游戏总条数sql
+     *
+     * @param cri
+     * @param agentCri
+     * @return
+     */
+    private String getCountNumSubgameSql2(Criteria cri, Criteria agentCri, Criteria subGameSql,Criteria yesterdayTotalAmountCri) {
+        String sql = """
+                select count(*) from (
+                  select
+                                day as order_date,
+                                       source_system,
+                                       ten_amount,
+                                       if(yesterday_amount>0,round(ten_amount/yesterday_amount,4),0)*100 ten_rate,
+                                       fourteen_amount,
+                                       if(yesterday_amount>0,round(fourteen_amount/yesterday_amount,4),0)*100 fourteen_rate,
+                                       seventeen_amount,
+                                       if(yesterday_amount>0,round(seventeen_amount/yesterday_amount,4),0)*100 seventeen_rate,
+                                       twentyfour_amount,
+                                       if(yesterday_amount>0,round(twentyfour_amount/yesterday_amount,4),0)*100 twentyfour_rate,
+                                       yesterday_amount
+                                from (
+                                    select source_system,
+                                           day,
+                                           sum(ten_amount)             as ten_amount,
+                                           sum(fourteen_amount)        as fourteen_amount,
+                                           sum(seventeen_amount)       as seventeen_amount,
+                                           sum(twentyfour_amount)      as twentyfour_amount,
+                                           ANY_VALUE(yesterday_amount) as yesterday_amount
+                                    from (
+                                         select ifnull(x.source_system, a.source_system) as source_system,
+                                                ifnull(a.day, x.day)                     as day,
+                                                ten_amount,
+                                                fourteen_amount,
+                                                seventeen_amount,
+                                                twentyfour_amount,
+                                                (
+                                                     select sum(amount) from game_dw.dw_order_day_amount
+                                                     """+yesterdayTotalAmountCri+"""
+                                                     AND day = adddate(a.day, -1)
+                                                 )as yesterday_amount
+                                                 from (
+                                                        select source_system,
+                                                               dt as day,
+                                                               pitcher_id,
+                                                               agent_id,
+                                                               account_id,
+                                                               game_id,
+                                                               account_type
+                                                         from game_dw.dw_agent_day
+                                                          """ + agentCri + """
+                                                         group by source_system, dt, pitcher_id, agent_id, account_id, game_id,account_type
+                                                       ) a
+                                                       join (select source_system,
+                                                                    day,
+                                                                    pitcher_id,
+                                                                    zx_pitcher_name pitcher_name,
+                                                                    order_agent_id,
+                                                                    agent_name,
+                                                                    account_id,
+                                                                    parent_game_id,
+                                                                    account_type,
+                                                                    sum(amount)     twentyfour_amount,
+                                                                    game_id
+                                                               from game_dw.dw_order_day_amount
+                                                                """ + cri + """
+                                                                     AND order_agent_id != 0
+                                                                     group by source_system, day, pitcher_id, zx_pitcher_name, order_agent_id, agent_name,account_id, parent_game_id, account_type, game_id) x
+                                                               on a.source_system = x.source_system and a.day = x.day and a.agent_id = x.order_agent_id and a.game_id = x.parent_game_id
+                                                                             left join (select source_system,
+                                                                                               day,
+                                                                                               pitcher_id,
+                                                                                               order_agent_id,
+                                                                                               account_id,
+                                                                                               parent_game_id,
+                                                                                               account_type,
+                                                                                               sum(amount) ten_amount -- 10
+                                                                                                ,
+                                                                                               game_id
+                                                                                        from game_dw.dw_order_day_amount
+                                                                                          """ + cri + """
+                                                                                          and hour(order_create_time) < 10
+                                                                                          and order_agent_id != 0
+                                                                                        group by source_system, day, pitcher_id, order_agent_id,
+                                                                                                 account_id, parent_game_id,
+                                                                                                 account_type, game_id) b
+                                                                                       on x.source_system = b.source_system and x.day = b.day and
+                                                                                          x.order_agent_id = b.order_agent_id
+                                                                                           and x.game_id = b.game_id
+                                                                             left join (select source_system,
+                                                                                               day,
+                                                                                               pitcher_id,
+                                                                                               order_agent_id,
+                                                                                               account_id,
+                                                                                               parent_game_id,
+                                                                                               account_type,
+                                                                                               sum(amount) fourteen_amount -- 14
+                                                                                                ,
+                                                                                               game_id
+                                                                                        from game_dw.dw_order_day_amount
+                                                                                          """ + cri + """
+                                                                                          and hour(order_create_time) < 14
+                                                                                           and order_agent_id != 0
+                                                                                        group by source_system, day, pitcher_id, order_agent_id,
+                                                                                                 account_id, parent_game_id,
+                                                                                                 account_type, game_id) c
+                                                                                       on x.source_system = c.source_system and x.day = c.day and
+                                                                                          x.order_agent_id = c.order_agent_id
+                                                                                           and x.game_id = c.game_id
+                                                                             left join (select source_system,
+                                                                                               day,
+                                                                                               pitcher_id,
+                                                                                               order_agent_id,
+                                                                                               account_id,
+                                                                                               parent_game_id,
+                                                                                               account_type,
+                                                                                               sum(amount) seventeen_amount -- 17
+                                                                                                ,
+                                                                                               game_id
+                                                                                        from game_dw.dw_order_day_amount
+                                                                                           """ + cri + """
+                                                                                          and hour(order_create_time) < 17
+                                                                                           and order_agent_id != 0
+                                                                                        group by source_system, day, pitcher_id, order_agent_id,
+                                                                                                 account_id, parent_game_id,
+                                                                                                 account_type, game_id) d
+                                                                                       on x.source_system = d.source_system and x.day = d.day and
+                                                                                          x.order_agent_id = d.order_agent_id
+                                                                                           and x.game_id = d.game_id
+                                                                    WHERE x.source_system is not null
+                                             
+                                                                    union all
+                                             
+                                                                    select x.source_system,
+                                                                           x.day,
+                                                                           ten_amount,
+                                                                           fourteen_amount,
+                                                                           seventeen_amount,
+                                                                           twentyfour_amount,
+                                                                           (select sum(amount)
+                                                                            from game_dw.dw_order_day_amount
+                                                                            """+yesterdayTotalAmountCri+"""
+                                                                              AND day = adddate(x.day, -1)) as yesterday_amount
+                                                                    from (select source_system,
+                                                                                 day,
+                                                                                 pitcher_id,
+                                                                                 zx_pitcher_name pitcher_name,
+                                                                                 order_agent_id,
+                                                                                 agent_name,
+                                                                                 account_id,
+                                                                                 parent_game_id,
+                                                                                 account_type,
+                                                                                 sum(amount)     twentyfour_amount,
+                                                                                 game_id
+                                                                          from game_dw.dw_order_day_amount
+                                                                            """ + cri + """
+                                                                            and order_agent_id = 0
+                                                                          group by source_system, day, pitcher_id, zx_pitcher_name, order_agent_id,
+                                                                                   agent_name,
+                                                                                   account_id, parent_game_id, account_type, game_id) x
+                                             
+                                                                             left join (select source_system,
+                                                                                               day,
+                                                                                               pitcher_id,
+                                                                                               order_agent_id,
+                                                                                               account_id,
+                                                                                               parent_game_id,
+                                                                                               account_type,
+                                                                                               sum(amount) ten_amount -- 10
+                                                                                                ,
+                                                                                               game_id
+                                                                                        from game_dw.dw_order_day_amount
+                                                                                          """ + cri + """
+                                                                                          and hour(order_create_time) < 10
+                                                                                          and order_agent_id = 0
+                                                                                        group by source_system, day, pitcher_id, order_agent_id,
+                                                                                                 account_id, parent_game_id,
+                                                                                                 account_type, game_id) b
+                                                                                       on x.source_system = b.source_system and x.day = b.day and
+                                                                                          x.order_agent_id = b.order_agent_id
+                                                                                           and x.game_id = b.game_id
+                                                                             left join (select source_system,
+                                                                                               day,
+                                                                                               pitcher_id,
+                                                                                               order_agent_id,
+                                                                                               account_id,
+                                                                                               parent_game_id,
+                                                                                               account_type,
+                                                                                               sum(amount) fourteen_amount -- 14
+                                                                                                ,
+                                                                                               game_id
+                                                                                        from game_dw.dw_order_day_amount
+                                                                                          """ + cri + """
+                                                                                          and hour(order_create_time) < 14
+                                                                                          and order_agent_id = 0
+                                                                                        group by source_system, day, pitcher_id, order_agent_id,
+                                                                                                 account_id, parent_game_id,
+                                                                                                 account_type, game_id) c
+                                                                                       on x.source_system = c.source_system and x.day = c.day and
+                                                                                          x.order_agent_id = c.order_agent_id
+                                                                                           and x.game_id = c.game_id
+                                                                             left join (select source_system,
+                                                                                               day,
+                                                                                               pitcher_id,
+                                                                                               order_agent_id,
+                                                                                               account_id,
+                                                                                               parent_game_id,
+                                                                                               account_type,
+                                                                                               sum(amount) seventeen_amount -- 17
+                                                                                                ,
+                                                                                               game_id
+                                                                                        from game_dw.dw_order_day_amount
+                                                                                          """ + cri + """
+                                                                                          and hour(order_create_time) < 17
+                                                                                          and order_agent_id = 0
+                                                                                        group by source_system, day, pitcher_id, order_agent_id,
+                                                                                                 account_id, parent_game_id,
+                                                                                                 account_type, game_id) d
+                                                                                       on x.source_system = d.source_system and x.day = d.day and
+                                                                                          x.order_agent_id = d.order_agent_id
+                                                                                           and x.game_id = d.game_id
+                                                                    WHERE x.source_system is not null) a
+                                                              group by day, source_system
+                                                         )abc
+                    ) ab
+                """;
+
+        return sql;
+    }
+
+    /**
+     * 流水监控子游戏sql
      *
      *
      * @param cri
      * @param cri
      * @param agentCri
      * @param agentCri
@@ -6040,7 +6275,7 @@ public class GameDataServiceImpl implements IGameDataService {
                                 """ + cri + """
                                 """ + cri + """
                                 and hour(order_create_time) < 10
                                 and hour(order_create_time) < 10
                                 group by source_system, day, pitcher_id, order_agent_id, account_id, parent_game_id,
                                 group by source_system, day, pitcher_id, order_agent_id, account_id, parent_game_id,
-                                         account_type) b
+                                         account_type,game_id) b
                                on a.source_system = b.source_system and a.day = b.day and a.agent_id = b.order_agent_id
                                on a.source_system = b.source_system and a.day = b.day and a.agent_id = b.order_agent_id
                 and a.game_id=b.parent_game_id
                 and a.game_id=b.parent_game_id
                      left join (select source_system,
                      left join (select source_system,
@@ -6055,7 +6290,7 @@ public class GameDataServiceImpl implements IGameDataService {
                                 """ + cri + """
                                 """ + cri + """
                                 and hour(order_create_time) < 14
                                 and hour(order_create_time) < 14
                                 group by source_system, day, pitcher_id, order_agent_id, account_id, parent_game_id,
                                 group by source_system, day, pitcher_id, order_agent_id, account_id, parent_game_id,
-                                         account_type) c
+                                         account_type,game_id) c
                                on a.source_system = c.source_system and a.day = c.day and a.agent_id = c.order_agent_id
                                on a.source_system = c.source_system and a.day = c.day and a.agent_id = c.order_agent_id
                 and a.game_id=c.parent_game_id
                 and a.game_id=c.parent_game_id
                      left join (select source_system,
                      left join (select source_system,
@@ -6070,7 +6305,7 @@ public class GameDataServiceImpl implements IGameDataService {
                                 """ + cri + """
                                 """ + cri + """
                                 and hour(order_create_time) < 17
                                 and hour(order_create_time) < 17
                                 group by source_system, day, pitcher_id, order_agent_id, account_id, parent_game_id,
                                 group by source_system, day, pitcher_id, order_agent_id, account_id, parent_game_id,
-                                         account_type) d
+                                         account_type,game_id) d
                                on a.source_system = d.source_system and a.day = d.day and a.agent_id = d.order_agent_id
                                on a.source_system = d.source_system and a.day = d.day and a.agent_id = d.order_agent_id
                 and a.game_id=d.parent_game_id
                 and a.game_id=d.parent_game_id
                 """
                 """
@@ -6102,7 +6337,7 @@ public class GameDataServiceImpl implements IGameDataService {
                                                                """ + cri + """
                                                                """ + cri + """
                          and order_agent_id = 0
                          and order_agent_id = 0
                          group by source_system, day, pitcher_id, zx_pitcher_name, order_agent_id, agent_name,
                          group by source_system, day, pitcher_id, zx_pitcher_name, order_agent_id, agent_name,
-                                  account_id, parent_game_id, account_type
+                                  account_id, parent_game_id, account_type,game_id
                    )a
                    )a
                 left join (
                 left join (
                              select
                              select
@@ -6118,7 +6353,7 @@ public class GameDataServiceImpl implements IGameDataService {
                            """ + cri + """
                            """ + cri + """
                                 and hour(order_create_time) < 10 and order_agent_id=0
                                 and hour(order_create_time) < 10 and order_agent_id=0
                                 group by source_system, day, pitcher_id, order_agent_id, account_id, parent_game_id,
                                 group by source_system, day, pitcher_id, order_agent_id, account_id, parent_game_id,
-                                         account_type) b
+                                         account_type,game_id) b
                                on a.source_system = b.source_system and a.day = b.day and a.order_agent_id = b.order_agent_id
                                on a.source_system = b.source_system and a.day = b.day and a.order_agent_id = b.order_agent_id
                 and a.parent_game_id=b.parent_game_id
                 and a.parent_game_id=b.parent_game_id
                      left join (select source_system,
                      left join (select source_system,
@@ -6133,7 +6368,7 @@ public class GameDataServiceImpl implements IGameDataService {
                                 """ + cri + """
                                 """ + cri + """
                                 and hour(order_create_time) < 14 and order_agent_id = 0
                                 and hour(order_create_time) < 14 and order_agent_id = 0
                                 group by source_system, day, pitcher_id, order_agent_id, account_id, parent_game_id,
                                 group by source_system, day, pitcher_id, order_agent_id, account_id, parent_game_id,
-                                         account_type) c
+                                         account_type,game_id) c
                                on a.source_system = c.source_system and a.day = c.day and a.order_agent_id = c.order_agent_id
                                on a.source_system = c.source_system and a.day = c.day and a.order_agent_id = c.order_agent_id
                 and a.parent_game_id=c.parent_game_id
                 and a.parent_game_id=c.parent_game_id
                      left join (select source_system,
                      left join (select source_system,
@@ -6148,7 +6383,7 @@ public class GameDataServiceImpl implements IGameDataService {
                                 """ + cri + """
                                 """ + cri + """
                                 and hour(order_create_time) < 17 and order_agent_id = 0
                                 and hour(order_create_time) < 17 and order_agent_id = 0
                                 group by source_system, day, pitcher_id, order_agent_id, account_id, parent_game_id,
                                 group by source_system, day, pitcher_id, order_agent_id, account_id, parent_game_id,
-                                         account_type) d
+                                         account_type,game_id) d
                                on a.source_system = d.source_system and a.day = d.day and a.order_agent_id = d.order_agent_id
                                on a.source_system = d.source_system and a.day = d.day and a.order_agent_id = d.order_agent_id
                 and a.parent_game_id=d.parent_game_id
                 and a.parent_game_id=d.parent_game_id
                 ) f
                 ) f
@@ -6161,6 +6396,238 @@ public class GameDataServiceImpl implements IGameDataService {
         return sql;
         return sql;
     }
     }
 
 
+
+    /**
+     * 流水监控子游戏sql
+     *
+     * @param cri
+     * @param agentCri
+     * @param yesterdayTotalAmountCri
+     * @return
+     */
+    private String flowMonitorSubgameSql2(Criteria cri, Criteria agentCri, Criteria yesterdayTotalAmountCri, Criteria subGameSql) {
+        String sql = """
+                select
+                day as order_date,
+                       source_system,
+                       ten_amount,
+                       if(yesterday_amount>0,round(ten_amount/yesterday_amount,4),0)*100 ten_rate,
+                       fourteen_amount,
+                       if(yesterday_amount>0,round(fourteen_amount/yesterday_amount,4),0)*100 fourteen_rate,
+                       seventeen_amount,
+                       if(yesterday_amount>0,round(seventeen_amount/yesterday_amount,4),0)*100 seventeen_rate,
+                       twentyfour_amount,
+                       if(yesterday_amount>0,round(twentyfour_amount/yesterday_amount,4),0)*100 twentyfour_rate,
+                       yesterday_amount
+                from (
+                    select source_system,
+                           day,
+                           sum(ten_amount)             as ten_amount,
+                           sum(fourteen_amount)        as fourteen_amount,
+                           sum(seventeen_amount)       as seventeen_amount,
+                           sum(twentyfour_amount)      as twentyfour_amount,
+                           ANY_VALUE(yesterday_amount) as yesterday_amount
+                    from (
+                         select ifnull(x.source_system, a.source_system) as source_system,
+                                ifnull(a.day, x.day)                     as day,
+                                ten_amount,
+                                fourteen_amount,
+                                seventeen_amount,
+                                twentyfour_amount,
+                                (
+                                     select sum(amount) from game_dw.dw_order_day_amount
+                                     """+yesterdayTotalAmountCri+"""
+                                     AND day = adddate(a.day, -1)
+                                 )as yesterday_amount
+                                 from (
+                                        select source_system,
+                                               dt as day,
+                                               pitcher_id,
+                                               agent_id,
+                                               account_id,
+                                               game_id,
+                                               account_type
+                                         from game_dw.dw_agent_day
+                                          """ + agentCri + """
+                                         group by source_system, dt, pitcher_id, agent_id, account_id, game_id,account_type
+                                       ) a
+                                       join (select source_system,
+                                                    day,
+                                                    pitcher_id,
+                                                    zx_pitcher_name pitcher_name,
+                                                    order_agent_id,
+                                                    agent_name,
+                                                    account_id,
+                                                    parent_game_id,
+                                                    account_type,
+                                                    sum(amount)     twentyfour_amount,
+                                                    game_id
+                                               from game_dw.dw_order_day_amount
+                                                """ + cri + """
+                                                     AND order_agent_id != 0
+                                                     group by source_system, day, pitcher_id, zx_pitcher_name, order_agent_id, agent_name,account_id, parent_game_id, account_type, game_id) x
+                                               on a.source_system = x.source_system and a.day = x.day and a.agent_id = x.order_agent_id and a.game_id = x.parent_game_id
+                                                             left join (select source_system,
+                                                                               day,
+                                                                               pitcher_id,
+                                                                               order_agent_id,
+                                                                               account_id,
+                                                                               parent_game_id,
+                                                                               account_type,
+                                                                               sum(amount) ten_amount -- 10
+                                                                                ,
+                                                                               game_id
+                                                                        from game_dw.dw_order_day_amount
+                                                                          """ + cri + """
+                                                                          and hour(order_create_time) < 10
+                                                                          and order_agent_id != 0
+                                                                        group by source_system, day, pitcher_id, order_agent_id,
+                                                                                 account_id, parent_game_id,
+                                                                                 account_type, game_id) b
+                                                                       on x.source_system = b.source_system and x.day = b.day and
+                                                                          x.order_agent_id = b.order_agent_id
+                                                                           and x.game_id = b.game_id
+                                                             left join (select source_system,
+                                                                               day,
+                                                                               pitcher_id,
+                                                                               order_agent_id,
+                                                                               account_id,
+                                                                               parent_game_id,
+                                                                               account_type,
+                                                                               sum(amount) fourteen_amount -- 14
+                                                                                ,
+                                                                               game_id
+                                                                        from game_dw.dw_order_day_amount
+                                                                          """ + cri + """
+                                                                          and hour(order_create_time) < 14
+                                                                           and order_agent_id != 0
+                                                                        group by source_system, day, pitcher_id, order_agent_id,
+                                                                                 account_id, parent_game_id,
+                                                                                 account_type, game_id) c
+                                                                       on x.source_system = c.source_system and x.day = c.day and
+                                                                          x.order_agent_id = c.order_agent_id
+                                                                           and x.game_id = c.game_id
+                                                             left join (select source_system,
+                                                                               day,
+                                                                               pitcher_id,
+                                                                               order_agent_id,
+                                                                               account_id,
+                                                                               parent_game_id,
+                                                                               account_type,
+                                                                               sum(amount) seventeen_amount -- 17
+                                                                                ,
+                                                                               game_id
+                                                                        from game_dw.dw_order_day_amount
+                                                                           """ + cri + """
+                                                                          and hour(order_create_time) < 17
+                                                                           and order_agent_id != 0
+                                                                        group by source_system, day, pitcher_id, order_agent_id,
+                                                                                 account_id, parent_game_id,
+                                                                                 account_type, game_id) d
+                                                                       on x.source_system = d.source_system and x.day = d.day and
+                                                                          x.order_agent_id = d.order_agent_id
+                                                                           and x.game_id = d.game_id
+                                                    WHERE x.source_system is not null
+                                
+                                                    union all
+                                
+                                                    select x.source_system,
+                                                           x.day,
+                                                           ten_amount,
+                                                           fourteen_amount,
+                                                           seventeen_amount,
+                                                           twentyfour_amount,
+                                                           (select sum(amount)
+                                                            from game_dw.dw_order_day_amount
+                                                            """+yesterdayTotalAmountCri+"""
+                                                              AND day = adddate(x.day, -1)) as yesterday_amount
+                                                    from (select source_system,
+                                                                 day,
+                                                                 pitcher_id,
+                                                                 zx_pitcher_name pitcher_name,
+                                                                 order_agent_id,
+                                                                 agent_name,
+                                                                 account_id,
+                                                                 parent_game_id,
+                                                                 account_type,
+                                                                 sum(amount)     twentyfour_amount,
+                                                                 game_id
+                                                          from game_dw.dw_order_day_amount
+                                                            """ + cri + """
+                                                            and order_agent_id = 0
+                                                          group by source_system, day, pitcher_id, zx_pitcher_name, order_agent_id,
+                                                                   agent_name,
+                                                                   account_id, parent_game_id, account_type, game_id) x
+                                
+                                                             left join (select source_system,
+                                                                               day,
+                                                                               pitcher_id,
+                                                                               order_agent_id,
+                                                                               account_id,
+                                                                               parent_game_id,
+                                                                               account_type,
+                                                                               sum(amount) ten_amount -- 10
+                                                                                ,
+                                                                               game_id
+                                                                        from game_dw.dw_order_day_amount
+                                                                          """ + cri + """
+                                                                          and hour(order_create_time) < 10
+                                                                          and order_agent_id = 0
+                                                                        group by source_system, day, pitcher_id, order_agent_id,
+                                                                                 account_id, parent_game_id,
+                                                                                 account_type, game_id) b
+                                                                       on x.source_system = b.source_system and x.day = b.day and
+                                                                          x.order_agent_id = b.order_agent_id
+                                                                           and x.game_id = b.game_id
+                                                             left join (select source_system,
+                                                                               day,
+                                                                               pitcher_id,
+                                                                               order_agent_id,
+                                                                               account_id,
+                                                                               parent_game_id,
+                                                                               account_type,
+                                                                               sum(amount) fourteen_amount -- 14
+                                                                                ,
+                                                                               game_id
+                                                                        from game_dw.dw_order_day_amount
+                                                                          """ + cri + """
+                                                                          and hour(order_create_time) < 14
+                                                                          and order_agent_id = 0
+                                                                        group by source_system, day, pitcher_id, order_agent_id,
+                                                                                 account_id, parent_game_id,
+                                                                                 account_type, game_id) c
+                                                                       on x.source_system = c.source_system and x.day = c.day and
+                                                                          x.order_agent_id = c.order_agent_id
+                                                                           and x.game_id = c.game_id
+                                                             left join (select source_system,
+                                                                               day,
+                                                                               pitcher_id,
+                                                                               order_agent_id,
+                                                                               account_id,
+                                                                               parent_game_id,
+                                                                               account_type,
+                                                                               sum(amount) seventeen_amount -- 17
+                                                                                ,
+                                                                               game_id
+                                                                        from game_dw.dw_order_day_amount
+                                                                          """ + cri + """
+                                                                          and hour(order_create_time) < 17
+                                                                          and order_agent_id = 0
+                                                                        group by source_system, day, pitcher_id, order_agent_id,
+                                                                                 account_id, parent_game_id,
+                                                                                 account_type, game_id) d
+                                                                       on x.source_system = d.source_system and x.day = d.day and
+                                                                          x.order_agent_id = d.order_agent_id
+                                                                           and x.game_id = d.game_id
+                                                    WHERE x.source_system is not null) a
+                                              group by day, source_system
+                                              )abc
+                order by `day` desc
+                    
+                    """;
+        return sql;
+    }
+
     /**
     /**
      * 昨日总充值金额查询条件
      * 昨日总充值金额查询条件
      *
      *
@@ -6815,6 +7282,18 @@ public class GameDataServiceImpl implements IGameDataService {
         return cri;
         return cri;
     }
     }
 
 
+    /**
+     * 获取子游戏id
+     */
+    public List<Long> getSubGameId(){
+        //默认子游戏
+        Sql sql = Sqls.create("select id from dm_game_order.t_game where source_system= 'ZX_ONE'");
+        sql.setCallback(Sqls.callback.longs());
+        dao.execute(sql);
+        return sql.getList(Long.class);
+    }
+
+
     /**
     /**
      * 拼接查询条件
      * 拼接查询条件
      *
      *
@@ -6824,6 +7303,13 @@ public class GameDataServiceImpl implements IGameDataService {
     public Criteria getOrderQueryStr(FlowMonitorDTO dto) {
     public Criteria getOrderQueryStr(FlowMonitorDTO dto) {
         Criteria cri = Cnd.cri();
         Criteria cri = Cnd.cri();
 
 
+        //如果选择子游戏维度,并且没有选择游戏那么就查询所有游戏拼上条件
+//        if(dto.getGameDimension()==1&&CollectionUtils.isEmpty(dto.getGameId())){
+//           //查询游戏列表
+//            List<Long> subGameId = getSubGameId();
+//            dto.setGameId(subGameId);
+//        }
+
         //SDK类型
         //SDK类型
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
             cri.where().andEquals("source_system", dto.getSourceSystem());
             cri.where().andEquals("source_system", dto.getSourceSystem());

+ 5 - 1
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/GameMonitorAlarmServiceImpl.java

@@ -39,18 +39,21 @@ public class GameMonitorAlarmServiceImpl implements IGameMonitorAlarmService {
     @Transactional(rollbackFor = Exception.class)
     @Transactional(rollbackFor = Exception.class)
     public boolean sendMsgToUser() {
     public boolean sendMsgToUser() {
         //数据库查表
         //数据库查表
+        log.info("查询告警信息");
         Sql sql = Sqls.create(getMonitorAlarmInfoSql());
         Sql sql = Sqls.create(getMonitorAlarmInfoSql());
         sql.setCallback(Sqls.callback.entities());
         sql.setCallback(Sqls.callback.entities());
         sql.setEntity(dao.getEntity(GameMonitorAlarmVO.class));
         sql.setEntity(dao.getEntity(GameMonitorAlarmVO.class));
         dao.execute(sql);
         dao.execute(sql);
         //结果
         //结果
+        log.info("查询告警信息结束");
         try{
         try{
             List<GameMonitorAlarmVO> list1 = sql.getList(GameMonitorAlarmVO.class);
             List<GameMonitorAlarmVO> list1 = sql.getList(GameMonitorAlarmVO.class);
+            log.info("告警信息:{}", list1);
             if (CollectionUtils.isEmpty(list1)){
             if (CollectionUtils.isEmpty(list1)){
                 log.info("没有告警信息");
                 log.info("没有告警信息");
                 return true;
                 return true;
             }
             }
-
+            log.info("准备发送告警信息");
             for (GameMonitorAlarmVO vo : list1) {
             for (GameMonitorAlarmVO vo : list1) {
                 String[] pitcherIds = vo.getPitcherId().split("-");
                 String[] pitcherIds = vo.getPitcherId().split("-");
                 for (String pitcherId : pitcherIds) {
                 for (String pitcherId : pitcherIds) {
@@ -73,6 +76,7 @@ public class GameMonitorAlarmServiceImpl implements IGameMonitorAlarmService {
                 if (vo.getUserId() != null) {
                 if (vo.getUserId() != null) {
                     cri.where().andEquals("userId", vo.getUserId());
                     cri.where().andEquals("userId", vo.getUserId());
                 }
                 }
+                log.info("更新告警信息状态");
                 dao.update(AdsMonitorAlarm.class, Chain.make("warn_status", 1), cri);
                 dao.update(AdsMonitorAlarm.class, Chain.make("warn_status", 1), cri);
             }
             }
 
 

文件差异内容过多而无法显示
+ 708 - 350
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/GameServerServiceImpl.java


+ 1 - 1
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/IWebVisitLogServiceImpl.java

@@ -42,7 +42,7 @@ public class IWebVisitLogServiceImpl implements IWebVisitLogService {
         //将记录发到kafka记录
         //将记录发到kafka记录
         try {
         try {
             kafkaProducer.send(new ProducerRecord<>(this.webLogTopic,webLogJsonString));
             kafkaProducer.send(new ProducerRecord<>(this.webLogTopic,webLogJsonString));
-            log.info("发送web访问日志到kafka成功,topic:{},数据为:{}",this.webLogTopic,webLogJsonString);
+            log.error("发送web访问日志到kafka成功,topic:{},数据为:{}",this.webLogTopic,webLogJsonString);
         }catch (Exception e){
         }catch (Exception e){
             log.error("发送web访问日志到kafka失败,topic:{},数据为:{},异常为:{}",this.webLogTopic,webLogJsonString,e.toString());
             log.error("发送web访问日志到kafka失败,topic:{},数据为:{},异常为:{}",this.webLogTopic,webLogJsonString,e.toString());
         }
         }

+ 64 - 3
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/RoleManageServiceImpl.java

@@ -484,7 +484,10 @@ public class RoleManageServiceImpl implements IRoleManageService {
         //校验游戏id的超父不为2的不让发消息,cp方未提供此功能
         //校验游戏id的超父不为2的不让发消息,cp方未提供此功能
         Map<Long, GameDTO> parentGameMap = getParentGameMap();
         Map<Long, GameDTO> parentGameMap = getParentGameMap();
         GameDTO gameDTO = parentGameMap.get(dto.getGameId());
         GameDTO gameDTO = parentGameMap.get(dto.getGameId());
-        if(gameDTO!=null && gameDTO.getSuperGameId()!=2){
+        Map<Long, SuperGameDTO> superGameMap = getSuperGameMap();
+        SuperGameDTO superGameDTO = superGameMap.get(gameDTO.getSuperGameId());
+        if(superGameDTO==null
+                || StringUtils.isEmpty(superGameDTO.getCpSendMsgKey())||StringUtils.isEmpty(superGameDTO.getCpSendMsgUrl())){
             throw new BaseException(gameDTO.getGameName()+">该游戏不支持发送消息");
             throw new BaseException(gameDTO.getGameName()+">该游戏不支持发送消息");
         }
         }
         //获取当前用户id
         //获取当前用户id
@@ -771,6 +774,20 @@ public class RoleManageServiceImpl implements IRoleManageService {
         return gameDtoList.stream().collect(Collectors.toMap(GameDTO::getId, Function.identity()));
         return gameDtoList.stream().collect(Collectors.toMap(GameDTO::getId, Function.identity()));
     }
     }
 
 
+
+    /**
+     * 获取超父游戏列表
+     */
+    private Map<Long, SuperGameDTO> getSuperGameMap(){
+        Sql sql = Sqls.create(getSuperGameSql());
+        sql.setCallback(Sqls.callback.entities());
+        sql.setEntity(dao.getEntity(SuperGameDTO.class));
+        dao.execute(sql);
+        List<SuperGameDTO> gameDtoList = sql.getList(SuperGameDTO.class);
+        //将游戏拼成map key为游戏id,value为游戏名称
+        return gameDtoList.stream().collect(Collectors.toMap(SuperGameDTO::getId, Function.identity()));
+    }
+
     /**
     /**
      * 查询发送消息任务结果
      * 查询发送消息任务结果
      * @param msgTaskResultDto msgTaskResultDto
      * @param msgTaskResultDto msgTaskResultDto
@@ -864,6 +881,20 @@ public class RoleManageServiceImpl implements IRoleManageService {
                 """;
                 """;
     }
     }
 
 
+
+    /**
+     * 查询超父游戏sql
+     * @return String
+     */
+    private String getSuperGameSql() {
+        return """
+                 SELECT
+                            *
+                        FROM dm_game_order.t_game_super
+                        where source_system = 'ZX_ONE'
+                """;
+    }
+
     /**
     /**
      * 原始服-父游戏
      * 原始服-父游戏
      * @param dto RoleCombatRankingDTO
      * @param dto RoleCombatRankingDTO
@@ -1021,6 +1052,12 @@ public class RoleManageServiceImpl implements IRoleManageService {
             //默认不传查询的区服,只看最新的合服数据
             //默认不传查询的区服,只看最新的合服数据
             cri.where().andEquals("is_merge", 0);
             cri.where().andEquals("is_merge", 0);
         }
         }
+        //ture为参与过的 查询数据为1的是参与的 0是未参与的
+        if (dto.getIsParticipateMerge() != null&&dto.getIsParticipateMerge()) {
+            cri.where().andEquals("is_merge", 1);
+        }else {
+            cri.where().andEquals("is_merge", 0);
+        }
         //拼接分组条件
         //拼接分组条件
         cri.getGroupBy().groupBy("source_system" , "boss_server_id" , "parent_game_id" , "super_game_id");
         cri.getGroupBy().groupBy("source_system" , "boss_server_id" , "parent_game_id" , "super_game_id");
         //分页
         //分页
@@ -1149,8 +1186,13 @@ public class RoleManageServiceImpl implements IRoleManageService {
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
             cri.where().andEquals("source_system", dto.getSourceSystem());
             cri.where().andEquals("source_system", dto.getSourceSystem());
         }
         }
-        //原始服可以参与多次合服,只看最新一次的合服的原始服信息
-        cri.where().andEquals("is_merge", 0);
+        //原始服可以参与多次合服,只看最新一次的合服的原始服信息  是否参与过合服:1是,0否
+        if(dto.getIsParticipateMerge()!=null&&dto.getIsParticipateMerge()){
+            cri.where().andEquals("is_merge", 1);
+        }else {
+            cri.where().andEquals("is_merge", 0);
+        }
+
         /*//拼接分组条件
         /*//拼接分组条件
         cri.getGroupBy().groupBy("source_system" , "server_id" , "boss_server_id" , "super_game_id");*/
         cri.getGroupBy().groupBy("source_system" , "server_id" , "boss_server_id" , "super_game_id");*/
         //分页
         //分页
@@ -1281,6 +1323,12 @@ public class RoleManageServiceImpl implements IRoleManageService {
             //默认不传查询的区服,只看最新的合服数据
             //默认不传查询的区服,只看最新的合服数据
             cri.where().andEquals("is_merge", 0);
             cri.where().andEquals("is_merge", 0);
         }
         }
+        //ture为参与过的 查询数据为1的是参与的 0是未参与的
+        if (dto.getIsParticipateMerge() != null&&dto.getIsParticipateMerge()) {
+            cri.where().andEquals("is_merge", 1);
+        }else {
+            cri.where().andEquals("is_merge", 0);
+        }
         /*//拼接分组条件
         /*//拼接分组条件
         cri.getGroupBy().groupBy("source_system" , "boss_server_id" , "super_game_id");*/
         cri.getGroupBy().groupBy("source_system" , "boss_server_id" , "super_game_id");*/
         //分页
         //分页
@@ -2240,6 +2288,8 @@ public class RoleManageServiceImpl implements IRoleManageService {
                             ELSE '0'
                             ELSE '0'
                             END)) as vip_level, -- 角色vip等级
                             END)) as vip_level, -- 角色vip等级
                         a.game_id as role_reg_game_id, -- 角色注册游戏id
                         a.game_id as role_reg_game_id, -- 角色注册游戏id
+                        r.server_id as merge_server_id, -- 角色所在合服id
+                        r.server_name as merge_server_name, -- 角色所在合服名
                         IFNULL(d.parent_id, a.game_id) as role_reg_parent_game_id, -- 角色注册游戏的父游戏id
                         IFNULL(d.parent_id, a.game_id) as role_reg_parent_game_id, -- 角色注册游戏的父游戏id
                         IFNULL(d.super_game_id, a.game_id) as role_reg_super_game_id, -- 角色注册的超父游戏id
                         IFNULL(d.super_game_id, a.game_id) as role_reg_super_game_id, -- 角色注册的超父游戏id
                         a.server_id as server_id, -- 角色所在区服id
                         a.server_id as server_id, -- 角色所在区服id
@@ -2412,6 +2462,17 @@ public class RoleManageServiceImpl implements IRoleManageService {
                             name
                             name
                         FROM dm_game_order.t_game_super
                         FROM dm_game_order.t_game_super
                     ) s on d.source_system = s.source_system AND d.super_game_id = s.id
                     ) s on d.source_system = s.source_system AND d.super_game_id = s.id
+                    LEFT JOIN (
+                        SELECT
+                            -- 合服id、合服名称
+                            source_system,
+                            game_id,
+                            source_server_ids,
+                            server_id,
+                            server_name
+                        FROM dm_game_order.t_game_server_merge
+                        WHERE is_merge = 0 AND is_delete = 0
+                    ) r on a.source_system = r.source_system AND a.server_id = r.source_server_ids AND d.super_game_id = r.game_id
                     LEFT JOIN (
                     LEFT JOIN (
                         SELECT
                         SELECT
                             -- 原始服名
                             -- 原始服名

+ 30 - 8
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/task/GameMonitorAlarmTask.java

@@ -6,8 +6,12 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.cloud.context.config.annotation.RefreshScope;
 import org.springframework.cloud.context.config.annotation.RefreshScope;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
 import org.springframework.stereotype.Component;
 import org.springframework.stereotype.Component;
 
 
+import javax.annotation.Resource;
+import java.util.concurrent.*;
+
 /**
 /**
  * @author tianhua
  * @author tianhua
  * @version 1.0
  * @version 1.0
@@ -22,24 +26,42 @@ public class GameMonitorAlarmTask {
     @Autowired
     @Autowired
     private IGameMonitorAlarmService gameMonitorAlarmService;
     private IGameMonitorAlarmService gameMonitorAlarmService;
 
 
+    private ExecutorService taskScheduler = Executors.newSingleThreadExecutor();
+
+
     @Value("${sys-config.task_is_run}")
     @Value("${sys-config.task_is_run}")
     private boolean run;
     private boolean run;
 
 
     /**
     /**
-     * 任务每3分钟运行一次
+     * 任务每5分钟运行一次
      */
      */
-    @Scheduled(cron = "0 0/3 * * * ? ")
+    @Scheduled(cron = "0 */5 * * * *")
     public void run() {
     public void run() {
-        if (!run) {
-            return;
-        }
         log.info("游戏监控告警定时任务开始.");
         log.info("游戏监控告警定时任务开始.");
+        Future<?> future =  taskScheduler.submit(()->{
+            try {
+                if (!run) {
+                    return;
+                }
+                try {
+                    log.info("进入告警方法");
+                    gameMonitorAlarmService.sendMsgToUser();
+                    log.info("游戏监控告警定时任务结束.");
+                } catch (Exception e) {
+                    log.info("定时任务游戏监控告警出错", e);
+                }
+            }catch (Exception e){
+                log.error("定时任务游戏监控告警出错", e);
+            }
+        });
         try {
         try {
-            gameMonitorAlarmService.sendMsgToUser();
-            log.info("游戏监控告警定时任务结束.");
+            //两分钟执行不完就超时
+            future.get(120, TimeUnit.SECONDS);
         } catch (Exception e) {
         } catch (Exception e) {
-            log.info("定时任务游戏监控告警出错", e);
+            log.error("定时任务游戏监控告警超时", e);
+            future.cancel(true);
         }
         }
     }
     }
 
 
+
 }
 }

+ 39 - 19
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/task/OrderCostMonitorAlarmTask.java

@@ -4,10 +4,15 @@ import com.zanxiang.game.data.serve.service.IOrderCostMonitorAlarmService;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
 import org.springframework.stereotype.Component;
 import org.springframework.stereotype.Component;
 
 
 import javax.annotation.Resource;
 import javax.annotation.Resource;
 import java.time.LocalDateTime;
 import java.time.LocalDateTime;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
 
 
 /**
 /**
  * @author ZhangXianyu
  * @author ZhangXianyu
@@ -20,36 +25,51 @@ import java.time.LocalDateTime;
 public class OrderCostMonitorAlarmTask {
 public class OrderCostMonitorAlarmTask {
 
 
     @Resource
     @Resource
-    private IOrderCostMonitorAlarmService  orderCostMonitorAlarmService;
+    private IOrderCostMonitorAlarmService orderCostMonitorAlarmService;
 
 
     @Value("${sys-config.task_is_run}")
     @Value("${sys-config.task_is_run}")
     private boolean run;
     private boolean run;
 
 
+    private ExecutorService taskScheduler = Executors.newSingleThreadExecutor();
+
+
+
     /**
     /**
      * 任务每10分钟运行一次
      * 任务每10分钟运行一次
      */
      */
     @Scheduled(cron = "0 0/10 * * * ? ")
     @Scheduled(cron = "0 0/10 * * * ? ")
     public void run() {
     public void run() {
-        //本地不运行
-        if(!run){
-            return;
-        }
-        //0点0分到0点30分不执行
-        LocalDateTime now = LocalDateTime.now();
-        if(now.getHour() == 0 && now.getMinute() <= 30){
-            return;
-        }
-        log.info("订单与消耗监控告警定时任务开始.");
+        Future<?> future =  taskScheduler.submit(() -> {
+            log.info("订单与消耗监控告警定时任务开始.");
+            //本地不运行
+            if (!run) {
+                return;
+            }
+            //0点0分到0点30分不执行
+            LocalDateTime now = LocalDateTime.now();
+            if (now.getHour() == 0 && now.getMinute() <= 30) {
+                return;
+            }
+//        log.info("订单与消耗监控告警定时任务开始.");
+            try {
+                //监控订单表
+                orderCostMonitorAlarmService.monitorDataStatus();
+                //监控头条广告消耗表
+                orderCostMonitorAlarmService.monitorHeadCostStatus();
+                //监控腾讯广告消耗表
+                orderCostMonitorAlarmService.monitorTencentCostStatus();
+                log.info("订单与消耗监控告警定时任务结束.");
+            } catch (Exception e) {
+                log.error("定时任务订单与消耗监控告警出错", e);
+            }
+        });
         try {
         try {
-            //监控订单表
-            orderCostMonitorAlarmService.monitorDataStatus();
-            //监控头条广告消耗表
-            orderCostMonitorAlarmService.monitorHeadCostStatus();
-            //监控腾讯广告消耗表
-            orderCostMonitorAlarmService.monitorTencentCostStatus();
-            log.info("订单与消耗监控告警定时任务结束.");
+            //两分钟执行不完就超时
+            future.get(120, TimeUnit.SECONDS);
         } catch (Exception e) {
         } catch (Exception e) {
-            log.error("定时任务订单与消耗监控告警出错", e);
+            log.error("定时任务订单与消耗监控告警超时", e);
+            future.cancel(true);
         }
         }
     }
     }
+
 }
 }

+ 1 - 1
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/ManageApplication.java

@@ -23,7 +23,7 @@ public class ManageApplication {
 
 
     public static void main(String[] args) {
     public static void main(String[] args) {
         SpringApplication.run(ManageApplication.class, args);
         SpringApplication.run(ManageApplication.class, args);
-        System.out.println("赞象Manage服务启动成功 < (CP消息推送兼容配置修改´・・)ノ(._.`) \n" +
+        System.out.println("赞象Manage服务启动成功 < (客服消息已读状态在结束房间的时候更新´・・)ノ(._.`) \n" +
                 "___  ___  ___   _   _   ___  _____  _____ \n" +
                 "___  ___  ___   _   _   ___  _____  _____ \n" +
                 "|  \\/  | / _ \\ | \\ | | / _ \\|  __ \\|  ___|\n" +
                 "|  \\/  | / _ \\ | \\ | | / _ \\|  __ \\|  ___|\n" +
                 "| .  . |/ /_\\ \\|  \\| |/ /_\\ \\ |  \\/| |__  \n" +
                 "| .  . |/ /_\\ \\|  \\| |/ /_\\ \\ |  \\/| |__  \n" +

+ 9 - 1
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/websocket/KfMsgWebsocketHandler.java

@@ -320,13 +320,21 @@ public class KfMsgWebsocketHandler implements WebSocketHandler {
         kfRoomService.update(new LambdaUpdateWrapper<KfRoom>()
         kfRoomService.update(new LambdaUpdateWrapper<KfRoom>()
                 .set(KfRoom::getOnline, Boolean.FALSE)
                 .set(KfRoom::getOnline, Boolean.FALSE)
                 .set(KfRoom::getUpdateTime, LocalDateTime.now())
                 .set(KfRoom::getUpdateTime, LocalDateTime.now())
-                .eq(KfRoom::getId, roomId));
+                .eq(KfRoom::getId, roomId)
+        );
         //玩家信息更新
         //玩家信息更新
         kfSessionUserService.update(new LambdaUpdateWrapper<KfSessionUser>()
         kfSessionUserService.update(new LambdaUpdateWrapper<KfSessionUser>()
                 .set(KfSessionUser::getUpdateTime, LocalDateTime.now())
                 .set(KfSessionUser::getUpdateTime, LocalDateTime.now())
                 .eq(KfSessionUser::getOpenId, kfRoom.getOpenId())
                 .eq(KfSessionUser::getOpenId, kfRoom.getOpenId())
                 .eq(KfSessionUser::getGameId, kfRoom.getGameId())
                 .eq(KfSessionUser::getGameId, kfRoom.getGameId())
         );
         );
+        //房间消息全部变成已读状态
+        kfRoomMsgService.update(new LambdaUpdateWrapper<KfRoomMsg>()
+                .set(KfRoomMsg::getReadStatus, Boolean.TRUE)
+                .set(KfRoomMsg::getUpdateTime, LocalDateTime.now())
+                .eq(KfRoomMsg::getReadStatus, Boolean.FALSE)
+                .eq(KfRoomMsg::getRoomId, roomId)
+        );
         //推送完整的已链接房间列表
         //推送完整的已链接房间列表
         List<KfWebSocketMsgDTO.RoomBean> onlineRoomList = kfRoomService.getOnlineRoomList(gameId);
         List<KfWebSocketMsgDTO.RoomBean> onlineRoomList = kfRoomService.getOnlineRoomList(gameId);
         this.sendMessage(session, KfWebSocketMsgDTO.builder()
         this.sendMessage(session, KfWebSocketMsgDTO.builder()

部分文件因为文件数量过多而无法显示