dongfeng-pay/legend/models/fast/Account.go
2021-04-27 15:33:49 +08:00

40 lines
813 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package fast
import (
"github.com/astaxie/beego/logs"
"github.com/beego/beego/v2/client/orm"
)
type RpAccount struct {
Id string `orm:"pk;column(id)"`
CreateTime string
EditTime string
Version int
Remark string
AccountNo string
Balance float64
Unbalance float64
SecurityMoney float64
Status string
TotalIncome float64
TodayIncome float64
SettAmount float64
UserNo string
AmountFrozen float64
}
func (c *RpAccount) TableName() string {
return "rp_account"
}
func GetAccontInfo(userNo string) *RpAccount {
o := orm.NewOrm()
rpAccount := new(RpAccount)
if _, err := o.QueryTable("rp_account").Filter("user_no", userNo).All(rpAccount); err != nil {
logs.Error("获取account信息失败", err)
}
return rpAccount
}