fix(fee):修正bun中Model方法传递的内容。

This commit is contained in:
徐涛 2022-09-16 13:09:07 +08:00
parent 398e67a7bd
commit dba74ecd49

View File

@ -59,7 +59,7 @@ func (_MaintenanceFeeService) CreateMaintenanceFeeRecord(fee model.MaintenanceFe
fee.Id = uuid.New().String()
fee.Enabled = true
_, err := global.DB.NewInsert().Model(fee).Exec(ctx)
_, err := global.DB.NewInsert().Model(&fee).Exec(ctx)
if err != nil {
return err
}
@ -71,7 +71,7 @@ func (_MaintenanceFeeService) ModifyMaintenanceFee(fee model.MaintenanceFee) err
ctx, cancel := global.TimeoutContext()
defer cancel()
res, err := global.DB.NewUpdate().Model(fee).
res, err := global.DB.NewUpdate().Model(&fee).
WherePK().
Column("fee", "memo").
Exec(ctx)