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
80203624
Commit
80203624
authored
Mar 20, 2020
by
xiaoguang.xu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户扩展信息保存、修改,更新属性名与文档一致。
parent
e56afe11
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
+15
-4
UserExtController.java
...qb/controller/middleoffice/userext/UserExtController.java
+14
-3
UserExtReq.java
.../xyqb/controller/middleoffice/userext/req/UserExtReq.java
+1
-1
No files found.
src/main/java/cn/quantgroup/xyqb/controller/middleoffice/userext/UserExtController.java
View file @
80203624
...
...
@@ -2,7 +2,9 @@ package cn.quantgroup.xyqb.controller.middleoffice.userext;
import
cn.quantgroup.xyqb.controller.middleoffice.userext.req.UserExtReq
;
import
cn.quantgroup.xyqb.entity.Address
;
import
cn.quantgroup.xyqb.entity.User
;
import
cn.quantgroup.xyqb.entity.UserExtInfo
;
import
cn.quantgroup.xyqb.model.JsonResult
;
import
cn.quantgroup.xyqb.service.user.*
;
import
org.apache.commons.collections.CollectionUtils
;
...
...
@@ -47,12 +49,21 @@ public class UserExtController {
contactService
.
save
(
userId
,
userExtReq
.
getContacts
());
}
if
(
userExtReq
.
getAddress
()
!=
null
)
{
Address
address
=
addressService
.
findByUserId
(
userId
);
if
(
address
!=
null
)
{
userExtReq
.
getAddress
().
setId
(
address
.
getId
());
}
userExtReq
.
getAddress
().
setUserId
(
userId
);
addressService
.
save
(
userExtReq
.
getAddress
());
}
if
(
userExtReq
.
getUserExtInfo
()
!=
null
)
{
userExtReq
.
getUserExtInfo
().
setUserId
(
userId
);
userExtInfoService
.
save
(
userExtReq
.
getUserExtInfo
());
if
(
userExtReq
.
getExtInfo
()
!=
null
)
{
UserExtInfo
extInfo
=
userExtInfoService
.
findByUserId
(
userId
);
if
(
extInfo
!=
null
)
{
Long
id
=
extInfo
.
getId
();
userExtReq
.
getExtInfo
().
setId
(
id
);
}
userExtReq
.
getExtInfo
().
setUserId
(
userId
);
userExtInfoService
.
save
(
userExtReq
.
getExtInfo
());
}
return
JsonResult
.
buildSuccessResult
();
}
...
...
src/main/java/cn/quantgroup/xyqb/controller/middleoffice/userext/req/UserExtReq.java
View file @
80203624
...
...
@@ -11,7 +11,7 @@ import java.util.List;
public
class
UserExtReq
{
private
List
<
Contact
>
contacts
;
private
Address
address
;
private
UserExtInfo
userE
xtInfo
;
private
UserExtInfo
e
xtInfo
;
private
String
email
;
private
String
qq
;
}
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