Browse Source

采美sku

zhijiezhao 2 years ago
parent
commit
588eea7432
1 changed files with 7 additions and 8 deletions
  1. 7 8
      src/main/resources/mapper/CouponMapper.xml

+ 7 - 8
src/main/resources/mapper/CouponMapper.xml

@@ -69,18 +69,17 @@
         p.name,
         p.aliasName,
         p.mainImage AS image,
-        p.unit,
+        (select unit from cm_sku where productId=p.productID order by price asc limit 1)as unit,
         p.productCode AS CODE,
         p.priceFlag,
-        p.price,
-        p.costPrice,
-        p.costCheckFlag,
+        (select price from cm_sku where productId=p.productID order by price asc limit 1)as price,
+        (select costPrice from cm_sku where productId=p.productID order by price asc limit 1)as costPrice,
+        (select costCheckFlag from cm_sku where productId=p.productID order by price asc limit 1)as costCheckFlag,
         p.shopID AS shopId,
         p.searchKey AS keyword,
-        p.minBuyNumber AS minBuyNumber,
-        p.maxBuyNumber AS maxBuyNumber,
-        p.ladderPriceFlag,
-        p.normalPrice,
+        (select minBuyNumber from cm_sku where productId=p.productID order by price asc limit 1) AS minBuyNumber,
+        (select ladderPriceFlag from cm_sku where productId=p.productID order by price asc limit 1)as ladderPriceFlag,
+        (select normalPrice from cm_sku where productId=p.productID order by price asc limit 1)as normalPrice,
         p.step,
         p.shopID AS shopId,
         p.taxPoint AS taxRate,