This commit is contained in:
xiangwbs
2018-04-16 21:40:00 +08:00
parent a802d8b4bf
commit 6629aab29d
2 changed files with 11 additions and 17 deletions
@@ -73,6 +73,16 @@ public class SysConfigService {
return result;
}
/**
* 根据code查找配置
*
* @param code
* @return
*/
public SysConfig getByCode(String code) {
return sysConfigRepository.getByCode(code);
}
/**
* 修改
*
@@ -86,6 +96,7 @@ public class SysConfigService {
throw new BusinessException("该配置项不存在");
}
old.setValue(sysConfig.getValue());
old.setName(sysConfig.getName());
old.setEnable(sysConfig.getEnable());
old.setModifiedTime(new Date());
SysConfig save = sysConfigRepository.save(old);
@@ -98,16 +109,6 @@ public class SysConfigService {
return result;
}
/**
* 根据code查找配置
*
* @param code
* @return
*/
public SysConfig getByCode(String code) {
return sysConfigRepository.getByCode(code);
}
/**
* 根据状态获取配置列表
*