- add VendorPrice and PayMoney in StoresOrderSaleInfo

This commit is contained in:
gazebo
2019-06-13 21:46:50 +08:00
parent 5fbc2ff0de
commit f4691530c5

View File

@@ -36,8 +36,11 @@ type StoresOrderSaleInfo struct {
Status int `json:"status"`
Count int `json:"count"`
ShopPrice int64 `json:"shopPrice"`
VendorPrice int64 `json:"vendorPrice"`
SalePrice int64 `json:"salePrice"`
ActualPayPrice int64 `json:"actualPayPrice"`
PayPrice int64 `json:"payPrice"`
}
func (c *OrderManager) GetStoreOrderCountInfo(ctx *jxcontext.Context, storeID, lastHours int) (countInfo []*model.GoodsOrderCountInfo, err error) {
@@ -717,7 +720,7 @@ func (c *OrderManager) GetStoresOrderSaleInfo(ctx *jxcontext.Context, storeIDLis
}
sql := `
SELECT IF(t1.jx_store_id > 0, t1.jx_store_id, t1.store_id) store_id, t1.vendor_id, IF(t1.status < ?, 0, t1.status) status,
COUNT(*) count, SUM(t1.shop_price) shop_price, SUM(t1.sale_price) sale_price, SUM(t1.actual_pay_price) actual_pay_price
COUNT(*) count, SUM(t1.shop_price) shop_price, SUM(t1.vendor_price) vendor_price, SUM(t1.sale_price) sale_price, SUM(t1.actual_pay_price) actual_pay_price
FROM goods_order t1
WHERE t1.order_created_at >= ? AND t1.order_created_at <= ?
`