From a346a044e359133173bdcc9031a331a55d98e0e4 Mon Sep 17 00:00:00 2001 From: gaozhaochen Date: Fri, 16 Jun 2023 10:22:21 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E6=95=8F=E6=84=9F=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=8A=A0=E5=AF=86=E8=A7=A3=E5=AF=86=E5=A4=84=E7=90=86-2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cn/sh/stc/sict/theme/config/DecodeRequestAdvice.java | 3 +-- .../java/cn/sh/stc/sict/theme/config/EncodeResponseAdvice.java | 2 +- .../hpgp/controller/mobile/HpGpIntelligentQAController.java | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/config/DecodeRequestAdvice.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/config/DecodeRequestAdvice.java index f547cf5..a00c753 100644 --- a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/config/DecodeRequestAdvice.java +++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/config/DecodeRequestAdvice.java @@ -1,6 +1,5 @@ package cn.sh.stc.sict.theme.config; -import cn.sh.stc.sict.theme.annotation.SecurityParameter; import cn.sh.stc.sict.theme.common.crypto.EncryptionRequest; import cn.sh.stc.sict.theme.common.crypto.EncryptionUtil; import com.fasterxml.jackson.databind.ObjectMapper; @@ -30,7 +29,7 @@ public class DecodeRequestAdvice implements RequestBodyAdvice { @Override public boolean supports(MethodParameter methodParameter, Type type, Class> aClass) { // 判断方法是否需要进行解密 - return methodParameter.hasMethodAnnotation(SecurityParameter.class) && methodParameter.getMethodAnnotation(SecurityParameter.class).inDecode(); + return true; } @Override diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/config/EncodeResponseAdvice.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/config/EncodeResponseAdvice.java index 7d67809..8d13da7 100644 --- a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/config/EncodeResponseAdvice.java +++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/config/EncodeResponseAdvice.java @@ -27,7 +27,7 @@ public class EncodeResponseAdvice implements ResponseBodyAdvice { @Override public boolean supports(MethodParameter methodParameter, Class aClass) { // 方法上有SecurityParameter注解的进行加密 根据需求可以在判断SecurityParameter注解中的outEncode是否为true - return methodParameter.hasMethodAnnotation(SecurityParameter.class) && methodParameter.getMethodAnnotation(SecurityParameter.class).outEncode(); + return true; } @Override diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/controller/mobile/HpGpIntelligentQAController.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/controller/mobile/HpGpIntelligentQAController.java index bddf17e..6a43f49 100644 --- a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/controller/mobile/HpGpIntelligentQAController.java +++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/controller/mobile/HpGpIntelligentQAController.java @@ -17,6 +17,7 @@ import io.swagger.annotations.ApiOperation; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -- 2.22.0