This commit is contained in:
苏尹岚
2020-11-09 15:36:45 +08:00
parent adb3c1b6dd
commit 7e51b093e5
2 changed files with 8 additions and 7 deletions

View File

@@ -710,7 +710,7 @@ func (c *OrderManager) GetStoresOrderSaleInfoNew(ctx *jxcontext.Context, storeID
saleInfo.RealEarningPrice += v.ShopPrice * int64(v.Count)
}
} else {
if v.PayPercentage == 100 {
if v.OrderPayPercentage == 100 {
saleInfo.RealEarningPrice += v.ShopPrice * int64(v.Count)
}
}
@@ -726,7 +726,7 @@ func (c *OrderManager) GetStoresOrderSaleInfoNew(ctx *jxcontext.Context, storeID
saleInfo.RealEarningPrice += v.NewEarningPrice
}
} else {
if v.PayPercentage < 100 {
if v.OrderPayPercentage < 100 {
saleInfo.RealEarningPrice += v.NewEarningPrice
}
}
@@ -739,7 +739,7 @@ func (c *OrderManager) GetStoresOrderSaleInfoNew(ctx *jxcontext.Context, storeID
saleInfo.RealEarningPrice += v.NewEarningPrice
}
} else {
if v.PayPercentage < 100 {
if v.OrderPayPercentage < 100 {
saleInfo.RealEarningPrice += v.NewEarningPrice
}
}

View File

@@ -45,9 +45,10 @@ type OrderSkuWithActualPayPrice struct {
StoreID int `orm:"column(store_id)" json:"storeID"` // 外部系统里记录的 jxstoreid
Status int `json:"status"` // 参见OrderStatus*相关的常量定义
PayPercentage int `json:"payPercentage"`
NewEarningPrice int64 `json:"newEarningPrice"`
EarningType int `json:"earningType"`
PayPercentage int `json:"payPercentage"`
OrderPayPercentage int `json:"orderPayPercentage"`
NewEarningPrice int64 `json:"newEarningPrice"`
EarningType int `json:"earningType"`
}
type tGoodsAndOrder struct {
@@ -376,7 +377,7 @@ func GetStoreOrderSkuList(db *DaoDB, storeIDs []int, finishedAtBegin, finishedAt
sql := `
SELECT t1.*,
IF(t2.jx_store_id > 0, t2.jx_store_id, t2.store_id) store_id, t2.status, t2.actual_pay_price, t2.distance_freight_money, t2.waybill_tip_money, t2.new_earning_price,
t3.pay_percentage, t2.earning_type
t3.pay_percentage, t2.earning_type, t2.order_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
LEFT JOIN store t3 ON t3.id = IF(t2.jx_store_id > 0, t2.jx_store_id, t2.store_id)