|
|
@@ -1,3 +1,11 @@
|
|
|
+/*
|
|
|
+ * @Author: deng.yinping deng.yinping@muchinfo.cn
|
|
|
+ * @Date: 2024-02-22 11:11:03
|
|
|
+ * @LastEditors: deng.yinping deng.yinping@muchinfo.cn
|
|
|
+ * @LastEditTime: 2024-04-17 14:52:08
|
|
|
+ * @FilePath: \MTP20_IF\controllers\user\login.go
|
|
|
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
|
+ */
|
|
|
package user
|
|
|
|
|
|
import (
|
|
|
@@ -42,14 +50,21 @@ func GetLoginID(c *gin.Context) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- // 通过LoginAccount表手机号码查询登录账号
|
|
|
- if loginaccount, _ := models.GetLoginAccount2(req.UserName); loginaccount != nil {
|
|
|
- appG.Response(http.StatusOK, e.SUCCESS, fmt.Sprintf("%v", loginaccount.Loginid))
|
|
|
- return
|
|
|
- }
|
|
|
+ // // 通过LoginAccount表手机号码查询登录账号
|
|
|
+ // if loginaccount, _ := models.GetLoginAccount2(req.UserName); loginaccount != nil {
|
|
|
+ // appG.Response(http.StatusOK, e.SUCCESS, fmt.Sprintf("%v", loginaccount.Loginid))
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+
|
|
|
+ // // 通过UserInfo表手机号码查询登录账号
|
|
|
+ // if loginaccount, _ := models.GetLoginAccountByMobile(req.UserName); loginaccount != nil {
|
|
|
+ // appG.Response(http.StatusOK, e.SUCCESS, fmt.Sprintf("%v", loginaccount.Loginid))
|
|
|
+ // return
|
|
|
+ // }
|
|
|
|
|
|
- // 通过UserInfo表手机号码查询登录账号
|
|
|
- if loginaccount, _ := models.GetLoginAccountByMobile(req.UserName); loginaccount != nil {
|
|
|
+ // 根据登录账号与手机号绑定表获取登录账号(上面两个查询不正确 20240417)
|
|
|
+ // GetLoginAccountByMobile2 通过手机号码查询登录账号信息(三方认证表 userauthinfo)
|
|
|
+ if loginaccount, _ := models.GetLoginAccountByMobile2(req.UserName); loginaccount != nil {
|
|
|
appG.Response(http.StatusOK, e.SUCCESS, fmt.Sprintf("%v", loginaccount.Loginid))
|
|
|
return
|
|
|
}
|