获取营业额测试
This commit is contained in:
@@ -670,6 +670,7 @@ func (c *OrderManager) GetStoresOrderSaleInfoNew(ctx *jxcontext.Context, storeID
|
||||
saleInfo.VendorPrice += v.VendorPrice * int64(v.Count)
|
||||
saleInfo.SalePrice += v.SalePrice * int64(v.Count)
|
||||
// saleInfo.EarningPrice += v.EarningPrice * int64(v.Count)
|
||||
globals.SugarLogger.Debugf("GetStoresOrderSaleInfoNew", utils.Format4Output(v, false))
|
||||
saleInfo.EarningPrice = v.NewEarningPrice
|
||||
|
||||
universalOrderID := jxutils.ComposeUniversalOrderID(v.VendorOrderID, v.VendorID)
|
||||
@@ -747,7 +748,6 @@ func (c *OrderManager) GetStoresOrderSaleInfoNew(ctx *jxcontext.Context, storeID
|
||||
saleInfo.SalePrice += v.SalePrice
|
||||
// saleInfo.EarningPrice += v.EarningPrice
|
||||
saleInfo.Count++
|
||||
saleInfo.EarningPrice = v.NewEarningPrice
|
||||
}
|
||||
for _, v := range saleInfoMap {
|
||||
saleInfoList = append(saleInfoList, v)
|
||||
|
||||
@@ -389,7 +389,7 @@ func GetStoreOrderSkuList(db *DaoDB, storeIDs []int, finishedAtBegin, finishedAt
|
||||
func GetStoreOrderSkuList4Afs(db *DaoDB, storeIDs []int, finishedAtBegin, finishedAtEnd time.Time, isFinish bool) (skuList []*OrderSkuWithActualPayPrice, err error) {
|
||||
sql := `
|
||||
SELECT t1.*,
|
||||
t2.actual_pay_price, t2.status, IF(t2.jx_store_id > 0, t2.jx_store_id, t2.store_id) store_id,
|
||||
t2.actual_pay_price, t2.status, IF(t2.jx_store_id > 0, t2.jx_store_id, t2.store_id) store_id, t2.new_earning_price,
|
||||
t3.pay_percentage
|
||||
FROM order_sku t1
|
||||
JOIN goods_order t2 ON t2.vendor_order_id = t1.vendor_order_id AND t2.vendor_id = t1.vendor_id
|
||||
|
||||
Reference in New Issue
Block a user