|
|
@@ -91,13 +91,13 @@ func getLoginAccount(userName string, password string) (loginaccount *accountMod
|
|
|
if mobileEncrypted, _ := utils.AESEncrypt([]byte(userName), key); mobileEncrypted != nil {
|
|
|
// 从三方表获取LoginID
|
|
|
userauthinfo := &accountModel.Userauthinfo{
|
|
|
- AUTHID: string(mobileEncrypted),
|
|
|
+ AUTHID: hex.EncodeToString(mobileEncrypted),
|
|
|
AUTHTYPE: 3,
|
|
|
}
|
|
|
- if has, _ := global.M2A_DB.Get(&userauthinfo); has {
|
|
|
+ if has, _ := global.M2A_DB.Get(userauthinfo); has {
|
|
|
loginaccount = &accountModel.Loginaccount{
|
|
|
LOGINID: userauthinfo.LOGINID,
|
|
|
- PASSWORD: utils.EncoderSha256(fmt.Sprintf("%s%s", userName, pwd)), // 构建数据库存储的密码
|
|
|
+ PASSWORD: utils.EncoderSha256(fmt.Sprintf("%v%s", userauthinfo.LOGINID, pwd)), // 构建数据库存储的密码
|
|
|
}
|
|
|
if has, _ := global.M2A_DB.Get(loginaccount); has {
|
|
|
return
|