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 03d9409..6c334b4 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/controller/ProductController.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/controller/ProductController.java @@ -96,10 +96,9 @@ public class ProductController { @RequestParam(value = "code", required = false) String code, @RequestParam("shopId") String shopId, @RequestParam("productId") String productId, - @RequestParam("spec_tag") String spec_tag, - @RequestParam("isVip") String isVip + @RequestParam("spec_tag") String spec_tag ) { - return productService.queryProductSku(code,shopId, productId, spec_tag,isVip); + return productService.queryProductSku(code,shopId, productId, spec_tag); } @PostMapping("addCart") 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 cdc93a3..f3850a4 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") String isVip); + Integer selectByCodeAndSkuId(@Param("code") String code,@Param("skuId") Integer skuId,@Param("shopId") String shopId); 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 d12a0cd..b77d1c2 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/service/ProductService.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/service/ProductService.java @@ -574,8 +574,8 @@ public class ProductService { } - 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") ) { + public Result queryProductSku(String code, String shopId, String productId, String spec_tag) { + if (ObjectUtil.isEmpty(shopId) || ObjectUtil.isEmpty(productId) ) { return Result.fail("参数错误"); } TbProductSkuWithBLOBs tbProductSkuWithBLOBs = tbProductSkuMapper.selectByShopIdAndProductIdAndSpec(shopId, productId, spec_tag); @@ -588,7 +588,7 @@ public class ProductService { tbProductSkuWithBLOBs.setId(null); }else { if (StringUtils.isNotBlank(code)) { - Integer sum = tbProductMapper.selectByCodeAndSkuId(code, tbProductSkuWithBLOBs.getId(), shopId,isVip); + Integer sum = tbProductMapper.selectByCodeAndSkuId(code, tbProductSkuWithBLOBs.getId(), shopId); tbProductSkuWithBLOBs.setNumber(sum); } } diff --git a/src/main/resources/mapper/TbProductMapper.xml b/src/main/resources/mapper/TbProductMapper.xml index 169bf07..41c3f1a 100644 --- a/src/main/resources/mapper/TbProductMapper.xml +++ b/src/main/resources/mapper/TbProductMapper.xml @@ -137,7 +137,6 @@ AND t.sku_id = #{skuId} AND t.`status` = 'create' AND t.table_id = #{code} - AND t.is_vip = #{isVip}