| | |
| | | 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; |
| | |
| | | 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); |
| | |
| | | SysOss::getCreateTime, params.get("beginCreateTime"), params.get("endCreateTime")); |
| | | lqw.eq(ObjectUtil.isNotNull(bo.getCreateBy()), SysOss::getCreateBy, bo.getCreateBy()); |
| | | lqw.eq(StringUtils.isNotBlank(bo.getService()), SysOss::getService, bo.getService()); |
| | | lqw.orderByAsc(SysOss::getOssId); |
| | | return lqw; |
| | | } |
| | | |
| | |
| | | OssClient storage = OssFactory.instance(); |
| | | UploadResult uploadResult; |
| | | try { |
| | | uploadResult = storage.uploadSuffix(file.getBytes(), suffix, file.getContentType()); |
| | | uploadResult = storage.uploadSuffix(file.getBytes(), suffix); |
| | | } catch (IOException e) { |
| | | throw new ServiceException(e.getMessage()); |
| | | } |