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
062121e1
Commit
062121e1
authored
Jan 04, 2018
by
技术部-任文超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
补充注册渠道主键以及二级商户主键
parent
6a44731c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
81 additions
and
54 deletions
+81
-54
InnerController.java
...tgroup/xyqb/controller/external/user/InnerController.java
+38
-21
UserAssociationModel.java
...n/java/cn/quantgroup/xyqb/model/UserAssociationModel.java
+43
-33
No files found.
src/main/java/cn/quantgroup/xyqb/controller/external/user/InnerController.java
View file @
062121e1
...
...
@@ -56,6 +56,8 @@ public class InnerController implements IBaseController {
@Autowired
private
IUserDetailService
userDetailService
;
@Autowired
private
IUserBtRegisterService
userBtRegisterService
;
@Autowired
private
IIdCardService
idCardService
;
@Autowired
private
IUserExtInfoService
userExtInfoService
;
...
...
@@ -596,17 +598,29 @@ public class InnerController implements IBaseController {
@RequestMapping
(
"/user-association/search/userId"
)
@LogHttpCaller
public
JsonResult
findUserAssociationModelByUserId
(
Long
userId
)
{
UserDetail
userDetail
=
userDetailService
.
findByUserId
(
userId
);
if
(
Objects
.
isNull
(
userId
)
||
userId
<
0
){
return
JsonResult
.
buildErrorStateResult
(
""
,
""
);
}
UserAssociationModel
bean
=
new
UserAssociationModel
();
if
(
null
!=
userDetail
)
{
UserExtInfo
extInfo
=
userExtInfoService
.
findByUserId
(
userDetail
.
getUserId
());
UserDetail
userDetail
=
userDetailService
.
findByUserId
(
userId
);
if
(!
Objects
.
isNull
(
userDetail
))
{
bean
.
setId
(
userDetail
.
getUserId
());
bean
.
setPhoneNo
(
userDetail
.
getPhoneNo
());
bean
.
setName
(
userDetail
.
getName
());
bean
.
setIdNo
(
userDetail
.
getIdNo
());
bean
.
setQq
(
userDetail
.
getQq
());
bean
.
setGender
(
Optional
.
ofNullable
(
userDetail
.
getGender
()).
orElse
(
cn
.
quantgroup
.
xyqb
.
model
.
Gender
.
UNKNOWN
).
getName
());
if
(
null
!=
extInfo
)
{
}
User
user
=
userService
.
findById
(
userId
);
if
(!
Objects
.
isNull
(
user
))
{
bean
.
setRegisterFrom
(
user
.
getRegisteredFrom
());
}
UserBtRegister
userBtRegister
=
userBtRegisterService
.
findByUserId
(
userId
);
if
(!
Objects
.
isNull
(
userBtRegister
))
{
bean
.
setMerchantId
(
userBtRegister
.
getRegisterBtMerchantId
());
}
UserExtInfo
extInfo
=
userExtInfoService
.
findByUserId
(
userDetail
.
getUserId
());
if
(!
Objects
.
isNull
(
extInfo
))
{
if
(
null
==
extInfo
.
getEducationEnum
()){
bean
.
setEducationEnum
(
cn
.
quantgroup
.
user
.
enums
.
EducationEnum
.
UNKNOWN
.
getName
());
}
else
{
...
...
@@ -624,8 +638,11 @@ public class InnerController implements IBaseController {
}
}
Address
address
=
addressService
.
findByUserId
(
userDetail
.
getUserId
());
List
<
Contact
>
contacts
=
contactService
.
findByUserId
(
userDetail
.
getUserId
(),
true
);
if
(!
Objects
.
isNull
(
address
))
{
bean
.
putAddressList
(
Arrays
.
asList
(
address
));
}
List
<
Contact
>
contacts
=
contactService
.
findByUserId
(
userDetail
.
getUserId
(),
true
);
if
(!
Objects
.
isNull
(
address
))
{
bean
.
putContractList
(
contacts
);
}
return
JsonResult
.
buildSuccessResult
(
""
,
bean
);
...
...
src/main/java/cn/quantgroup/xyqb/model/UserAssociationModel.java
View file @
062121e1
...
...
@@ -27,9 +27,15 @@ public class UserAssociationModel implements Serializable {
private
String
educationEnum
;
private
String
occupationEnum
;
private
String
qq
;
private
Long
registerFrom
;
private
Long
merchantId
;
private
List
<
AddressModel
>
addressList
;
private
List
<
ContactModel
>
contractList
;
/**
* 填充地址模型列表
* @param entitylist
*/
public
void
putAddressList
(
List
<
Address
>
entitylist
){
if
(
Objects
.
isNull
(
entitylist
)){
return
;
...
...
@@ -42,6 +48,10 @@ public class UserAssociationModel implements Serializable {
}
}
/**
* 填充联系人模型列表
* @param entitylist
*/
public
void
putContractList
(
List
<
Contact
>
entitylist
){
if
(
Objects
.
isNull
(
entitylist
)){
return
;
...
...
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