Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xyqb-user2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
head_group
xyqb-user2
Commits
0f0ab055
Commit
0f0ab055
authored
Feb 07, 2017
by
lee_mingzhu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove phone_no column
parent
dca45e7f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
9 deletions
+4
-9
UserController.java
...ntgroup/xyqb/controller/internal/user/UserController.java
+4
-9
No files found.
src/main/java/cn/quantgroup/xyqb/controller/internal/user/UserController.java
View file @
0f0ab055
...
@@ -382,14 +382,9 @@ public class UserController implements IBaseController {
...
@@ -382,14 +382,9 @@ public class UserController implements IBaseController {
User
user
=
verificateUserNameAndPassword
(
request
,
openId
);
User
user
=
verificateUserNameAndPassword
(
request
,
openId
);
if
(
user
==
null
)
{
if
(
user
==
null
)
{
return
JsonResult
.
buildErrorStateResult
(
"用户名或密码不正确"
,
null
);
return
JsonResult
.
buildErrorStateResult
(
"用户名或密码不正确"
,
null
);
}
else
{
//id为-1,微信重复绑定的标示.
if
(
user
.
getId
()
==
-
1L
)
{
return
JsonResult
.
buildErrorStateResult
(
"该手机号已绑定了其他微信账号."
,
null
);
}
}
return
new
JsonResult
(
sessionService
.
createSession
(
channelId
,
createdFrom
,
appChannel
,
user
,
merchant
));
return
new
JsonResult
(
sessionService
.
createSession
(
channelId
,
createdFrom
,
appChannel
,
user
,
merchant
));
}
}
}
private
User
verificateUserNameAndPassword
(
HttpServletRequest
request
,
String
openId
)
{
private
User
verificateUserNameAndPassword
(
HttpServletRequest
request
,
String
openId
)
{
String
credential
=
request
.
getHeader
(
"authorization"
);
String
credential
=
request
.
getHeader
(
"authorization"
);
...
@@ -410,9 +405,9 @@ public class UserController implements IBaseController {
...
@@ -410,9 +405,9 @@ public class UserController implements IBaseController {
}
}
String
userName
=
credentialArr
[
0
];
String
userName
=
credentialArr
[
0
];
String
pass
=
credentialArr
[
1
];
String
pass
=
credentialArr
[
1
];
/
*/
/判断是否微信登录(openId不为空,认为是微信登录)
//判断是否微信登录(openId不为空,认为是微信登录)
if(StringUtils.isNotEmpty(openId)) {
/*
if(StringUtils.isNotEmpty(openId)) {
WechatUserInfo wechatUserInfo = wechatService.findWechatUserInfo
FromDb(openId
);
WechatUserInfo wechatUserInfo = wechatService.findWechatUserInfo
ByPhoneNo(userName
);
//说明微信用户已经绑定过xyqb用户了
//说明微信用户已经绑定过xyqb用户了
if(wechatUserInfo != null && wechatUserInfo.getUserId() != null && wechatUserInfo.getUserId() != 0L) {
if(wechatUserInfo != null && wechatUserInfo.getUserId() != null && wechatUserInfo.getUserId() != 0L) {
//判断绑定的xyqb用户的手机号是否和本次登录的手机号一致
//判断绑定的xyqb用户的手机号是否和本次登录的手机号一致
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment