deason před 6 roky
rodič
revize
93ab19c5f0

+ 3 - 3
examcloud-core-print-common/src/main/java/cn/com/qmth/examcloud/core/print/common/Constants.java

@@ -18,16 +18,16 @@ public interface Constants {
     /**
      * 系统错误
      */
-    String OE_CODE_500 = "PRT-000500";
+    String PRT_CODE_500 = "PRT-000500";
 
     /**
      * 参数错误
      */
-    String OE_CODE_400 = "PRT-000400";
+    String PRT_CODE_400 = "PRT-000400";
 
     /**
      * 权限错误
      */
-    String OE_CODE_403 = "PRT-000403";
+    String PRT_CODE_403 = "PRT-000403";
 
 }

+ 8 - 8
examcloud-core-print-common/src/main/java/cn/com/qmth/examcloud/core/print/common/utils/Check.java

@@ -13,7 +13,7 @@ import java.lang.reflect.Array;
 import java.util.Collection;
 import java.util.Map;
 
-import static cn.com.qmth.examcloud.core.print.common.Constants.OE_CODE_400;
+import static cn.com.qmth.examcloud.core.print.common.Constants.PRT_CODE_400;
 
 /**
  * 参数校验类
@@ -25,43 +25,43 @@ public class Check {
 
     public static void isNull(Object obj, String message) {
         if (obj == null) {
-            throw new StatusException(OE_CODE_400, message);
+            throw new StatusException(PRT_CODE_400, message);
         }
     }
 
     public static void isEmpty(Object obj, String message) {
         if (isEmpty(obj)) {
-            throw new StatusException(OE_CODE_400, message);
+            throw new StatusException(PRT_CODE_400, message);
         }
     }
 
     public static void isEmpty(Object[] array, String message) {
         if (isEmpty(array)) {
-            throw new StatusException(OE_CODE_400, message);
+            throw new StatusException(PRT_CODE_400, message);
         }
     }
 
     public static void isEmpty(Collection<?> collection, String message) {
         if (isEmpty(collection)) {
-            throw new StatusException(OE_CODE_400, message);
+            throw new StatusException(PRT_CODE_400, message);
         }
     }
 
     public static void isEmpty(Map<?, ?> map, String message) {
         if (isEmpty(map)) {
-            throw new StatusException(OE_CODE_400, message);
+            throw new StatusException(PRT_CODE_400, message);
         }
     }
 
     public static void isBlank(CharSequence str, String message) {
         if (isBlank(str)) {
-            throw new StatusException(OE_CODE_400, message);
+            throw new StatusException(PRT_CODE_400, message);
         }
     }
 
     public static void isFalse(Boolean expression, String message) {
         if (expression == null || !expression) {
-            throw new StatusException(OE_CODE_400, message);
+            throw new StatusException(PRT_CODE_400, message);
         }
     }
 

+ 1 - 0
examcloud-core-print-starter/src/main/java/cn/com/qmth/examcloud/core/print/config/RedisConfig.java

@@ -52,6 +52,7 @@ public class RedisConfig {
         ObjectMapper objectMapper = new ObjectMapper();
         objectMapper.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
         objectMapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
+        //objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
         jackson2JsonRedisSerializer.setObjectMapper(objectMapper);
         redisTemplate.setValueSerializer(jackson2JsonRedisSerializer);
         redisTemplate.setKeySerializer(new StringRedisSerializer());