| | |
| | | import org.dromara.common.core.utils.MapstructUtils; |
| | | import org.dromara.common.core.utils.StreamUtils; |
| | | import org.dromara.common.core.utils.StringUtils; |
| | | import org.dromara.common.json.utils.JsonUtils; |
| | | import org.dromara.common.mybatis.core.page.PageQuery; |
| | | import org.dromara.common.mybatis.core.page.TableDataInfo; |
| | | import org.dromara.common.oss.constant.OssConstant; |
| | |
| | | if ("0".equals(config.getStatus())) { |
| | | RedisUtils.setCacheObject(OssConstant.DEFAULT_CONFIG_KEY, configKey); |
| | | } |
| | | CacheUtils.put(CacheNames.SYS_OSS_CONFIG, config.getConfigKey(), JsonUtils.toJsonString(config)); |
| | | CacheUtils.put(CacheNames.SYS_OSS_CONFIG, config.getConfigKey(), config); |
| | | } |
| | | } |
| | | } finally { |
| | |
| | | validEntityBeforeSave(config); |
| | | boolean flag = baseMapper.insert(config) > 0; |
| | | if (flag) { |
| | | CacheUtils.put(CacheNames.SYS_OSS_CONFIG, config.getConfigKey(), JsonUtils.toJsonString(config)); |
| | | CacheUtils.put(CacheNames.SYS_OSS_CONFIG, config.getConfigKey(), config); |
| | | } |
| | | return flag; |
| | | } |
| | |
| | | luw.eq(SysOssConfig::getOssConfigId, config.getOssConfigId()); |
| | | boolean flag = baseMapper.update(config, luw) > 0; |
| | | if (flag) { |
| | | CacheUtils.put(CacheNames.SYS_OSS_CONFIG, config.getConfigKey(), JsonUtils.toJsonString(config)); |
| | | CacheUtils.put(CacheNames.SYS_OSS_CONFIG, config.getConfigKey(), config); |
| | | } |
| | | return flag; |
| | | } |