From 3817e29141dc8171878388e007172fffa17390bf Mon Sep 17 00:00:00 2001
From: xin <1099200748@qq.com>
Date: Tue, 03 Jun 2025 16:19:59 +0800
Subject: [PATCH] 响应信息主体

---
 oying-system/src/main/java/com/oying/modules/system/rest/MerchantsController.java |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/oying-system/src/main/java/com/oying/modules/system/rest/MerchantsController.java b/oying-system/src/main/java/com/oying/modules/system/rest/MerchantsController.java
index b2cafc2..6339318 100644
--- a/oying-system/src/main/java/com/oying/modules/system/rest/MerchantsController.java
+++ b/oying-system/src/main/java/com/oying/modules/system/rest/MerchantsController.java
@@ -4,6 +4,7 @@
 import com.oying.modules.system.domain.Merchants;
 import com.oying.modules.system.service.MerchantsService;
 import com.oying.modules.system.domain.dto.MerchantsQueryCriteria;
+import com.oying.utils.R;
 import lombok.RequiredArgsConstructor;
 import java.util.List;
 import org.springframework.http.HttpStatus;
@@ -39,9 +40,9 @@
     @GetMapping
     @ApiOperation("查询商户信息")
     @PreAuthorize("@el.check('merchants:list')")
-    public ResponseEntity<PageResult<Merchants>> queryMerchants(MerchantsQueryCriteria criteria){
+    public ResponseEntity<Object> queryMerchants(MerchantsQueryCriteria criteria){
         Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize());
-        return new ResponseEntity<>(merchantsService.queryAll(criteria,page),HttpStatus.OK);
+        return new ResponseEntity<>(R.success(merchantsService.queryAll(criteria,page)),HttpStatus.OK);
     }
 
     @PostMapping
@@ -50,7 +51,7 @@
     @PreAuthorize("@el.check('merchants:add')")
     public ResponseEntity<Object> createMerchants(@Validated @RequestBody Merchants resources){
         merchantsService.create(resources);
-        return new ResponseEntity<>(HttpStatus.CREATED);
+        return new ResponseEntity<>(R.success(),HttpStatus.CREATED);
     }
 
     @PutMapping
@@ -59,7 +60,7 @@
     @PreAuthorize("@el.check('merchants:edit')")
     public ResponseEntity<Object> updateMerchants(@Validated @RequestBody Merchants resources){
         merchantsService.update(resources);
-        return new ResponseEntity<>(HttpStatus.NO_CONTENT);
+        return new ResponseEntity<>(R.success(),HttpStatus.NO_CONTENT);
     }
 
     @DeleteMapping
@@ -68,6 +69,6 @@
     @PreAuthorize("@el.check('merchants:del')")
     public ResponseEntity<Object> deleteMerchants(@ApiParam(value = "传ID数组[]") @RequestBody List<Long> ids) {
         merchantsService.deleteAll(ids);
-        return new ResponseEntity<>(HttpStatus.OK);
+        return new ResponseEntity<>(R.success(),HttpStatus.OK);
     }
 }

--
Gitblit v1.9.3