This commit is contained in:
aozhiwei 2024-08-17 11:56:15 +08:00
parent 8ea2c287fe
commit e3f46eb356

View File

@ -5,6 +5,7 @@ import (
"f5" "f5"
"main/constant" "main/constant"
"fmt" "fmt"
"strings"
"jccommon" "jccommon"
) )
@ -29,11 +30,13 @@ func GetAccountIdByAddress(accountAddress string) string {
func GetAccountIdByEmail(email string) string { func GetAccountIdByEmail(email string) string {
accountId := "" accountId := ""
email = strings.ToLower(email)
if email != "" {
f5.GetGoStyleDb().OrmSelectOne( f5.GetGoStyleDb().OrmSelectOne(
constant.ACCOUNT_DB, constant.ACCOUNT_DB,
"t_immutable_account", "t_immutable_account",
[][]string { [][]string {
{"email", email}, {"lower_case_email", email},
}, },
func (err error, ds *f5.DataSet) { func (err error, ds *f5.DataSet) {
if err != nil { if err != nil {
@ -43,6 +46,7 @@ func GetAccountIdByEmail(email string) string {
accountId = ds.GetByName("account_id") accountId = ds.GetByName("account_id")
} }
}) })
}
return accountId return accountId
} }