fix
This commit is contained in:
@@ -82,8 +82,8 @@ TaxConfig:
|
|||||||
TaxRate: 0.06
|
TaxRate: 0.06
|
||||||
TaxExemptionAmount: 0.00
|
TaxExemptionAmount: 0.00
|
||||||
Tianyuanapi:
|
Tianyuanapi:
|
||||||
AccessID: "7f8a9b2c4d5e6f1a"
|
AccessID: "9e60b34eb51f3827"
|
||||||
Key: "9e4f8a1b3c6d7e2f5a8b9c0d1e4f7a2b"
|
Key: "04c6b4c559be6d5ba5351c04c8713a64"
|
||||||
BaseURL: "https://api.tianyuanapi.com"
|
BaseURL: "https://api.tianyuanapi.com"
|
||||||
Timeout: 60
|
Timeout: 60
|
||||||
Authorization:
|
Authorization:
|
||||||
|
|||||||
@@ -83,8 +83,8 @@ TaxConfig:
|
|||||||
TaxRate: 0.06
|
TaxRate: 0.06
|
||||||
TaxExemptionAmount: 0.00
|
TaxExemptionAmount: 0.00
|
||||||
Tianyuanapi:
|
Tianyuanapi:
|
||||||
AccessID: "7f8a9b2c4d5e6f1a"
|
AccessID: "9e60b34eb51f3827"
|
||||||
Key: "9e4f8a1b3c6d7e2f5a8b9c0d1e4f7a2b"
|
Key: "04c6b4c559be6d5ba5351c04c8713a64"
|
||||||
BaseURL: "https://api.tianyuanapi.com"
|
BaseURL: "https://api.tianyuanapi.com"
|
||||||
Timeout: 60
|
Timeout: 60
|
||||||
Authorization:
|
Authorization:
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ func (l *AdminGetRevenueStatisticsLogic) AdminGetRevenueStatistics(req *types.Ad
|
|||||||
return nil, fmt.Errorf("查询今日收入金额失败: %w", err)
|
return nil, fmt.Errorf("查询今日收入金额失败: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询总成本(status=paid表示已支付)
|
// 查询总成本金额(status=paid表示已支付)
|
||||||
totalCostBuilder := builder.Where("status = ?", "paid")
|
totalCostBuilder := builder.Where("status = ?", "paid")
|
||||||
totalCostAmount, err := l.svcCtx.OrderModel.FindSum(l.ctx, totalCostBuilder, "sales_cost")
|
totalCostAmount, err := l.svcCtx.OrderModel.FindSum(l.ctx, totalCostBuilder, "sales_cost")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -58,7 +58,7 @@ func (l *AdminGetRevenueStatisticsLogic) AdminGetRevenueStatistics(req *types.Ad
|
|||||||
return nil, fmt.Errorf("查询总成本金额失败: %w", err)
|
return nil, fmt.Errorf("查询总成本金额失败: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询今日成本(status=paid表示已支付,且支付时间为今日)
|
// 查询今日成本金额(status=paid表示已支付,且支付时间为今日)
|
||||||
todayCostBuilder := builder.Where("status = ? AND pay_time >= ? AND pay_time < ?", "paid", startOfDay, endOfDay)
|
todayCostBuilder := builder.Where("status = ? AND pay_time >= ? AND pay_time < ?", "paid", startOfDay, endOfDay)
|
||||||
todayCostAmount, err := l.svcCtx.OrderModel.FindSum(l.ctx, todayCostBuilder, "sales_cost")
|
todayCostAmount, err := l.svcCtx.OrderModel.FindSum(l.ctx, todayCostBuilder, "sales_cost")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user