From 6416e025afd6b3d19347610b3e441ac6a12a0f8f Mon Sep 17 00:00:00 2001
From: xin <1099200748@qq.com>
Date: Thu, 25 Sep 2025 22:59:05 +0800
Subject: [PATCH] 工具:支付配置
---
oying-tools/src/main/java/com/oying/rest/BucketStorageController.java | 24 ++++++++++++++----------
1 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/oying-tools/src/main/java/com/oying/rest/BucketStorageController.java b/oying-tools/src/main/java/com/oying/rest/BucketStorageController.java
index c0873e0..1c81b58 100644
--- a/oying-tools/src/main/java/com/oying/rest/BucketStorageController.java
+++ b/oying-tools/src/main/java/com/oying/rest/BucketStorageController.java
@@ -6,26 +6,30 @@
import com.oying.service.BucketStorageService;
import com.oying.domain.dto.BucketStorageQueryCriteria;
import com.oying.utils.FileUtil;
+import com.oying.utils.R;
import lombok.RequiredArgsConstructor;
+
import java.util.List;
+
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.*;
+
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
+
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.oying.utils.PageResult;
import org.springframework.web.multipart.MultipartFile;
/**
-* @author lixin
-* @date 2025-06-03
-**/
+ * @author lixin
+ * @date 2025-06-03
+ **/
@RestController
@RequiredArgsConstructor
-@Api(tags = "存储桶")
+@Api(tags = "工具:存储桶")
@RequestMapping("/api/bucketStorage")
public class BucketStorageController {
@@ -41,9 +45,9 @@
@GetMapping
@ApiOperation("查询存储桶")
@PreAuthorize("@el.check('bucketStorage:list')")
- public ResponseEntity<PageResult<BucketStorage>> queryBucketStorage(BucketStorageQueryCriteria criteria){
+ public ResponseEntity<Object> queryBucketStorage(BucketStorageQueryCriteria criteria) {
Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize());
- return new ResponseEntity<>(bucketStorageService.queryAll(criteria,page),HttpStatus.OK);
+ return new ResponseEntity<>(R.success(bucketStorageService.queryAll(criteria, page)), HttpStatus.OK);
}
@PostMapping
@@ -51,7 +55,7 @@
@ApiOperation("上传存储桶文件")
@PreAuthorize("@el.check('bucketStorage:add')")
public ResponseEntity<Object> create(@RequestParam String name, @RequestParam("file") MultipartFile file) {
- return new ResponseEntity<>(bucketStorageService.create(name, file), HttpStatus.CREATED);
+ return new ResponseEntity<>(R.success(bucketStorageService.create(name, file)), HttpStatus.CREATED);
}
@PostMapping("/pictures")
@@ -64,7 +68,7 @@
throw new BadRequestException("只能上传图片");
}
BucketStorage bucketStorage = bucketStorageService.create(null, file);
- return new ResponseEntity<>(bucketStorage, HttpStatus.OK);
+ return new ResponseEntity<>(R.success(bucketStorage), HttpStatus.OK);
}
@DeleteMapping
@@ -73,6 +77,6 @@
@PreAuthorize("@el.check('bucketStorage:del')")
public ResponseEntity<Object> deleteBucketStorage(@ApiParam(value = "传ID数组[]") @RequestBody List<Long> ids) {
bucketStorageService.deleteAll(ids);
- return new ResponseEntity<>(HttpStatus.OK);
+ return new ResponseEntity<>(R.success(), HttpStatus.OK);
}
}
--
Gitblit v1.9.3