|
@@ -2040,16 +2040,16 @@
|
|
|
where productId = #{productId}
|
|
|
</select>
|
|
|
<select id="findSku" resultType="com.caimei.modules.product.entity.CmSku">
|
|
|
- select price, costPrice, costCheckFlag, shopPercent, normalPrice
|
|
|
+ select price, ifnull(costPrice, 0) as costPrice, costCheckFlag, shopPercent, normalPrice
|
|
|
from cm_sku
|
|
|
where productId = #{productId}
|
|
|
order by price asc
|
|
|
limit 1
|
|
|
</select>
|
|
|
<select id="findOrganizeSku" resultType="com.caimei.modules.product.entity.CmSku">
|
|
|
- SELECT price, costPrice,"1" AS costCheckFlag, shopPercent AS shopPercent, normalPrice
|
|
|
+ SELECT price, ifnull(costPrice, 0),"1" AS costCheckFlag, shopPercent AS shopPercent, normalPrice
|
|
|
FROM cm_mall_product_sku
|
|
|
- WHERE productId = 1686
|
|
|
+ WHERE productId = #{productId}
|
|
|
ORDER BY price ASC
|
|
|
LIMIT 1
|
|
|
</select>
|