ソースを参照

联合丽格1.0.2

huangzhiguo 1 年間 前
コミット
82dcb8ac7c

+ 3 - 3
src/main/resources/mappings/modules/product/ProductMapper.xml

@@ -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>