WANG %!s(int64=5) %!d(string=hai) anos
pai
achega
b4ba0ca08d

+ 5 - 2
examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/cache/SystemPropertyCache.java

@@ -28,10 +28,13 @@ public class SystemPropertyCache extends RandomObjectRedisCache<SysPropertyCache
 	public SysPropertyCacheBean loadFromResource(Object... keys) {
 		String propKey = (String) keys[0];
 
+		SysPropertyCacheBean b = new SysPropertyCacheBean();
+
 		SystemPropertyEntity sysConf = GlobalHelper.getEntity(systemPropertyRepo, propKey,
 				SystemPropertyEntity.class);
 		if (null == sysConf) {
-			return null;
+			b.setHasValue(false);
+			return b;
 		}
 
 		String value = sysConf.getPropValue();
@@ -73,7 +76,7 @@ public class SystemPropertyCache extends RandomObjectRedisCache<SysPropertyCache
 			throw new StatusException("350003", "data type is undefined");
 		}
 
-		SysPropertyCacheBean b = new SysPropertyCacheBean();
+		b.setHasValue(true);
 		b.setValueType(propValueType);
 		b.setValue(propValue);