|
@@ -165,9 +165,8 @@
|
|
|
p.shopID as shopId,
|
|
|
p.searchKey as keyword,
|
|
|
(select minBuyNumber from cm_sku where p.productID=#{productId} order by price asc LIMIT 1) as minBuyNumber,
|
|
|
- p.maxBuyNumber as maxBuyNumber,
|
|
|
(select ladderPriceFlag from cm_sku where p.productID=#{productId} order by price asc LIMIT 1) as ladderPriceFlag,
|
|
|
- p.normalPrice,
|
|
|
+ (select normalPrice from cm_sku where p.productID=#{productId} order by price asc LIMIT 1) as normalPrice,
|
|
|
p.step,
|
|
|
p.shopID as shopId,
|
|
|
p.taxPoint as taxRate,
|
|
@@ -275,10 +274,9 @@
|
|
|
p.priceFlag,
|
|
|
cs.price,
|
|
|
cs.costPrice,
|
|
|
- ifnull(p.costCheckFlag, 1) as costCheckFlag,
|
|
|
+ ifnull(cs.costCheckFlag, 1) as costCheckFlag,
|
|
|
p.searchKey as keyword,
|
|
|
cs.minBuyNumber as minBuyNumber,
|
|
|
- p.maxBuyNumber as maxBuyNumber,
|
|
|
cs.ladderPriceFlag,
|
|
|
cs.normalPrice,
|
|
|
p.step,
|
|
@@ -628,16 +626,15 @@
|
|
|
p.name,
|
|
|
p.aliasName,
|
|
|
p.mainImage as image,
|
|
|
- p.unit,
|
|
|
+ (select unit from cm_sku where productId=csp.productId order by price asc limit 1)as unit,
|
|
|
p.productCode as code,
|
|
|
p.priceFlag,
|
|
|
- p.price,
|
|
|
+ (select unit from cm_sku where productId=csp.productId order by price asc limit 1)as price,
|
|
|
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=csp.productId order by price asc limit 1)as minBuyNumber,
|
|
|
+ (select ladderPriceFlag from cm_sku where productId=csp.productId order by price asc limit 1)as ladderPriceFlag,
|
|
|
+ (select normalPrice from cm_sku where productId=csp.productId order by price asc limit 1)as normalPrice,
|
|
|
p.step,
|
|
|
p.shopID as shopId,
|
|
|
p.taxPoint as taxRate,
|
|
@@ -901,15 +898,14 @@
|
|
|
p.aliasName,
|
|
|
p.visibility,
|
|
|
p.mainImage,
|
|
|
- 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.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.taxPoint as taxRate,
|
|
|
p.includedTax,
|
|
@@ -923,7 +919,7 @@
|
|
|
p.tinyTypeID as tinyTypeId,
|
|
|
p.productType,
|
|
|
p.brandID,
|
|
|
- p.price
|
|
|
+ (select price from cm_sku where productId=p.productID order by price asc limit 1)as price
|
|
|
from product p
|
|
|
<where>
|
|
|
and p.showFlag!=5
|
|
@@ -948,7 +944,6 @@
|
|
|
p.priceFlag,
|
|
|
p.shopID as shopId,
|
|
|
p.searchKey as keyword,
|
|
|
- p.maxBuyNumber as maxBuyNumber,
|
|
|
p.step,
|
|
|
p.taxPoint as taxRate,
|
|
|
p.includedTax,
|
|
@@ -990,16 +985,15 @@
|
|
|
p.aliasName,
|
|
|
p.visibility,
|
|
|
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,
|
|
|
+ (select price from cm_sku where productId=p.productID order by price asc limit 1)as price,
|
|
|
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.taxPoint as taxRate,
|
|
|
p.includedTax,
|
|
@@ -1013,7 +1007,7 @@
|
|
|
p.tinyTypeID as tinyTypeId,
|
|
|
p.productType,
|
|
|
p.brandID,
|
|
|
- p.price
|
|
|
+ (select price from cm_sku where productId=p.productID order by price asc limit 1)as price
|
|
|
from product p
|
|
|
<where>
|
|
|
|