Bläddra i källkod

fix : 壳包控制, 增加日志

bilingfeng 1 år sedan
förälder
incheckning
c5ed8323fc

+ 1 - 1
game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/SDKApplication.java

@@ -23,7 +23,7 @@ public class SDKApplication {
 
     public static void main(String[] args) {
         SpringApplication.run(SDKApplication.class, args);
-        System.out.println("赞象SDK服务启动成功002 ( ´・・)ノ(._.`) \n" +
+        System.out.println("赞象SDK服务启动成功003 ( ´・・)ノ(._.`) \n" +
                 " ___________ _   __\n" +
                 "/  ___|  _  \\ | / /\n" +
                 "\\ `--.| | | | |/ / \n" +

+ 5 - 1
game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/controller/InitController.java

@@ -10,6 +10,7 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiResponse;
 import io.swagger.annotations.ApiResponses;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -20,6 +21,7 @@ import org.springframework.web.bind.annotation.*;
  */
 @Api(tags = "sdk初始化接口")
 @RestController
+@Slf4j
 @RequestMapping(value = "/api/init")
 public class InitController {
 
@@ -42,6 +44,8 @@ public class InitController {
     @GetMapping("/shell/switch")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Boolean.class)})
     public ResultVO<Integer> getShellSwitch(@RequestParam String appId, @RequestParam String version) {
-        return ResultVO.ok(gameAppletShellService.getShellSwitch(appId, version));
+        Integer shellSwitch = gameAppletShellService.getShellSwitch(appId, version);
+        log.error("客保控制开关返回值, shellSwitch : {}", shellSwitch);
+        return ResultVO.ok(shellSwitch);
     }
 }

+ 1 - 0
game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/impl/GameAppletShellServiceImpl.java

@@ -40,6 +40,7 @@ public class GameAppletShellServiceImpl extends ServiceImpl<GameAppletShellMappe
 
     @Override
     public Integer getShellSwitch(String appId, String version) {
+        log.error("壳包接口收到请求, appId : {}, version : {}", appId, version);
         GameExt gameExt = gameExtService.getByGameAppId(appId);
         if (gameExt == null) {
             throw new BaseException("游戏参数设置错误, 游戏信息不存在");

+ 2 - 0
game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/impl/LoginServiceImpl.java

@@ -124,6 +124,7 @@ public class LoginServiceImpl implements IRegisterLoginService {
             //返回登录信息
             UserLoginVO userLoginVO = this.createUserLoginVO(user, userData);
             userLoginVO.setAppletShellSwitch(gameAppletShellService.getUserShellSwitch(user, Boolean.FALSE));
+            log.error("返回用户登录信息, userLoginVO : {}", JsonUtil.toString(userLoginVO));
             return ResultVO.ok(userLoginVO);
         }
         //用户注册
@@ -131,6 +132,7 @@ public class LoginServiceImpl implements IRegisterLoginService {
         //返回登录信息
         UserLoginVO userLoginVO = this.createUserLoginVO(user, userData);
         userLoginVO.setAppletShellSwitch(gameAppletShellService.getUserShellSwitch(user, Boolean.TRUE));
+        log.error("返回用户登录信息, userLoginVO : {}", JsonUtil.toString(userLoginVO));
         return ResultVO.ok(userLoginVO);
     }