From c67c3be16c4a9aa7c6617d43da886850d717a009 Mon Sep 17 00:00:00 2001
From: xin <1099200748@qq.com>
Date: Fri, 07 Nov 2025 14:38:26 +0800
Subject: [PATCH] 商品门店匿名访问

---
 oying-system/src/main/java/com/oying/modules/pc/store/rest/StoreCategoryMerchantController.java |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/oying-system/src/main/java/com/oying/modules/pc/store/rest/StoreCategoryMerchantController.java b/oying-system/src/main/java/com/oying/modules/pc/store/rest/StoreCategoryMerchantController.java
index d193a8e..2ebb146 100644
--- a/oying-system/src/main/java/com/oying/modules/pc/store/rest/StoreCategoryMerchantController.java
+++ b/oying-system/src/main/java/com/oying/modules/pc/store/rest/StoreCategoryMerchantController.java
@@ -6,6 +6,7 @@
 import cn.hutool.core.lang.tree.TreeUtil;
 import cn.hutool.core.util.BooleanUtil;
 import com.oying.annotation.Log;
+import com.oying.annotation.rest.AnonymousGetMapping;
 import com.oying.utils.R;
 import com.oying.modules.pc.store.domain.StoreCategory;
 import com.oying.modules.pc.store.domain.dto.*;
@@ -18,7 +19,6 @@
 import org.springframework.beans.BeanUtils;
 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.*;
 
@@ -38,7 +38,7 @@
 
     private final StoreCategoryService storeCategoryService;
 
-    @GetMapping(value = "/list")
+    @AnonymousGetMapping(value = "/list")
     @ApiOperation("查询店铺类目")
     //@PreAuthorize("@el.check('merchant:storeCategory:list')" +
     //        " and @storeMerchantOwnershipService.check(#storeId)")
@@ -126,10 +126,20 @@
     @DeleteMapping
     @Log("删除店铺类目")
     @ApiOperation("删除店铺类目")
-    @PreAuthorize("@el.check('storeCategory:del')" +
-            " and @storeMerchantOwnershipService.check(#storeId)")
+    /*@PreAuthorize("@el.check('storeCategory:del')" +
+            " and @storeMerchantOwnershipService.check(#storeId)")*/
     public ResponseEntity<?> deleteStoreCategory(@ApiParam(value = "传ID数组[]") @RequestBody List<Long> ids) {
         storeCategoryService.deleteAll(ids);
         return ResponseEntity.noContent().build();
     }
+
+    @PostMapping(value = "/delete")
+    @Log("删除店铺类目")
+    @ApiOperation("删除店铺类目")
+    /*@PreAuthorize("@el.check('storeCategory:del')" +
+            " and @storeMerchantOwnershipService.check(#storeId)")*/
+    public ResponseEntity<?> delStoreCategory(@ApiParam(value = "传ID数组[]") @RequestBody List<Long> ids) {
+        storeCategoryService.deleteAll(ids);
+        return ResponseEntity.noContent().build();
+    }
 }

--
Gitblit v1.9.3