Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
youjj
cloud-platform
Commits
fa230732
Commit
fa230732
authored
Dec 22, 2019
by
libin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户身份信息修改
parent
25e0d6cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
19 deletions
+24
-19
AppUserPositionTempBiz.java
...ub/wxiaoqi/security/admin/biz/AppUserPositionTempBiz.java
+24
-19
No files found.
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/AppUserPositionTempBiz.java
View file @
fa230732
...
...
@@ -316,31 +316,36 @@ public class AppUserPositionTempBiz extends BaseBiz<AppUserPositionTempMapper, A
public
void
setPostionIdByPhone
(
String
phone
)
{
try
{
Example
example
=
new
Example
(
AppUserPositionTemp
.
class
);
example
.
createCriteria
().
andEqualTo
(
"phone"
,
phone
).
andEqualTo
(
"isDel"
,
0
);
List
<
AppUserPositionTemp
>
list
=
selectByExample
(
example
);
if
(
CollectionUtils
.
isEmpty
(
list
))
{
log
.
info
(
"----用户无身份----phone==="
+
phone
);
return
;
}
AppUserPositionTemp
positionTemp
=
list
.
get
(
0
);
if
(
positionTemp
.
getUserId
()
>
0
)
{
log
.
info
(
"----用户已存在身份----phone==="
+
phone
);
return
;
}
//根据手机号查询userId
AppUserLogin
userLogin
=
loginBiz
.
checkeUserLogin
(
phone
);
Integer
userId
=
userLogin
.
getId
();
if
(
userLogin
==
null
)
{
log
.
info
(
"----用户不存在----phone==="
+
phone
);
return
;
}
Integer
userId
=
userLogin
.
getId
();
positionTemp
.
setUserId
(
userId
);
int
num
=
updateSelectiveByIdRe
(
positionTemp
);
if
(
num
>
0
)
{
Integer
postionId
=
positionTemp
.
getPositionId
();
log
.
info
(
"----用户---postionId===="
+
postionId
+
"----phone==="
+
phone
);
detailBiz
.
updateUserPositionByUserId
(
userId
,
postionId
);
Integer
postionId
=
appShareholderDetailBiz
.
findShareholderByUserIdOrPhone
(
null
,
phone
);
if
(
Objects
.
isNull
(
postionId
))
{
Example
example
=
new
Example
(
AppUserPositionTemp
.
class
);
example
.
createCriteria
().
andEqualTo
(
"phone"
,
phone
).
andEqualTo
(
"isDel"
,
0
);
List
<
AppUserPositionTemp
>
list
=
selectByExample
(
example
);
if
(
CollectionUtils
.
isEmpty
(
list
))
{
log
.
info
(
"----用户无身份----phone==="
+
phone
);
return
;
}
AppUserPositionTemp
positionTemp
=
list
.
get
(
0
);
if
(
positionTemp
.
getUserId
()
>
0
)
{
log
.
info
(
"----用户已存在身份----phone==="
+
phone
);
return
;
}
positionTemp
.
setUserId
(
userId
);
int
num
=
updateSelectiveByIdRe
(
positionTemp
);
if
(
num
>
0
)
{
postionId
=
positionTemp
.
getPositionId
();
log
.
info
(
"----用户---postionId===="
+
postionId
+
"----phone==="
+
phone
);
detailBiz
.
updateUserPositionByUserId
(
userId
,
postionId
);
}
}
else
{
detailBiz
.
updateUserPositionByUserId
(
userId
,
postionId
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
...
...
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