zoujiajian 2 年之前
父节点
当前提交
11fe6935b4
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      netflix-dao/src/main/java/com/cyksj/mapper/shop/YhShopGoodsSkuMapper.java

+ 2 - 2
netflix-dao/src/main/java/com/cyksj/mapper/shop/YhShopGoodsSkuMapper.java

@@ -26,6 +26,6 @@ public interface YhShopGoodsSkuMapper extends BaseMapper<YhShopGoodsSku> {
 	@Select("select sku_id,price from yh_shop_goods_sku where yhs_id = #{yhsId} and goods_id = #{goodsId} order by price limit 1")
 	YhShopGoodsSku selectMinPriceSkuByYhsId(@Param("yhsId") Long yhsId, @Param("skuId") Long goodsId);
 
-	@Select("select * from yh_shop_goods_sku where yhs_id = #{yhsId} and goods_id = #{goodsId} order by price limit 1")
-	List<YhShopGoodsSku> getBelowPriceShopSku(Long skuId, BigDecimal minPrice);
+	@Select("select * from yh_shop_goods_sku where sku_id = #{skuId} and price < #{minPrice} and status = 1")
+	List<YhShopGoodsSku> getBelowPriceShopSku(@Param("skuId") Long skuId, @Param("minPrice") BigDecimal minPrice);
 }