- 添加京西活动,用于记录活动商品结算价格

This commit is contained in:
gazebo
2019-06-18 17:19:25 +08:00
parent bbc6dcd84a
commit b6303b7013
9 changed files with 120 additions and 11 deletions

View File

@@ -88,6 +88,7 @@ func (c *OrderManager) GetOrderSkuInfo(ctx *jxcontext.Context, vendorOrderID str
t1.sku_name,
IF(t1.shop_price = 0, t1.sale_price, t1.shop_price) shop_price,
t1.sale_price,
t1.earning_price,
t1.weight,
t1.sku_type,
t1.promotion_type,
@@ -116,6 +117,7 @@ func (c *OrderManager) GetOrderSkuInfo(ctx *jxcontext.Context, vendorOrderID str
t1.sku_name,
IF(t1.shop_price = 0, t1.sale_price, t1.shop_price) shop_price,
t1.sale_price,
t1.earning_price,
t1.weight,
t1.sku_type,
t1.promotion_type,
@@ -145,6 +147,7 @@ func (c *OrderManager) GetOrderSkuInfo(ctx *jxcontext.Context, vendorOrderID str
t1.sku_name,
IF(t1.shop_price = 0, t1.sale_price, t1.shop_price) shop_price,
t1.sale_price,
t1.earning_price,
t1.weight,
t1.sku_type,
t1.promotion_type,
@@ -285,7 +288,7 @@ func (c *OrderManager) getOrders(ctx *jxcontext.Context, isIncludeSku bool, from
t2.actual_fee, t2.desired_fee, t2.waybill_created_at, t2.waybill_finished_at`
if isIncludeSku {
sql += `,
t3.sku_id, t3.count sku_count2, t3.shop_price sku_shop_price, t3.sale_price sku_sale_price`
t3.sku_id, t3.count sku_count2, t3.shop_price sku_shop_price, IF(t3.earning_price <> 0, t3.earning_price, t3.sale_price) sku_sale_price`
}
sql += `
FROM goods_order t1