diff --git a/nakadai/src/main/java/com/huoran/nakadai/controller/ProductController.java b/nakadai/src/main/java/com/huoran/nakadai/controller/ProductController.java index 754e25e..a5ffe62 100644 --- a/nakadai/src/main/java/com/huoran/nakadai/controller/ProductController.java +++ b/nakadai/src/main/java/com/huoran/nakadai/controller/ProductController.java @@ -126,7 +126,7 @@ public class ProductController { @PostMapping("/save") @ApiOperation(value = "保存商品信息") public ServerResponseEntity save(@Valid @RequestBody ProductParam productParam,HttpServletRequest request) { - productParam.setShopId(TokenUtils.getShopIdByJwtToken(request)); +// productParam.setShopId(TokenUtils.getShopIdByJwtToken(request)); checkParam(productParam); Product product = BeanUtil.copyProperties(productParam, Product.class); product.setShopId(TokenUtils.getShopIdByJwtToken(request)); @@ -144,7 +144,7 @@ public class ProductController { @PostMapping("/update") @ApiOperation(value = "修改商品信息") public ServerResponseEntity update(@Valid @RequestBody ProductParam productParam,HttpServletRequest request) { - productParam.setShopId(TokenUtils.getShopIdByJwtToken(request)); +// productParam.setShopId(TokenUtils.getShopIdByJwtToken(request)); checkParam(productParam); Product dbProduct = productService.getProductByProdId(productParam.getProdId()); if (!Objects.equals(dbProduct.getShopId(), TokenUtils.getShopIdByJwtToken(request))) { @@ -180,9 +180,9 @@ public class ProductController { */ public ServerResponseEntity delete(Integer prodId,HttpServletRequest request) { Product dbProduct = productService.getProductByProdId(prodId); - if (!Objects.equals(dbProduct.getShopId(), TokenUtils.getShopIdByJwtToken(request))) { - throw new YamiShopBindException("无法获取非本店铺商品信息"); - } +// if (!Objects.equals(dbProduct.getShopId(), TokenUtils.getShopIdByJwtToken(request))) { +// throw new YamiShopBindException("无法获取非本店铺商品信息"); +// } List dbSkus = skuService.listByProdId(dbProduct.getProdId()); // 删除商品 productService.removeProductByProdId(prodId); diff --git a/nakadai/src/main/java/com/huoran/nakadai/entity/param/ProductParam.java b/nakadai/src/main/java/com/huoran/nakadai/entity/param/ProductParam.java index 2c81847..689b362 100644 --- a/nakadai/src/main/java/com/huoran/nakadai/entity/param/ProductParam.java +++ b/nakadai/src/main/java/com/huoran/nakadai/entity/param/ProductParam.java @@ -106,7 +106,7 @@ public class ProductParam { @ApiModelProperty(value = "商品详情") private String content; - @ApiModelProperty(value = "店铺id",hidden = true) + @ApiModelProperty(value = "店铺id") private Integer shopId; /**