商品查询 加条件
This commit is contained in:
parent
1a44f67c76
commit
949bce54f1
@ -92,10 +92,10 @@
|
|||||||
mg.name goodsName
|
mg.name goodsName
|
||||||
from integral_gift ig
|
from integral_gift ig
|
||||||
left join integral_gift_category igc ON ig.category_id = igc.id
|
left join integral_gift_category igc ON ig.category_id = igc.id
|
||||||
left join mt_goods mg ON ig.goods_id = mg.id
|
left join (select * from mt_goods where stock >0) mg ON ig.goods_id = mg.id
|
||||||
<where>
|
<where>
|
||||||
ig.store_id = #{integralGift.storeId} and mg.stock >0
|
ig.store_id = #{integralGift.storeId}
|
||||||
|
and ig.remaining_inventory >0
|
||||||
<if test="integralGift.id != null">
|
<if test="integralGift.id != null">
|
||||||
and ig.id = #{integralGift.id}
|
and ig.id = #{integralGift.id}
|
||||||
</if>
|
</if>
|
||||||
@ -135,9 +135,7 @@
|
|||||||
<if test="integralGift.totalInventory != null">
|
<if test="integralGift.totalInventory != null">
|
||||||
and ig.total_inventory = #{integralGift.totalInventory}
|
and ig.total_inventory = #{integralGift.totalInventory}
|
||||||
</if>
|
</if>
|
||||||
<if test="integralGift.remainingInventory != null">
|
|
||||||
and ig.remaining_inventory = #{integralGift.remainingInventory}
|
|
||||||
</if>
|
|
||||||
<if test="integralGift.merchantCouponId != null">
|
<if test="integralGift.merchantCouponId != null">
|
||||||
and ig.merchant_coupon_id = #{integralGift.merchantCouponId}
|
and ig.merchant_coupon_id = #{integralGift.merchantCouponId}
|
||||||
</if>
|
</if>
|
||||||
|
Loading…
Reference in New Issue
Block a user