- 在查询订单摘要信息时添加了对大量数据的分页处理,提升性能 - 新增 GetOrderCountByMap 函数用于获取订单总数 - 更新 QueryTotalSummary 和 QueryTodaySummary 函数,支持分页查询 - 为相关函数添加了 context 参数,以便于传递请求上下文 - 优化了部分代码结构,提高可读性和可维护性
20 lines
769 B
Go
20 lines
769 B
Go
package order
|
|
|
|
// Summary 订单总结
|
|
type Summary struct {
|
|
TotalNum int64 `json:"totalNum"` // 提交订单数
|
|
TotalAmount float64 `json:"totalAmount"` // 订单总金额
|
|
PaidNum int64 `json:"paidNum"` // 已付订单数
|
|
PaidAmount float64 `json:"paidAmount"` // 已付总金额
|
|
PlatformIncome float64 `json:"platformIncome"` // 平台收入
|
|
MerchantIncome float64 `json:"merchantIncome"` // 商户收入
|
|
AgencyIncome float64 `json:"agencyIncome"` // 代理收入
|
|
ChannelCost float64 `json:"channelCost"` // 通道成本
|
|
SucceedRate float64 `json:"succeedRate"` // 订单成功率
|
|
}
|
|
|
|
type ProfitSummary struct {
|
|
TotalProfit Summary `json:"totalProfit"`
|
|
TodayProfit Summary `json:"todayProfit"`
|
|
}
|