diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/controller/ProductController.java b/src/main/java/com/chaozhanggui/system/cashierservice/controller/ProductController.java index a52d21c..ba8aec0 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/controller/ProductController.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/controller/ProductController.java @@ -83,7 +83,7 @@ public class ProductController { @RequestParam("shopId") String shopId, @RequestParam("productId") String productId, @RequestParam("spec_tag") String spec_tag, - @RequestParam("isVip") Integer isVip + @RequestParam("isVip") String isVip ) { return productService.queryProductSku(code,shopId, productId, spec_tag,isVip); } diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbProductMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbProductMapper.java index dc3920a..9e33d9a 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbProductMapper.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbProductMapper.java @@ -26,7 +26,7 @@ public interface TbProductMapper { List selectByIds(@Param("list") List ids); Integer selectByQcode(@Param("code") String code,@Param("productId") Integer productId,@Param("shopId") String shopId); - Integer selectByCodeAndSkuId(@Param("code") String code,@Param("skuId") Integer skuId,@Param("shopId") String shopId,@Param("isVip") Integer isVip); + Integer selectByCodeAndSkuId(@Param("code") String code,@Param("skuId") Integer skuId,@Param("shopId") String shopId,@Param("isVip") String isVip); Integer selectByNewQcode(@Param("code") String code,@Param("productId") Integer productId,@Param("shopId") String shopId,@Param("list") List list); List selGroups(@Param("proName") String proName,@Param("type") String type, diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/service/ProductService.java b/src/main/java/com/chaozhanggui/system/cashierservice/service/ProductService.java index a1934bd..9ef636d 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/service/ProductService.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/service/ProductService.java @@ -464,8 +464,8 @@ public class ProductService { } - public Result queryProductSku(String code, String shopId, String productId, String spec_tag,Integer isVip) { - if (ObjectUtil.isEmpty(shopId) || ObjectUtil.isEmpty(productId) || ObjectUtil.isEmpty(isVip)) { + public Result queryProductSku(String code, String shopId, String productId, String spec_tag,String isVip) { + if (ObjectUtil.isEmpty(shopId) || ObjectUtil.isEmpty(productId) || StringUtils.isEmpty(isVip)|| isVip.equals("undefined") ) { return Result.fail("参数错误"); } TbProductSkuWithBLOBs tbProductSkuWithBLOBs = tbProductSkuMapper.selectByShopIdAndProductIdAndSpec(shopId, productId, spec_tag);