Browse Source

【更新】更新 issues 中 #I5TY0J 文件配置中修改了上传路径,但是缓存中没有更新问题,去掉前端上传成功后的提醒为刷新列表

pull/46/head
小诺 2 years ago committed by 俞宝山
parent
commit
e7a4834d6d
  1. 8
      snowy-admin-web/src/views/dev/file/uploadForm.vue
  2. 4
      snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/service/impl/DevConfigServiceImpl.java

8
snowy-admin-web/src/views/dev/file/uploadForm.vue

@ -84,7 +84,7 @@
fileApi fileApi
.fileUploadLocalReturnUrl(fileData) .fileUploadLocalReturnUrl(fileData)
.then(() => { .then(() => {
message.success('上传成功') emit('successful')
}) })
.finally(() => { .finally(() => {
uploadLoading.value = false uploadLoading.value = false
@ -98,7 +98,7 @@
fileApi fileApi
.fileUploadAliyunReturnUrl(fileData) .fileUploadAliyunReturnUrl(fileData)
.then(() => { .then(() => {
message.success('上传成功') emit('successful')
}) })
.finally(() => { .finally(() => {
uploadLoading.value = false uploadLoading.value = false
@ -112,7 +112,7 @@
fileApi fileApi
.fileUploadTencentReturnUrl(fileData) .fileUploadTencentReturnUrl(fileData)
.then(() => { .then(() => {
message.success('上传成功') emit('successful')
}) })
.finally(() => { .finally(() => {
uploadLoading.value = false uploadLoading.value = false
@ -126,7 +126,7 @@
fileApi fileApi
.fileUploadMinioReturnUrl(fileData) .fileUploadMinioReturnUrl(fileData)
.then(() => { .then(() => {
message.success('上传成功') emit('successful')
}) })
.finally(() => { .finally(() => {
uploadLoading.value = false uploadLoading.value = false

4
snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/config/service/impl/DevConfigServiceImpl.java

@ -151,7 +151,7 @@ public class DevConfigServiceImpl extends ServiceImpl<DevConfigMapper, DevConfig
} }
devConfigList.forEach(devConfig -> { devConfigList.forEach(devConfig -> {
// 移除对应的缓存 // 移除对应的缓存
commonCacheOperator.remove(CONFIG_CACHE_KEY + devConfig.getConfigValue()); commonCacheOperator.remove(CONFIG_CACHE_KEY + devConfig.getConfigKey());
}); });
// 执行删除 // 执行删除
this.removeBatchByIds(devConfigIdList); this.removeBatchByIds(devConfigIdList);
@ -180,7 +180,7 @@ public class DevConfigServiceImpl extends ServiceImpl<DevConfigMapper, DevConfig
.eq(DevConfig::getConfigKey, devConfigBatchParam.getConfigKey()) .eq(DevConfig::getConfigKey, devConfigBatchParam.getConfigKey())
.set(DevConfig::getConfigValue, devConfigBatchParam.getConfigValue())); .set(DevConfig::getConfigValue, devConfigBatchParam.getConfigValue()));
// 移除对应的缓存 // 移除对应的缓存
commonCacheOperator.remove(CONFIG_CACHE_KEY + devConfigBatchParam.getConfigValue()); commonCacheOperator.remove(CONFIG_CACHE_KEY + devConfigBatchParam.getConfigKey());
}); });
} }
} }

Loading…
Cancel
Save