Kaynağa Gözat

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

bilingfeng 1 yıl önce
ebeveyn
işleme
d38e9751dd

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

@@ -1,7 +1,5 @@
 package com.zanxiang.game.data.serve.service.impl;
 
-import java.util.List;
-
 import com.google.common.base.CaseFormat;
 import com.zanxiang.game.data.serve.component.DataPowerComponent;
 import com.zanxiang.game.data.serve.pojo.dto.*;
@@ -24,11 +22,9 @@ import org.nutz.dao.sql.Criteria;
 import org.nutz.dao.sql.Sql;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import org.springframework.util.StopWatch;
 import reactor.util.function.Tuple2;
 import reactor.util.function.Tuples;
 
-import javax.annotation.Resource;
 import java.lang.reflect.Field;
 import java.lang.reflect.Modifier;
 import java.math.BigDecimal;
@@ -829,7 +825,7 @@ public class GameServerServiceImpl implements IGameServerService {
         StringBuilder sql = new StringBuilder(StringUtils.EMPTY);
         for (int i = 1; i <= 90; i++) {
             sql.append("""
-                    concat(ifnull(round(c.da%d_active_num / e.new_da%d_total_num ,4),0)*100,'/',round(ifnull((d.new_da%d_num + d.old_da%d_num) / d.new_da%d_total_num,0)*100,4),'/',IFNULL(c.da%d_reg_num,0),'/',IFNULL(c.da%d_num,0)) as da_str%d,
+                    concat(ifnull(round(c.da%d_active_num / e.new_da%d_total_num,4),0),'/',round(ifnull((d.new_da%d_num + d.old_da%d_num) / d.new_da%d_total_num,0),4),'/',IFNULL(c.da%d_reg_num,0),'/',IFNULL(c.da%d_num,0)) as da_str%d,
                      """.formatted(i, i, i, i, i, i, i, i));
 
         }
@@ -843,7 +839,7 @@ public class GameServerServiceImpl implements IGameServerService {
         StringBuilder sql = new StringBuilder(StringUtils.EMPTY);
         for (int i = 1; i <= 90; i++) {
             sql.append("""
-                    concat(ifnull(round((SUM(c.da%d_active_num) / SUM(e.new_da%d_total_num)*100) ,4),0),'/',ifnull(round(((SUM(d.new_da%d_num) + SUM(d.old_da%d_num)) / SUM(d.new_da%d_total_num))*100,4),0),'/',IFNULL(SUM(c.da%d_reg_num),0),'/',IFNULL(SUM(c.da%d_num),0)) as da_str%d,
+                    concat(ifnull(round(SUM(c.da%d_active_num) / SUM(e.new_da%d_total_num) ,4),0),'/',ifnull(round(((SUM(d.new_da%d_num) + SUM(d.old_da%d_num)) / SUM(d.new_da%d_total_num)),4),0),'/',IFNULL(SUM(c.da%d_reg_num),0),'/',IFNULL(SUM(c.da%d_num),0)) as da_str%d,
                      """.formatted(i, i, i, i, i, i, i, i));
         }
         return sql.toString();

+ 3 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/task/GameMonitorAlarmTask.java

@@ -38,9 +38,12 @@ public class GameMonitorAlarmTask {
     @Scheduled(cron = "0 */5 * * * *")
     public void run() {
         log.info("游戏监控告警定时任务开始.");
+        log.info("run{}", run);
         Future<?> future =  taskScheduler.submit(()->{
             try {
+                log.info("游戏监控在线程里开始执行");
                 if (!run) {
+                    log.info("游戏监控告警定时任务本地不执行.");
                     return;
                 }
                 try {

+ 8 - 0
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/controller/GameServerController.java

@@ -107,6 +107,14 @@ public class GameServerController {
         return ResultVO.ok(gameServerService.getServerList(gameId, Boolean.FALSE));
     }
 
+    @ApiOperation(value = "获取参与合服的区服列表")
+    @GetMapping(value = "/merge/server/list")
+    @PreAuthorize(permissionKey = "manage:gameServer:mergeServerList")
+    @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = GameServerVO.class)})
+    public ResultVO<List<GameServerVO>> mergeServerList(@RequestParam Long gameId) {
+        return ResultVO.ok(gameServerService.getServerList(gameId, Boolean.TRUE));
+    }
+
     @ApiOperation(value = "获取所有区服列表(无分页)")
     @GetMapping(value = "/all/server/list")
     @PreAuthorize(permissionKey = "manage:gameServer:allServer")