From 475d0d2851232905ed0eedc85abad266bc2444eb Mon Sep 17 00:00:00 2001 From: XinYi Song <2037158277@qq.com> Date: Thu, 23 Dec 2021 15:49:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E5=95=86=E5=93=81?= =?UTF-8?q?=E4=B8=8B=E6=9E=B6=E7=9A=84=E5=8A=9F=E8=83=BD=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=EF=BC=8C=E6=B7=BB=E5=8A=A0=E4=BA=86=E7=9B=B8=E5=BA=94=E7=9A=84?= =?UTF-8?q?=E6=9D=83=E9=99=90=E9=85=8D=E7=BD=AE=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/xkrs/controller/ProductController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/xkrs/controller/ProductController.java b/src/main/java/com/xkrs/controller/ProductController.java index 4fd3b00..b1aae88 100644 --- a/src/main/java/com/xkrs/controller/ProductController.java +++ b/src/main/java/com/xkrs/controller/ProductController.java @@ -119,7 +119,8 @@ public class ProductController { */ @Transactional(rollbackFor=Exception.class) @PostMapping("/updateOffShelf") - public String updateOffShelf(@RequestBody Map map){ + @PreAuthorize("hasAnyAuthority('auth_affiliate_merchant','auth_city','auth_county')") + public String updateOffShelf(@RequestBody Map map,@RequestHeader(value="Authorization") String token){ Locale locale = LocaleContextHolder.getLocale(); Integer productId = (Integer) map.get("productId"); productDao.updateShelfTypeById(productId,"2");