Commit b44b26ff authored by szh's avatar szh

添加空头地址记录

parent 9afb71e7
package models
type RaspAddrAccounts struct {
Id int64 `json:"id" gorm:"PRIMARY_KEY"`
Addr string `json:"addr"`
Account string `json:"account"`
Balance int64 `json:"balance"`
Frozen int64 `json:"frozen"`
Label string `json:"label"`
AddTime int64 `json:"add_time"`
UpdateTime int64 `json:"update_time"`
}
func InsertNewAccounts(account *RaspAddrAccounts) error {
if err := db.Where(RaspAddrAccounts{Account: account.Account}).Assign(account).FirstOrCreate(account).Error; err != nil {
return err
}
return nil
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment