diff --git a/service/end_user.go b/service/end_user.go index 3c2c82a..5a15db1 100644 --- a/service/end_user.go +++ b/service/end_user.go @@ -454,7 +454,7 @@ func (es _EndUserService) StatEndUserRecordInPeriod(requestUser, requestPark, st elem.IsPublicMeter = archive.IsPublicMeter elem.Kind = archive.ParkDetail.SubmeterType } - if !elem.OverallFee.Decimal.IsZero() { + if elem.OverallFee.Valid && !elem.OverallFee.Decimal.IsZero() { elem.AdjustProportion = decimal.NewNullDecimal( elem.AdjustFee.Decimal.Div(elem.OverallFee.Decimal).RoundBank(8), ) diff --git a/service/park.go b/service/park.go index af79765..ab58527 100644 --- a/service/park.go +++ b/service/park.go @@ -37,7 +37,7 @@ func (_ParkService) UpdateParkInfo(park *model.Park) error { res, err := global.DB.NewUpdate().Model(park). Where("id = ?", park.Id). Where("user_id = ?", park.UserId). - Column("name", "abbr", "region", "address", "contact", "phone", "capacity", "tenement_quantity", "category", "meter_04kv_type"). + Column("name", "abbr", "region", "area", "address", "contact", "phone", "capacity", "tenement_quantity", "category", "meter_04kv_type"). Exec(ctx) if err != nil { if rows, _ := res.RowsAffected(); rows == 0 {