zoujiajian 2 년 전
부모
커밋
0562e69d5d
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      netflix-web/src/main/java/com/cyksj/web/controller/group/GroupRelationController.java

+ 3 - 0
netflix-web/src/main/java/com/cyksj/web/controller/group/GroupRelationController.java

@@ -771,6 +771,9 @@ public class GroupRelationController {
      */
     @GetMapping("/get/questions/{goodsId}")
     public Result<List<GoodsDonQaFrontView>> getTicketQuestions(@PathVariable Long goodsId, @RequestParam(defaultValue = "1") Integer type) {
+        if (type < 1 || type > 2) {
+            return GatewayResponse.SUCCESS.newBuilder().toResult();
+        }
         String key = RedisService.key.YH_GOODS_QUESTIONS_DETAIL.getNameFormat(type, goodsId);
         Object o = redisService.get(key);
         if (o == null) {