Commit b37a315c125e39e0c0e5edeef429a1180e310e31
1 parent
49f6412f
update:修正0库存时,商品0数量更新
Showing
1 changed file
with
1 additions
and
1 deletions
etrade-order/src/main/resources/com/diligrp/etrade/dao/mapper/shopCart/ShopCartMapper.xml
@@ -64,7 +64,7 @@ | @@ -64,7 +64,7 @@ | ||
64 | scm.number, | 64 | scm.number, |
65 | scm.unit_amount, | 65 | scm.unit_amount, |
66 | scm.unit_amount as prePrice, | 66 | scm.unit_amount as prePrice, |
67 | - case when scm.weight > st.stock*100 then st.stock*100 else scm.weight end as weight, | 67 | + case when st.stock != 0 and scm.weight > st.stock*100 then st.stock*100 else scm.weight end as weight, |
68 | st.stock*100 as maxWeight, | 68 | st.stock*100 as maxWeight, |
69 | scm.weight, | 69 | scm.weight, |
70 | scm.amount, | 70 | scm.amount, |