Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
xuzhenhao
/
xuzhenhao-dev-icesimbapolysdklogin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit bb25f079
authored
Dec 07, 2017
by
xuzhenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加了token的授权
1 parent
a003fc97
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
src/loginserver/models/user.go
src/loginserver/models/user.go
View file @
bb25f07
...
...
@@ -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
}
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment