dongfeng-pay/legend/models/fast/accountInfoDao.go
2021-04-30 15:55:02 +08:00

39 lines
789 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 AccountInfo struct {
Id string `orm:"pk;column(id)"`
Status string
AccountUid string
AccountName string
Balance float64
SettleAmount float64
LoanAmount float64
WaitAmount float64
FreezeAmount float64
PayforAmount float64
UpdateTime string
CreateTime string
}
const ACCOUNTINFO = "account_info"
func (c *AccountInfo) TableName() string {
return "account_info"
}
func GetAccountInfo(accountUid string) *AccountInfo {
o := orm.NewOrm()
account := new(AccountInfo)
if _, err := o.QueryTable(ACCOUNTINFO).Filter("account_uid", accountUid).All(account); err != nil {
logs.Error("获取account信息失败", err)
}
return account
}