修改了商品下架的功能模块,添加了相应的权限配置信息

This commit is contained in:
XinYi Song 2021-12-23 15:49:34 +08:00
parent e94f1684e8
commit 475d0d2851

View File

@ -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");