|
@@ -13,6 +13,7 @@ import cn.com.qmth.examcloud.core.basic.dao.entity.SystemPropertyEntity;
|
|
|
import cn.com.qmth.examcloud.core.basic.service.SystemPropertyService;
|
|
|
import cn.com.qmth.examcloud.core.basic.service.cache.SystemPropertyCache;
|
|
|
import cn.com.qmth.examcloud.support.cache.bean.SysPropertyCacheBean;
|
|
|
+import cn.com.qmth.examcloud.web.helpers.GlobalHelper;
|
|
|
|
|
|
/**
|
|
|
* 系统配置服务
|
|
@@ -36,7 +37,7 @@ public class SystemPropertyServiceImpl implements SystemPropertyService {
|
|
|
throw new StatusException("350001", "key is blank");
|
|
|
}
|
|
|
|
|
|
- SystemPropertyEntity sysConf = systemPropertyRepo.getOne(key);
|
|
|
+ SystemPropertyEntity sysConf = GlobalHelper.getEntity(systemPropertyRepo, key, SystemPropertyEntity.class);
|
|
|
if (null == sysConf) {
|
|
|
throw new StatusException("350002", "key is wrong");
|
|
|
}
|
|
@@ -61,8 +62,7 @@ public class SystemPropertyServiceImpl implements SystemPropertyService {
|
|
|
} else if (dataType.equals(BasicDataType.DATE)) {
|
|
|
try {
|
|
|
sysConf.setPropValue(
|
|
|
- DateUtil.format(DateUtil.parse(value, DatePatterns.CHINA_DEFAULT),
|
|
|
- DatePatterns.CHINA_DEFAULT));
|
|
|
+ DateUtil.format(DateUtil.parse(value, DatePatterns.CHINA_DEFAULT), DatePatterns.CHINA_DEFAULT));
|
|
|
} catch (Exception e) {
|
|
|
throw new StatusException("350002", "value is wrong");
|
|
|
}
|