update 优化 pr57 代码结构

2.X
疯狂的狮子Li 2 years ago
parent f768b083ec
commit f0590487e3

@ -90,7 +90,7 @@ public class SysOssController extends BaseController {
@SaCheckPermission("system:oss:download")
@GetMapping("/download/{ossId}")
public void download(@PathVariable Long ossId, HttpServletResponse response) throws IOException {
iSysOssService.download(ossId,response);
iSysOssService.download(ossId, response);
}
/**
@ -102,7 +102,7 @@ public class SysOssController extends BaseController {
@Log(title = "OSS对象存储", businessType = BusinessType.DELETE)
@DeleteMapping("/{ossIds}")
public R<Void> remove(@NotEmpty(message = "主键不能为空") @PathVariable Long[] ossIds) {
return toAjax(iSysOssService.deleteWithValidByIds(Arrays.asList(ossIds), true) ? 1 : 0);
return toAjax(iSysOssService.deleteWithValidByIds(Arrays.asList(ossIds), true));
}
}

@ -156,11 +156,9 @@ public class SysOssServiceImpl implements ISysOssService {
*/
private SysOssVo matchingUrl(SysOssVo oss) {
OssClient storage = OssFactory.instance(oss.getService());
/**
* private URLURL100s
*/
// 仅修改桶类型为 private 的URL临时URL时长为120s
if (AccessPolicyType.PRIVATE == storage.getAccessPolicy()) {
oss.setUrl(storage.getPrivateUrl(oss.getFileName(), 100));
oss.setUrl(storage.getPrivateUrl(oss.getFileName(), 120));
}
return oss;
}

Loading…
Cancel
Save