|
@@ -8,7 +8,7 @@ import ( |
|
|
// UserFindByMobile search user by mobile |
|
|
// UserFindByMobile search user by mobile |
|
|
func UserFindByMobile(Db *xorm.Engine, mobile string) (*model.User, error) { |
|
|
func UserFindByMobile(Db *xorm.Engine, mobile string) (*model.User, error) { |
|
|
var m model.User |
|
|
var m model.User |
|
|
if has, err := Db.Where("phone = ? AND delete_at = 0", mobile, mobile). |
|
|
|
|
|
|
|
|
if has, err := Db.Where("phone = ? AND delete_at = 0", mobile). |
|
|
Get(&m); err != nil || has == false { |
|
|
Get(&m); err != nil || has == false { |
|
|
return nil, err |
|
|
return nil, err |
|
|
} |
|
|
} |
|
|