This commit is contained in:
邹宗楠
2025-09-28 14:03:06 +08:00
parent 209cd7e30d
commit 3702b709b7
4 changed files with 7 additions and 2 deletions

View File

@@ -1686,7 +1686,8 @@ func StatisticsIncome(db *DaoDB, startTime, endTime time.Time, storeId int, bran
SUM(ROUND(IF(t1.earning_type = 1, t1.total_shop_money-t1.earning_price-IFNULL(t2.desired_fee,0), t1.total_shop_money *(t1.order_pay_percentage/2)/100) * (t3.jx_brand_fee_factor/10),3)) jx_income,
SUM(ROUND(IF(t1.earning_type = 1, t1.total_shop_money-t1.earning_price-IFNULL(t2.desired_fee,0), t1.total_shop_money *(t1.order_pay_percentage/2)/100) * (t3.market_add_fee_factor/10),3)) market_income,
count(t1.vendor_order_id) order_count,
sum(t1.vendor_price) order_sku_price
sum(t1.vendor_price) order_sku_price,
sum(t1.package_price) server_fee
FROM goods_order t1
LEFT JOIN waybill t2 ON t1.vendor_waybill_id = t2.vendor_waybill_id AND t1.waybill_vendor_id = t2.waybill_vendor_id AND t1.vendor_order_id = t2.vendor_order_id
LEFT JOIN store t3 ON t1.jx_store_id = t3.id

View File

@@ -154,4 +154,5 @@ type StatisticsIncomeInfo struct {
MarketIncome float64 `json:"market_income"`
OrderCount float64 `json:"order_count"` // 有效订单数
OrderSkuPrice float64 `json:"order_sku_price"` // 营业额(售卖价)
ServerFee float64 `json:"server_fee"` // 报价门店服务费
}