ludc
2023-03-28 bf12237f0cedf8c2a9f0fe298f457772790c7d86
Source/BladeX/blade-ops/blade-resource/src/main/java/org/springblade/resource/endpoint/OssEndpoint.java
@@ -14,7 +14,7 @@
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.resource.endpoint;
package org.springblade.Autowired.endpoint;
import io.swagger.annotations.Api;
import lombok.AllArgsConstructor;
@@ -27,9 +27,9 @@
import org.springblade.core.tool.constant.RoleConstant;
import org.springblade.core.tool.utils.FileUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.resource.builder.oss.OssBuilder;
import org.springblade.resource.entity.Attach;
import org.springblade.resource.service.IAttachService;
import org.springblade.Autowired.builder.oss.OssBuilder;
import org.springblade.Autowired.entity.Attach;
import org.springblade.Autowired.service.IAttachService;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
@@ -63,7 +63,7 @@
    */
   @SneakyThrows
   @PostMapping("/make-bucket")
   @PreAuth(RoleConstant.HAS_ROLE_ADMIN)
   //@PreAuth(RoleConstant.HAS_ROLE_ADMIN)
   public R makeBucket(@RequestParam String bucketName) {
      ossBuilder.template().makeBucket(bucketName);
      return R.success("创建成功");
@@ -77,7 +77,7 @@
    */
   @SneakyThrows
   @PostMapping("/remove-bucket")
   @PreAuth(RoleConstant.HAS_ROLE_ADMIN)
   //@PreAuth(RoleConstant.HAS_ROLE_ADMIN)
   public R removeBucket(@RequestParam String bucketName) {
      ossBuilder.template().removeBucket(bucketName);
      return R.success("删除成功");
@@ -223,7 +223,7 @@
    */
   @SneakyThrows
   @PostMapping("/remove-file")
   @PreAuth(RoleConstant.HAS_ROLE_ADMIN)
   //@PreAuth(RoleConstant.HAS_ROLE_ADMIN)
   public R removeFile(@RequestParam String fileName) {
      ossBuilder.template().removeFile(fileName);
      return R.success("操作成功");
@@ -237,7 +237,7 @@
    */
   @SneakyThrows
   @PostMapping("/remove-files")
   @PreAuth(RoleConstant.HAS_ROLE_ADMIN)
   //@PreAuth(RoleConstant.HAS_ROLE_ADMIN)
   public R removeFiles(@RequestParam String fileNames) {
      ossBuilder.template().removeFiles(Func.toStrList(fileNames));
      return R.success("操作成功");