forked from free-lancers/electricity_bill_calc_service
fix(charge):修复用户充值记录创建的时候对于数值类型内容解析的问题。
This commit is contained in:
@@ -2,6 +2,8 @@ package model
|
||||
|
||||
import (
|
||||
"electricity_bill_calc/types"
|
||||
|
||||
"github.com/shopspring/decimal"
|
||||
)
|
||||
|
||||
type UserChargeDetail struct {
|
||||
@@ -22,9 +24,9 @@ type UserChargeDetail struct {
|
||||
}
|
||||
|
||||
type ChargeRecordCreationForm struct {
|
||||
UserId string `json:"userId"`
|
||||
Fee *float64 `json:"fee"`
|
||||
Discount *float64 `json:"discount"`
|
||||
Amount *float64 `json:"amount"`
|
||||
ChargeTo types.Date `json:"chargeTo"`
|
||||
UserId string `json:"userId"`
|
||||
Fee *decimal.Decimal `json:"fee"`
|
||||
Discount *decimal.Decimal `json:"discount"`
|
||||
Amount *decimal.Decimal `json:"amount"`
|
||||
ChargeTo types.Date `json:"chargeTo"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user