!675 线上修改 文件管理->文件配置->更换主配置 导致文件上传报错

Merge pull request !675 from 人生三两事/master
This commit is contained in:
芋道源码 2023-10-17 15:14:52 +00:00 committed by Gitee
commit ee1d5c7e60
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -58,9 +58,9 @@ public class FileConfigServiceImpl implements FileConfigService {
FileConfigDO config = Objects.equals(CACHE_MASTER_ID, id) ?
fileConfigMapper.selectByMaster() : fileConfigMapper.selectById(id);
if (config != null) {
fileClientFactory.createOrUpdateFileClient(id, config.getStorage(), config.getConfig());
fileClientFactory.createOrUpdateFileClient(config.getId(), config.getStorage(), config.getConfig());
}
return fileClientFactory.getFileClient(id);
return fileClientFactory.getFileClient(null == config ? id : config.getId());
}
});