|
|
@@ -583,7 +583,7 @@ func GetLoginAccountByMobile(mobile string) (*Loginaccount, error) {
|
|
|
if mobileEncrypted, err := utils.AESEncrypt([]byte(mobile), key); err == nil {
|
|
|
// 加密成功后进行查询
|
|
|
has, err = engine.Join("INNER", "USERINFO", "USERINFO.USERID = LOGINACCOUNT.USERID").
|
|
|
- Where("USERINFO.MOBILE = ?", hex.EncodeToString(mobileEncrypted)).Get(&loginaccount)
|
|
|
+ Where("USERINFO.USERSTATUS = 1 and USERINFO.MOBILE = ?", hex.EncodeToString(mobileEncrypted)).Get(&loginaccount)
|
|
|
if err != nil {
|
|
|
return nil, err
|
|
|
}
|
|
|
@@ -606,7 +606,7 @@ func GetLoginAccount2(mobile string) (*Loginaccount, error) {
|
|
|
key, _ := hex.DecodeString(utils.AESSecretKey)
|
|
|
if mobileEncrypted, err := utils.AESEncrypt([]byte(mobile), key); err == nil {
|
|
|
// 加密成功后进行查询
|
|
|
- has, err = engine.Where("MOBILE = ?", hex.EncodeToString(mobileEncrypted)).Get(&loginaccount)
|
|
|
+ has, err = engine.Where("LOGINSTATUS = 1 and MOBILE = ?", hex.EncodeToString(mobileEncrypted)).Get(&loginaccount)
|
|
|
if err != nil {
|
|
|
return nil, err
|
|
|
}
|