Forráskód Böngészése

1.添加新游戏 gameType=16.添加一个测试服务器的sql连接代码

slambb 1 éve
szülő
commit
5f87f65e58

+ 7 - 0
SmartBowBusinessServer3/src/main/java/com/example/demo/common/GlobalRoot.java

@@ -29,6 +29,13 @@ public class GlobalRoot {
                 config.put("port", 3306);
                 config.put("username", "admin");
                 config.put("password", "smartbow+2023_03_07-haha+1234567");
+            } else if(GlobalConfig.serverConfig.getServerIndex() == -1){
+                //本地测试
+                System.out.println("初始化设置=>测试数据库!");
+                config.put("host", "127.0.0.1");
+                config.put("port", 3306);
+                config.put("username", "root");
+                config.put("password", "9ab8fad748dead93");
             }
         } else {
             config.put("username", LocalTestConfig.instance.getDataBaseUsername());

+ 3 - 3
SmartBowBusinessServer3/src/main/java/com/example/demo/module/rank/RankComp.java

@@ -138,8 +138,8 @@ public class RankComp {
         RankService.ins.updateGameScore(gameType, p1ID, (int)Ra);
         RankService.ins.updateGameScore(gameType, p2ID, (int)Rb);
     }
-    //单机游戏 FruitMaster:15,WildAttack:14,DuckHunter:13
-    public static List<Integer> singleGameTypes = Arrays.asList(new Integer[]{15, 14, 13});
+    //单机游戏 FruitMaster:15,WildAttack:14,DuckHunter:13, MovingTarget:16
+    public static List<Integer> singleGameTypes = Arrays.asList(new Integer[]{15, 14, 13, 16});
 
     //上传用户单机游戏分数
     @SocketMethod(async = true)
@@ -342,7 +342,7 @@ public class RankComp {
         RankService.ins.updateSeasonGameScore(gameType, id1 , userId, Ra);
         return true;
     }
-    List<Integer> allGameTypes = Arrays.asList(new Integer[]{9, 10, 11, 12,13,14,15});
+    List<Integer> allGameTypes = Arrays.asList(new Integer[]{9, 10, 11, 12,13,14,15,16});
     //获取赛季排行版
     @SocketMethod(async = true)
     public void getSeasonRankListByGameType(