From 8a383515d3a4f9823f21a6ef054cb88b14728060 Mon Sep 17 00:00:00 2001 From: DEKA_123 <1904876928@qq.com> Date: Mon, 14 Aug 2023 14:42:15 +0800 Subject: [PATCH] =?UTF-8?q?fix(#22):=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E8=AF=BB=E6=95=B0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controller/report.go | 8 +++++--- repository/report.go | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/controller/report.go b/controller/report.go index 0dfc4f3..848897b 100644 --- a/controller/report.go +++ b/controller/report.go @@ -257,14 +257,16 @@ func getReportSummary(c *fiber.Ctx) error { }, Area: report.OverallArea, BasicFee: report.BasicFee, - PooledBasicFeeByAmount: report.AuthorizeLoss.Amount, + PooledBasicFeeByAmount: report.BasicPooledPriceConsumption.Decimal, PooledBasicFeeByArea: report.BasicPooledPriceArea.Decimal, AdjustFee: report.AdjustFee, PooledAdjustFeeByAmount: report.AdjustPooledPriceConsumption.Decimal, PooledAdjustFeeByArea: report.AdjustPooledPriceArea.Decimal, Consumption: report.ConsumptionFee.Decimal, - Loss: report.Loss.Decimal, - LossRate: report.LossFee.Decimal, + //Loss: report.Loss.Decimal, + Loss: report.AuthorizeLoss.Amount, + //LossRate: report.LossFee.Decimal, + LossRate: report.AuthorizeLoss.Proportion, } //copier.Copy(&summaryResponse, report) return result.Success( diff --git a/repository/report.go b/repository/report.go index 89bb7b6..c84117b 100644 --- a/repository/report.go +++ b/repository/report.go @@ -307,7 +307,7 @@ func (rr _ReportRepository) RetrieveReportSummary(rid string) (*model.ReportSumm Select("*"). Where(goqu.I("report_id").Eq(rid)). Prepared(true).ToSQL() - + log.Println(">>>>>>>>>>>>>>>.", querySql) var summary model.ReportSummary if err := pgxscan.Get(ctx, global.DB, &summary, querySql, queryParams...); err != nil { rr.log.Error("获取指定报表的总览信息时出现错误", zap.Error(err))