mirror of
https://gitee.com/dromara/RuoYi-Cloud-Plus.git
synced 2025-09-01 18:26:17 +00:00
fix 修复 oss服务无法连接 导致业务异常问题 查询不应该影响业务
This commit is contained in:
@@ -65,7 +65,12 @@ public class SysOssServiceImpl implements ISysOssService {
|
||||
for (Long id : ossIds) {
|
||||
SysOssVo vo = getById(id);
|
||||
if (ObjectUtil.isNotNull(vo)) {
|
||||
list.add(this.matchingUrl(vo));
|
||||
try {
|
||||
list.add(this.matchingUrl(vo));
|
||||
} catch (Exception ignored) {
|
||||
// 如果oss异常无法连接则将数据直接返回
|
||||
list.add(vo);
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
@@ -77,7 +82,12 @@ public class SysOssServiceImpl implements ISysOssService {
|
||||
for (Long id : StringUtils.splitTo(ossIds, Convert::toLong)) {
|
||||
SysOssVo vo = SpringUtils.getAopProxy(this).getById(id);
|
||||
if (ObjectUtil.isNotNull(vo)) {
|
||||
list.add(this.matchingUrl(vo).getUrl());
|
||||
try {
|
||||
list.add(this.matchingUrl(vo).getUrl());
|
||||
} catch (Exception ignored) {
|
||||
// 如果oss异常无法连接则将数据直接返回
|
||||
list.add(vo.getUrl());
|
||||
}
|
||||
}
|
||||
}
|
||||
return String.join(StringUtils.SEPARATOR, list);
|
||||
|
Reference in New Issue
Block a user