1、修改了各级查看要审核商品信息的功能模块,添加了相关的权限配置信息

2、修改了各级进行审核的操作的功能模块,添加了相关的权限配置信息
This commit is contained in:
XinYi Song 2021-12-23 15:27:49 +08:00
parent 3c5d7d2784
commit e94f1684e8

View File

@ -8,6 +8,7 @@ import com.xkrs.model.entity.SysUserEntity;
import com.xkrs.model.qo.ProductQo;
import com.xkrs.service.ProductService;
import org.springframework.context.i18n.LocaleContextHolder;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@ -83,6 +84,7 @@ public class ProductController {
* @return
*/
@PostMapping("/selectProductReviewType")
@PreAuthorize("hasAnyAuthority('auth_administor','auth_city','auth_county')")
public String selectProductReviewType(@RequestBody Map map, @RequestHeader(value="Authorization") String token){
Locale locale = LocaleContextHolder.getLocale();
String productCity = (String) map.get("productCity");
@ -103,7 +105,8 @@ public class ProductController {
* @return
*/
@PostMapping("/updateReviewType")
public String updateReviewType(@RequestBody Map map){
@PreAuthorize("hasAnyAuthority('auth_administor','auth_city','auth_county')")
public String updateReviewType(@RequestBody Map map,@RequestHeader(value="Authorization") String token){
Integer productId = (Integer) map.get("productId");
String reviewType = (String) map.get("reviewType");
return productService.updateReviewType(productId,reviewType);