update 优化 pr57 代码结构
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 的URL,临时URL时长为100s
|
||||
*/
|
||||
// 仅修改桶类型为 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…
Reference in New Issue