|
@@ -117,12 +117,12 @@
|
|
|
p.step AS step,
|
|
|
cs.minBuyNumber AS MIN,
|
|
|
p.priceFlag,
|
|
|
- IFNULL(p.ladderPriceFlag, 0) AS ladderFlag,
|
|
|
+ IFNULL(cs.ladderPriceFlag, 0) AS ladderFlag,
|
|
|
p.includedTax AS includedTax,
|
|
|
p.invoiceType AS invoiceType,
|
|
|
p.taxPoint AS taxRate,
|
|
|
p.productCategory,
|
|
|
- IFNULL((SELECT validFlag FROM cm_organize_product_info WHERE productId = p.productID AND organizeId = 0), 999) AS validFlag,
|
|
|
+ IFNULL((SELECT validFlag FROM cm_organize_product_info WHERE productId = p.productID AND organizeId = #{organizeId}), 999) AS validFlag,
|
|
|
p.visibility,
|
|
|
p.productType
|
|
|
FROM cm_cart c
|
|
@@ -312,7 +312,7 @@
|
|
|
p.step AS step,
|
|
|
cs.minBuyNumber AS MIN,
|
|
|
p.priceFlag,
|
|
|
- p.ladderPriceFlag AS ladderFlag,
|
|
|
+ cs.ladderPriceFlag AS ladderFlag,
|
|
|
p.includedTax AS includedTax,
|
|
|
p.invoiceType AS invoiceType,
|
|
|
p.taxPoint AS taxRate,
|
|
@@ -348,11 +348,11 @@
|
|
|
UPDATE cm_cart
|
|
|
set productCount = #{productCount},
|
|
|
addTime = #{addTime},
|
|
|
- productId = (select productId from cm_sku where skuId = #{skuId} and organizeId = 0),
|
|
|
+ productId = (select productId from cm_sku where skuId = #{skuId}),
|
|
|
shopId = (select shopId
|
|
|
from product p
|
|
|
left join cm_sku cs on p.productId = cs.productId
|
|
|
- where cs.skuId = #{skuId} and organizeId = 0)
|
|
|
+ where cs.skuId = #{skuId})
|
|
|
WHERE userID = #{userId}
|
|
|
AND skuId = #{skuId}
|
|
|
</update>
|
|
@@ -361,7 +361,7 @@
|
|
|
INSERT INTO cm_cart (skuId, shopID, productID, userID, productCount, addTime, reBuyFlag)
|
|
|
VALUES (#{skuId},
|
|
|
(select shopId from product p left join cm_sku cs on p.productId = cs.productId where cs.skuId = #{skuId} and cs.organizeId = 0),
|
|
|
- (select productId from cm_sku where skuId = #{skuId} and organizeId = 0), #{userId},
|
|
|
+ (select productId from cm_sku where skuId = #{skuId}), #{userId},
|
|
|
#{productCount},
|
|
|
#{addTime}, #{reBuyFlag})
|
|
|
</insert>
|
|
@@ -485,7 +485,7 @@
|
|
|
p.step AS step,
|
|
|
cs.minBuyNumber AS MIN,
|
|
|
p.priceFlag,
|
|
|
- p.ladderPriceFlag AS ladderFlag,
|
|
|
+ cs.ladderPriceFlag AS ladderFlag,
|
|
|
p.includedTax AS includedTax,
|
|
|
p.invoiceType AS invoiceType,
|
|
|
p.taxPoint AS taxRate,
|