Parcourir la source

fix : 调试修改10

bilingfeng il y a 1 an
Parent
commit
1ace5f14ce

+ 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) {
         SpringApplication.run(ManageApplication.class, args);
-        System.out.println("赞象Manage服务启动成功 <调试修改05> ( ´・・)ノ(._.`) \n" +
+        System.out.println("赞象Manage服务启动成功 <调试修改10> ( ´・・)ノ(._.`) \n" +
                 "___  ___  ___   _   _   ___  _____  _____ \n" +
                 "|  \\/  | / _ \\ | \\ | | / _ \\|  __ \\|  ___|\n" +
                 "| .  . |/ /_\\ \\|  \\| |/ /_\\ \\ |  \\/| |__  \n" +

+ 1 - 10
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/controller/ChoiceController.java

@@ -1,7 +1,6 @@
 package com.zanxiang.game.module.manage.controller;
 
 import com.zanxiang.erp.security.annotation.PreAuthorize;
-import com.zanxiang.erp.security.util.SecurityUtil;
 import com.zanxiang.game.module.base.pojo.enums.GameCategoryEnum;
 import com.zanxiang.game.module.base.pojo.enums.OsEnum;
 import com.zanxiang.game.module.base.pojo.enums.PayApplicationTypeEnum;
@@ -11,7 +10,6 @@ import com.zanxiang.game.module.manage.pojo.vo.*;
 import com.zanxiang.game.module.manage.service.*;
 import com.zanxiang.module.util.bean.BeanUtil;
 import com.zanxiang.module.util.pojo.ResultVO;
-import com.zanxiang.module.web.util.IpUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiResponse;
@@ -22,7 +20,6 @@ import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
-import javax.servlet.http.HttpServletRequest;
 import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
@@ -109,13 +106,7 @@ public class ChoiceController {
     @GetMapping(value = "/game/category/list")
     @PreAuthorize(permissionKey = "manage:gameCategoryChoice:list")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = GameCategoryChoiceVO.class, responseContainer = "list")})
-    public ResultVO<List<GameCategoryChoiceVO>> gameCategoryChoiceList(HttpServletRequest request) {
-
-        if (SecurityUtil.getUserId() == 413) {
-            log.error("----------------> 2222222222222222222, ip : {}, ua : {}, token : {}",
-                    IpUtil.getRealIp(request), request.getHeader("User-Agent"), SecurityUtil.getToken());
-        }
-
+    public ResultVO<List<GameCategoryChoiceVO>> gameCategoryChoiceList() {
         return ResultVO.ok(Arrays.stream(GameCategoryEnum.values())
                 .map(gameCategoryEnum -> BeanUtil.copy(gameCategoryEnum, GameCategoryChoiceVO.class))
                 .collect(Collectors.toList()));

+ 1 - 11
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/controller/KfMsgController.java

@@ -1,7 +1,6 @@
 package com.zanxiang.game.module.manage.controller;
 
 import com.zanxiang.erp.security.annotation.PreAuthorize;
-import com.zanxiang.erp.security.util.SecurityUtil;
 import com.zanxiang.game.module.manage.pojo.params.KfApiParam;
 import com.zanxiang.game.module.manage.pojo.params.KfUserUpdateParam;
 import com.zanxiang.game.module.manage.pojo.vo.KfGameVO;
@@ -9,7 +8,6 @@ import com.zanxiang.game.module.manage.service.IKfMsgService;
 import com.zanxiang.game.module.manage.service.IKfUserService;
 import com.zanxiang.module.util.JsonUtil;
 import com.zanxiang.module.util.pojo.ResultVO;
-import com.zanxiang.module.web.util.IpUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiResponse;
@@ -21,7 +19,6 @@ import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 import reactor.util.function.Tuple2;
 
-import javax.servlet.http.HttpServletRequest;
 import java.util.List;
 
 /**
@@ -46,9 +43,6 @@ public class KfMsgController {
     @PreAuthorize(permissionKey = "manage:kf:uploadMsg")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Tuple2.class)})
     public ResultVO<Tuple2<String, String>> uploadMsg(String param, MultipartFile files) {
-        if (SecurityUtil.getUserId() == 413) {
-            log.error("----------------> 1111111111111111111, param : {}", param);
-        }
         return ResultVO.ok(kfMsgService.uploadMsg(JsonUtil.toObj(param, KfApiParam.class), files));
     }
 
@@ -64,11 +58,7 @@ public class KfMsgController {
     @PostMapping(value = "/comm/api")
     @PreAuthorize(permissionKey = "manage:kf:commApi")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = String.class)})
-    public ResultVO<String> list(@Validated @RequestBody KfApiParam param, HttpServletRequest request) {
-        if (SecurityUtil.getUserId() == 413) {
-            log.error("----------------> 888888888888888, param : {}, ip : {}, ua : {}, token : {}",
-                    JsonUtil.toString(param), IpUtil.getRealIp(request), request.getHeader("User-Agent"), SecurityUtil.getToken());
-        }
+    public ResultVO<String> list(@Validated @RequestBody KfApiParam param) {
         return ResultVO.ok(kfMsgService.kfApi(param));
     }
 

+ 1 - 1
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/KfUserServiceImpl.java

@@ -43,7 +43,7 @@ public class KfUserServiceImpl extends ServiceImpl<KfUserMapper, KfUser> impleme
                 .eq(KfUser::getAppId, appId));
         if (kfUser == null) {
             log.error("参数错误, 客服用户信息不存在, kfUserId : {}, appId : {}", kfUserId, appId);
-            throw new RuntimeException("参数错误, 客服用户信息不存在");
+            throw new BaseException("参数错误, 客服用户信息不存在");
         }
         return kfUser;
     }

+ 0 - 1
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/websocket/KfMsgWebsocketHeartbeat.java

@@ -30,7 +30,6 @@ public class KfMsgWebsocketHeartbeat {
      */
     @Scheduled(cron = "0/20 * * * * ?")
     public void sessionHeartbeat() {
-        log.error("定时器心跳执行 --------------> ");
         List<WebSocketSession> sessionList = kfMsgWebSocketSessionRegistry.getAllSessions();
         if (CollectionUtils.isEmpty(sessionList)) {
             return;