fix(#22):修复部分字段读数问题

This commit is contained in:
DEKA_123 2023-08-14 14:42:15 +08:00
parent 37bd0da1f2
commit 8a383515d3
2 changed files with 6 additions and 4 deletions

View File

@ -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(

View File

@ -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))