Commit bb25f079 by xuzhenhao

增加了token的授权

1 parent a003fc97
Showing with 2 additions and 2 deletions
......@@ -95,7 +95,7 @@ func CheckUserNameRepeat(userName string) (result interface{}, err error) {
//获取用户信息
func GetUserInfoByUserName(userName string) (result interface{}, err error) {
u := make([]UserInfo, 0)
sql := ` select id,user_name,user_password from icesimba_polysdk_user where user_name = ?`
sql := ` select id,user_name,user_password from icesimba_polysdk_user where user_name = ? limit 1`
err = db.Engine.Sql(sql, userName).Find(&u)
if err != nil {
return "104001", err
......@@ -105,7 +105,7 @@ func GetUserInfoByUserName(userName string) (result interface{}, err error) {
return "105003", err
}
return u, nil
return u[0], nil
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!