소스 검색

联合丽格1.0.2

huangzhiguo 1 년 전
부모
커밋
82dcb8ac7c
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      src/main/resources/mappings/modules/product/ProductMapper.xml

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

@@ -2040,16 +2040,16 @@
         where productId = #{productId}
         where productId = #{productId}
     </select>
     </select>
     <select id="findSku" resultType="com.caimei.modules.product.entity.CmSku">
     <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
         from cm_sku
         where productId = #{productId}
         where productId = #{productId}
         order by price asc
         order by price asc
         limit 1
         limit 1
     </select>
     </select>
     <select id="findOrganizeSku" resultType="com.caimei.modules.product.entity.CmSku">
     <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
         FROM cm_mall_product_sku
-        WHERE productId = 1686
+        WHERE productId = #{productId}
         ORDER BY price ASC
         ORDER BY price ASC
         LIMIT 1
         LIMIT 1
     </select>
     </select>