13 lines
266 B
Go
13 lines
266 B
Go
package model
|
|
|
|
func SelectByUserId(id int) Account {
|
|
var obj Account
|
|
DB.Model(&Account{}).Find(&obj,id)
|
|
return obj
|
|
}
|
|
|
|
func SelectByAccountNumber(phone string) Account {
|
|
var obj Account
|
|
DB.Model(&Account{}).Where(&Account{TelNum: phone}).Find(&obj)
|
|
return obj
|
|
} |