From c1d20b425b10e8ba59f102dd1ab413055883eed0 Mon Sep 17 00:00:00 2001
From: 彭雪彬 <1724387007@qq.com>
Date: Mon, 14 Jul 2025 16:57:11 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/xin' into pxb

---
 oying-system/src/main/java/com/oying/modules/system/rest/UserStoreController.java |   77 ++++++++++++++++++++++++++++++++++++++
 1 files changed, 77 insertions(+), 0 deletions(-)

diff --git a/oying-system/src/main/java/com/oying/modules/system/rest/UserStoreController.java b/oying-system/src/main/java/com/oying/modules/system/rest/UserStoreController.java
new file mode 100644
index 0000000..e6b2bec
--- /dev/null
+++ b/oying-system/src/main/java/com/oying/modules/system/rest/UserStoreController.java
@@ -0,0 +1,77 @@
+package com.oying.modules.system.rest;
+
+import com.oying.annotation.Log;
+import com.oying.modules.system.domain.UserStore;
+import com.oying.modules.system.service.UserStoreService;
+import com.oying.modules.system.domain.dto.UserStoreQueryCriteria;
+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.validation.annotation.Validated;
+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;
+
+/**
+ * @author lixin
+ * @date 2025-06-16
+ **/
+@RestController
+@RequiredArgsConstructor
+@Api(tags = "系统:门店管理信息")
+@RequestMapping("/api/userStore")
+public class UserStoreController {
+
+    private final UserStoreService userStoreService;
+
+    @ApiOperation("导出数据")
+    @GetMapping(value = "/download")
+    @PreAuthorize("@el.check('userStore:list')")
+    public void exportUserStore(HttpServletResponse response, UserStoreQueryCriteria criteria) throws IOException {
+        userStoreService.download(userStoreService.queryAll(criteria), response);
+    }
+
+    @GetMapping
+    @ApiOperation("查询门店管理信息")
+    @PreAuthorize("@el.check('userStore:list')")
+    public ResponseEntity<Object> queryUserStore(UserStoreQueryCriteria criteria) {
+        Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize());
+        return new ResponseEntity<>(R.success(userStoreService.queryAll(criteria, page)), HttpStatus.OK);
+    }
+
+    @PostMapping
+    @Log("新增门店管理信息")
+    @ApiOperation("新增门店管理信息")
+    @PreAuthorize("@el.check('userStore:add')")
+    public ResponseEntity<Object> createUserStore(@Validated @RequestBody UserStore resources) {
+        userStoreService.create(resources);
+        return new ResponseEntity<>(R.success(), HttpStatus.CREATED);
+    }
+
+    @PutMapping
+    @Log("修改门店管理信息")
+    @ApiOperation("修改门店管理信息")
+    @PreAuthorize("@el.check('userStore:edit')")
+    public ResponseEntity<Object> updateUserStore(@Validated @RequestBody UserStore resources) {
+        userStoreService.update(resources);
+        return new ResponseEntity<>(R.success(), HttpStatus.NO_CONTENT);
+    }
+
+    @DeleteMapping
+    @Log("删除门店管理信息")
+    @ApiOperation("删除门店管理信息")
+    @PreAuthorize("@el.check('userStore:del')")
+    public ResponseEntity<Object> deleteUserStore(@ApiParam(value = "传ID数组[]") @RequestBody List<Long> ids) {
+        userStoreService.deleteAll(ids);
+        return new ResponseEntity<>(HttpStatus.OK);
+    }
+}

--
Gitblit v1.9.3