1
This commit is contained in:
parent
8ea2c287fe
commit
e3f46eb356
@ -5,6 +5,7 @@ import (
|
||||
"f5"
|
||||
"main/constant"
|
||||
"fmt"
|
||||
"strings"
|
||||
"jccommon"
|
||||
)
|
||||
|
||||
@ -29,20 +30,23 @@ func GetAccountIdByAddress(accountAddress string) string {
|
||||
|
||||
func GetAccountIdByEmail(email string) string {
|
||||
accountId := ""
|
||||
f5.GetGoStyleDb().OrmSelectOne(
|
||||
constant.ACCOUNT_DB,
|
||||
"t_immutable_account",
|
||||
[][]string {
|
||||
{"email", email},
|
||||
},
|
||||
func (err error, ds *f5.DataSet) {
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
if ds.Next() {
|
||||
accountId = ds.GetByName("account_id")
|
||||
}
|
||||
})
|
||||
email = strings.ToLower(email)
|
||||
if email != "" {
|
||||
f5.GetGoStyleDb().OrmSelectOne(
|
||||
constant.ACCOUNT_DB,
|
||||
"t_immutable_account",
|
||||
[][]string {
|
||||
{"lower_case_email", email},
|
||||
},
|
||||
func (err error, ds *f5.DataSet) {
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
if ds.Next() {
|
||||
accountId = ds.GetByName("account_id")
|
||||
}
|
||||
})
|
||||
}
|
||||
return accountId
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user