查询商品权限修改

main
cheney 10 months ago
parent 6d57d241b9
commit f70a2c853e
  1. 6
      nakadai/src/main/java/com/huoran/nakadai/controller/ProductController.java

@ -111,9 +111,9 @@ public class ProductController {
@ApiOperation(value = "获取商品信息", response = Product.class) @ApiOperation(value = "获取商品信息", response = Product.class)
public ServerResponseEntity<Product> info(@RequestParam("prodId") Integer prodId, HttpServletRequest request) { public ServerResponseEntity<Product> info(@RequestParam("prodId") Integer prodId, HttpServletRequest request) {
Product prod = productService.getProductByProdId(prodId); Product prod = productService.getProductByProdId(prodId);
if (!Objects.equals(prod.getShopId(), TokenUtils.getShopIdByJwtToken(request))) { // if (!Objects.equals(prod.getShopId(), TokenUtils.getShopIdByJwtToken(request))) {
throw new YamiShopBindException("没有权限获取该商品规格信息"); // throw new YamiShopBindException("没有权限获取该商品规格信息");
} // }
List<Sku> skuList = skuService.listByProdId(prodId); List<Sku> skuList = skuService.listByProdId(prodId);
prod.setSkuList(skuList); prod.setSkuList(skuList);

Loading…
Cancel
Save