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