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 f547cf5a2cb5389b8e9bf58f79862f3e8c7e707d..a00c753b3dcdca68e2f79cd8385925885ebab784 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 7d67809b4d589234cc1a42a231e2d25d8a77f89b..8d13da7077d481166100697397b1520e19c9cb4b 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 bddf17eff74e0e6ffab24610a5fb93883d35eeb0..6a43f49c0bb6c7ade49546c34821936f4825a9c2 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;