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
a9c9363c
Commit
a9c9363c
authored
Dec 25, 2017
by
技术部-任文超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化代码,防止Duplicate entry 'user_id' for key 'uni_idx_user_id'
parent
3e0a3634
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
UserController.java
...ntgroup/xyqb/controller/internal/user/UserController.java
+4
-5
No files found.
src/main/java/cn/quantgroup/xyqb/controller/internal/user/UserController.java
View file @
a9c9363c
...
...
@@ -42,6 +42,7 @@ import java.io.UnsupportedEncodingException;
import
java.nio.charset.Charset
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Objects
;
/**
* Http服务接口:用户注册、登录、重置密码
...
...
@@ -465,12 +466,10 @@ public class UserController implements IBaseController {
WechatUserInfo
userInfo
=
wechatService
.
findWechatUserInfoFromDb
(
openId
);
LOGGER
.
info
(
"微信关联openId,user:[{}],openId:[{}],wechatUserInfo:[{}]"
,
user
,
openId
,
userInfo
);
// 已经绑定过了
if
(
userInfo
!=
null
&&
StringUtils
.
isNotEmpty
(
userInfo
.
getPhoneNo
()))
{
return
JsonResult
.
buildSuccessResult
(
null
,
null
);
if
(
Objects
.
isNull
(
userInfo
)
&&
!
Objects
.
isNull
(
userId
))
{
userInfo
=
wechatService
.
queryOpenIdByUserId
(
userId
);
}
// 前置绑定微信出错
if
(
userInfo
==
null
)
{
if
(
userInfo
==
null
||
StringUtils
.
isNotEmpty
(
userInfo
.
getPhoneNo
()))
{
return
JsonResult
.
buildSuccessResult
(
null
,
null
);
}
// 未绑定信用钱包用户
...
...
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