fix(fee):修正错误的文字。
This commit is contained in:
parent
022788bb44
commit
f3457c9ab2
|
@ -197,7 +197,7 @@ func statAdditionalCharges(c *gin.Context) {
|
|||
result.Error(http.StatusInternalServerError, "不能解析给定的参数[page]。")
|
||||
return
|
||||
}
|
||||
fees, total, err := service.MaintenanceFeeService.QueryAdditiionalCharges(requestUser, requestPark, period, keyword, requestPage)
|
||||
fees, total, err := service.MaintenanceFeeService.QueryAdditionalCharges(requestUser, requestPark, period, keyword, requestPage)
|
||||
if err != nil {
|
||||
result.Error(http.StatusInternalServerError, err.Error())
|
||||
return
|
||||
|
|
|
@ -175,7 +175,7 @@ type _FeeStat struct {
|
|||
Total decimal.Decimal
|
||||
}
|
||||
|
||||
func (f _MaintenanceFeeService) QueryAdditiionalCharges(uid, pid, period, keyword string, requestPage int) ([]model.AdditionalCharge, int64, error) {
|
||||
func (f _MaintenanceFeeService) QueryAdditionalCharges(uid, pid, period, keyword string, requestPage int) ([]model.AdditionalCharge, int64, error) {
|
||||
var (
|
||||
conditions = []string{fmt.Sprintf("%d", requestPage)}
|
||||
statFees = make([]_FeeStat, 0)
|
||||
|
@ -250,14 +250,14 @@ func (f _MaintenanceFeeService) QueryAdditiionalCharges(uid, pid, period, keywor
|
|||
mapset.NewSet[string](),
|
||||
)
|
||||
parks := make([]model.Park, 0)
|
||||
if len(parkIds.ToSlice()) > 0 {
|
||||
err = global.DB.NewSelect().Model(&parks).Relation("Enterprise").
|
||||
Where("p.id in (?)", bun.In(parkIds.ToSlice())).
|
||||
Scan(ctx)
|
||||
if err != nil {
|
||||
return make([]model.AdditionalCharge, 0), 0, fmt.Errorf("获取园区信息出现错误,%w", err)
|
||||
}
|
||||
f.l.Debug("Park ids", zap.Any("ids", parkIds))
|
||||
f.l.Debug("Check fees", zap.Any("fees", statFees))
|
||||
}
|
||||
assembledStat := lo.Reduce(
|
||||
statFees,
|
||||
func(acc []model.AdditionalCharge, elem _FeeStat, _ int) []model.AdditionalCharge {
|
||||
|
|
Loading…
Reference in New Issue
Block a user