Selaa lähdekoodia

fix : 删除调试日志

bilingfeng 11 kuukautta sitten
vanhempi
commit
708c147dd1

+ 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服务启动成功 <解决导量玩家重回小程序充值userId不正确的问题3> ( ´・・)ノ(._.`) \n" +
+        System.out.println("赞象SDK服务启动成功 <删除调试日志> ( ´・・)ノ(._.`) \n" +
                 " ___________ _   __\n" +
                 "/  ___|  _  \\ | / /\n" +
                 "\\ `--.| | | | |/ / \n" +

+ 0 - 3
game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/controller/AppletController.java

@@ -50,9 +50,6 @@ public class AppletController {
     public String appletMsgCheck(@PathVariable("appId") String appId, @RequestParam String signature,
                                  @RequestParam String timestamp, @RequestParam String nonce,
                                  @RequestParam String echostr) throws Exception {
-        log.error("接收到认证请求, appId : {}", appId);
-        log.error("aaaa, appId : {}, signature : {}, timestamp : {}, nonce : {}, echoStr : {}",
-                appId, signature, timestamp, nonce, echostr);
         return gameAppletService.appletMsgCheck(appId, signature, timestamp, nonce, echostr);
     }
 

+ 2 - 0
game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/handler/GlobalExceptionHandler.java

@@ -46,6 +46,7 @@ public class GlobalExceptionHandler {
      */
     @ExceptionHandler(BindException.class)
     public ResultVO<?> validatedBindException(BindException e) {
+        log.error(e.getMessage(), e);
         String message = e.getAllErrors().get(0).getDefaultMessage();
         return ResultVO.fail(message);
     }
@@ -55,6 +56,7 @@ public class GlobalExceptionHandler {
      */
     @ExceptionHandler(MethodArgumentNotValidException.class)
     public ResultVO<?> validExceptionHandler(MethodArgumentNotValidException e) {
+        log.error(e.getMessage(), e);
         String message = e.getBindingResult().getFieldError().getDefaultMessage();
         return ResultVO.fail(message);
     }

+ 2 - 7
game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/impl/GameAppletServiceImpl.java

@@ -60,20 +60,16 @@ public class GameAppletServiceImpl extends ServiceImpl<GameAppletMapper, GameApp
 
     @Override
     public String appletMsgCheck(String appId, String signature, String timestamp, String nonce, String echoStr) throws Exception {
-        log.error("appId : {}, signature : {}, timestamp : {}, nonce : {}, echoStr : {}",
-                appId, signature, timestamp, nonce, echoStr);
+        log.error("appId : {}, signature : {}, timestamp : {}, nonce : {}, echoStr : {}", appId, signature, timestamp, nonce, echoStr);
         GameAppletDTO gameAppletDTO = this.getByAppId(appId);
-        log.error("gameAppletDTO : {}", JsonUtil.toString(gameAppletDTO));
         GameAppletDTO.MsgConfigBean msgConfigBean = gameAppletDTO.getMsgConfigBean();
         if (msgConfigBean == null) {
             throw new BaseException("参数错误, 小游戏应用缺少消息推送配置");
         }
         String mySignature = SignUtil.SHA1(msgConfigBean.getMsgPushToken(), timestamp, nonce);
-        log.error("mySignature : {}, signature : {}", mySignature, signature);
         if (!Objects.equals(mySignature, signature)) {
             throw new BaseException("验证签名不匹配");
         }
-        log.error("返回腾讯信息, echoStr : {}", echoStr);
         return echoStr;
     }
 
@@ -169,11 +165,10 @@ public class GameAppletServiceImpl extends ServiceImpl<GameAppletMapper, GameApp
 
     @Override
     public GameAppletDTO getByAppId(String appId) {
-        log.error("22222 appId : {}", appId);
         GameApplet gameApplet = super.getOne(new LambdaQueryWrapper<GameApplet>()
                 .eq(GameApplet::getAppId, appId));
         if (gameApplet == null) {
-            log.error("查询到的小程序信息为空");
+            log.error("参数错误, 游戏小程序信息不存在, appId : {}", appId);
             throw new BaseException("参数错误, 游戏小程序信息不存在");
         }
         return BeanUtil.copy(gameApplet, GameAppletDTO.class);