mirror of
https://gitee.com/dromara/RuoYi-Cloud-Plus.git
synced 2026-05-05 03:21:29 +08:00
add 增加ruoyi-resource资源模块 移除ruoyi-file模块 调整项目结构
This commit is contained in:
@@ -34,14 +34,6 @@ public class SysConfigServiceImpl implements ISysConfigService {
|
||||
|
||||
private final SysConfigMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 项目启动时,初始化参数到缓存
|
||||
*/
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
loadingConfigCache();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo<SysConfig> selectPageConfigList(SysConfig config, PageQuery pageQuery) {
|
||||
Map<String, Object> params = config.getParams();
|
||||
@@ -128,7 +120,13 @@ public class SysConfigServiceImpl implements ISysConfigService {
|
||||
*/
|
||||
@Override
|
||||
public int updateConfig(SysConfig config) {
|
||||
int row = baseMapper.updateById(config);
|
||||
int row = 0;
|
||||
if (config.getConfigId() != null) {
|
||||
row = baseMapper.updateById(config);
|
||||
} else {
|
||||
row = baseMapper.update(config, new LambdaQueryWrapper<SysConfig>()
|
||||
.eq(SysConfig::getConfigKey, config.getConfigKey()));
|
||||
}
|
||||
if (row > 0) {
|
||||
RedisUtils.setCacheObject(getCacheKey(config.getConfigKey()), config.getConfigValue());
|
||||
}
|
||||
|
||||
@@ -39,14 +39,6 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService {
|
||||
private final SysDictTypeMapper baseMapper;
|
||||
private final SysDictDataMapper dictDataMapper;
|
||||
|
||||
/**
|
||||
* 项目启动时,初始化字典到缓存
|
||||
*/
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
loadingDictCache();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo<SysDictType> selectPageDictTypeList(SysDictType dictType, PageQuery pageQuery) {
|
||||
Map<String, Object> params = dictType.getParams();
|
||||
|
||||
Reference in New Issue
Block a user