fix
This commit is contained in:
@@ -50,7 +50,7 @@ func (l *AdminGetRevenueStatisticsLogic) AdminGetRevenueStatistics(req *types.Ad
|
||||
return nil, fmt.Errorf("查询今日收入金额失败: %w", err)
|
||||
}
|
||||
|
||||
// 查询总成本(status=paid表示已支付)
|
||||
// 查询总成本金额(status=paid表示已支付)
|
||||
totalCostBuilder := builder.Where("status = ?", "paid")
|
||||
totalCostAmount, err := l.svcCtx.OrderModel.FindSum(l.ctx, totalCostBuilder, "sales_cost")
|
||||
if err != nil {
|
||||
@@ -58,7 +58,7 @@ func (l *AdminGetRevenueStatisticsLogic) AdminGetRevenueStatistics(req *types.Ad
|
||||
return nil, fmt.Errorf("查询总成本金额失败: %w", err)
|
||||
}
|
||||
|
||||
// 查询今日成本(status=paid表示已支付,且支付时间为今日)
|
||||
// 查询今日成本金额(status=paid表示已支付,且支付时间为今日)
|
||||
todayCostBuilder := builder.Where("status = ? AND pay_time >= ? AND pay_time < ?", "paid", startOfDay, endOfDay)
|
||||
todayCostAmount, err := l.svcCtx.OrderModel.FindSum(l.ctx, todayCostBuilder, "sales_cost")
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user