mirror of
				https://github.com/dromara/RuoYi-Vue-Plus.git
				synced 2025-11-04 16:23:42 +08:00 
			
		
		
		
	fix 修复 oss服务无法连接 导致业务异常问题 查询不应该影响业务
This commit is contained in:
		@@ -66,8 +66,12 @@ public class SysOssServiceImpl implements ISysOssService, OssService {
 | 
			
		||||
        for (Long id : ossIds) {
 | 
			
		||||
            SysOssVo vo = SpringUtils.getAopProxy(this).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;
 | 
			
		||||
    }
 | 
			
		||||
@@ -78,7 +82,12 @@ public class SysOssServiceImpl implements ISysOssService, OssService {
 | 
			
		||||
        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