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
4193c4db
Commit
4193c4db
authored
Apr 24, 2017
by
lee_mingzhu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
允许修改用户经济和联系人信息以及地址
parent
77eebf4a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
UserCenterController.java
...controller/external/user/center/UserCenterController.java
+11
-11
No files found.
src/main/java/cn/quantgroup/xyqb/controller/external/user/center/UserCenterController.java
View file @
4193c4db
...
@@ -56,7 +56,7 @@ public class UserCenterController {
...
@@ -56,7 +56,7 @@ public class UserCenterController {
public
JsonResult
userCenterIndex
(
String
phoneNo
)
{
public
JsonResult
userCenterIndex
(
String
phoneNo
)
{
Long
userId
=
queryUserId
(
phoneNo
);
Long
userId
=
queryUserId
(
phoneNo
);
if
(
null
==
userId
||
userId
==
0L
)
{
if
(
null
==
userId
||
userId
==
0L
)
{
return
JsonResult
.
buildErrorStateResult
(
null
,
null
);
return
JsonResult
.
buildErrorStateResult
(
"该用户不存在"
,
null
);
}
}
UserAttached
userAttached
=
userCenterService
.
searchUserAttachedByUserId
(
userId
);
UserAttached
userAttached
=
userCenterService
.
searchUserAttachedByUserId
(
userId
);
Map
<
String
,
String
>
result
=
new
HashMap
<>();
Map
<
String
,
String
>
result
=
new
HashMap
<>();
...
@@ -86,7 +86,7 @@ public class UserCenterController {
...
@@ -86,7 +86,7 @@ public class UserCenterController {
}
}
Long
userId
=
queryUserId
(
phoneNo
);
Long
userId
=
queryUserId
(
phoneNo
);
if
(
null
==
userId
||
userId
==
0L
)
{
if
(
null
==
userId
||
userId
==
0L
)
{
return
JsonResult
.
buildErrorStateResult
(
null
,
null
);
return
JsonResult
.
buildErrorStateResult
(
"该用户不存在"
,
null
);
}
}
if
(
StringUtils
.
isBlank
(
avatarUrl
))
{
if
(
StringUtils
.
isBlank
(
avatarUrl
))
{
avatarUrl
=
Constants
.
UserAvatar
.
AVATAR_DEFAULT
;
avatarUrl
=
Constants
.
UserAvatar
.
AVATAR_DEFAULT
;
...
@@ -120,7 +120,7 @@ public class UserCenterController {
...
@@ -120,7 +120,7 @@ public class UserCenterController {
}
}
Long
userId
=
queryUserId
(
phoneNo
);
Long
userId
=
queryUserId
(
phoneNo
);
if
(
null
==
userId
||
userId
==
0L
)
{
if
(
null
==
userId
||
userId
==
0L
)
{
return
JsonResult
.
buildErrorStateResult
(
null
,
null
);
return
JsonResult
.
buildErrorStateResult
(
"该用户不存在"
,
null
);
}
}
UserAttached
userAttached
=
userCenterService
.
searchUserAttachedByUserId
(
userId
);
UserAttached
userAttached
=
userCenterService
.
searchUserAttachedByUserId
(
userId
);
if
(
null
!=
userAttached
)
{
if
(
null
!=
userAttached
)
{
...
@@ -144,7 +144,7 @@ public class UserCenterController {
...
@@ -144,7 +144,7 @@ public class UserCenterController {
}
}
Long
userId
=
queryUserId
(
phoneNo
);
Long
userId
=
queryUserId
(
phoneNo
);
if
(
null
==
userId
||
userId
==
0L
)
{
if
(
null
==
userId
||
userId
==
0L
)
{
return
JsonResult
.
buildErrorStateResult
(
null
,
null
);
return
JsonResult
.
buildErrorStateResult
(
"该用户不存在"
,
null
);
}
}
UserAttached
userAttached
=
userCenterService
.
searchUserAttachedByUserId
(
userId
);
UserAttached
userAttached
=
userCenterService
.
searchUserAttachedByUserId
(
userId
);
if
(
null
==
userAttached
)
{
if
(
null
==
userAttached
)
{
...
@@ -170,7 +170,7 @@ public class UserCenterController {
...
@@ -170,7 +170,7 @@ public class UserCenterController {
}
}
Long
userId
=
queryUserId
(
phoneNo
);
Long
userId
=
queryUserId
(
phoneNo
);
if
(
null
==
userId
||
userId
==
0L
)
{
if
(
null
==
userId
||
userId
==
0L
)
{
return
JsonResult
.
buildErrorStateResult
(
null
,
null
);
return
JsonResult
.
buildErrorStateResult
(
"该用户不存在"
,
null
);
}
}
UserDetail
userDetail
=
userDetailService
.
findByUserId
(
userId
);
UserDetail
userDetail
=
userDetailService
.
findByUserId
(
userId
);
if
(
null
!=
userDetail
)
{
if
(
null
!=
userDetail
)
{
...
@@ -192,7 +192,7 @@ public class UserCenterController {
...
@@ -192,7 +192,7 @@ public class UserCenterController {
}
}
Long
userId
=
queryUserId
(
phoneNo
);
Long
userId
=
queryUserId
(
phoneNo
);
if
(
null
==
userId
||
userId
==
0L
)
{
if
(
null
==
userId
||
userId
==
0L
)
{
return
JsonResult
.
buildErrorStateResult
(
null
,
null
);
return
JsonResult
.
buildErrorStateResult
(
"该用户不存在"
,
null
);
}
}
UserExtInfo
userExtInfo
=
userExtInfoService
.
findByUserId
(
userId
);
UserExtInfo
userExtInfo
=
userExtInfoService
.
findByUserId
(
userId
);
List
<
Contact
>
contacts
=
contactService
.
findByUserId
(
userId
);
List
<
Contact
>
contacts
=
contactService
.
findByUserId
(
userId
);
...
@@ -234,7 +234,7 @@ public class UserCenterController {
...
@@ -234,7 +234,7 @@ public class UserCenterController {
Long
userId
=
queryUserId
(
phoneNo
);
Long
userId
=
queryUserId
(
phoneNo
);
if
(
null
==
userId
||
userId
==
0L
)
{
if
(
null
==
userId
||
userId
==
0L
)
{
LOGGER
.
error
(
"保存联系人,未获取到用户id. userId:{}"
,
userId
);
LOGGER
.
error
(
"保存联系人,未获取到用户id. userId:{}"
,
userId
);
return
JsonResult
.
buildErrorStateResult
(
null
,
null
);
return
JsonResult
.
buildErrorStateResult
(
"该用户不存在"
,
null
);
}
}
if
(
StringUtils
.
isEmpty
(
contactJson
))
{
if
(
StringUtils
.
isEmpty
(
contactJson
))
{
LOGGER
.
error
(
"保存联系人,联系人参数为空.contactJson:{}"
,
contactJson
);
LOGGER
.
error
(
"保存联系人,联系人参数为空.contactJson:{}"
,
contactJson
);
...
@@ -288,7 +288,7 @@ public class UserCenterController {
...
@@ -288,7 +288,7 @@ public class UserCenterController {
Long
userId
=
queryUserId
(
phoneNo
);
Long
userId
=
queryUserId
(
phoneNo
);
if
(
null
==
userId
||
userId
==
0L
)
{
if
(
null
==
userId
||
userId
==
0L
)
{
LOGGER
.
error
(
"保存联系人,未获取到用户id. userId:{}"
,
userId
);
LOGGER
.
error
(
"保存联系人,未获取到用户id. userId:{}"
,
userId
);
return
JsonResult
.
buildErrorStateResult
(
null
,
null
);
return
JsonResult
.
buildErrorStateResult
(
"该用户不存在"
,
null
);
}
}
//查询用户是否有保存地址信息
//查询用户是否有保存地址信息
Address
addressInfo
=
addressService
.
findByUserId
(
userId
);
Address
addressInfo
=
addressService
.
findByUserId
(
userId
);
...
@@ -325,7 +325,7 @@ public class UserCenterController {
...
@@ -325,7 +325,7 @@ public class UserCenterController {
Long
userId
=
queryUserId
(
phoneNo
);
Long
userId
=
queryUserId
(
phoneNo
);
if
(
null
==
userId
||
userId
==
0L
)
{
if
(
null
==
userId
||
userId
==
0L
)
{
LOGGER
.
error
(
"保存联系人,未获取到用户id. userId:{}"
,
userId
);
LOGGER
.
error
(
"保存联系人,未获取到用户id. userId:{}"
,
userId
);
return
JsonResult
.
buildErrorStateResult
(
null
,
null
);
return
JsonResult
.
buildErrorStateResult
(
"该用户不存在"
,
null
);
}
}
Address
address
=
addressService
.
findByUserId
(
userId
);
Address
address
=
addressService
.
findByUserId
(
userId
);
if
(
address
==
null
)
{
if
(
address
==
null
)
{
...
@@ -347,7 +347,7 @@ public class UserCenterController {
...
@@ -347,7 +347,7 @@ public class UserCenterController {
Long
userId
=
queryUserId
(
phoneNo
);
Long
userId
=
queryUserId
(
phoneNo
);
if
(
null
==
userId
||
userId
==
0L
)
{
if
(
null
==
userId
||
userId
==
0L
)
{
LOGGER
.
error
(
"保存联系人,未获取到用户id. userId:{}"
,
userId
);
LOGGER
.
error
(
"保存联系人,未获取到用户id. userId:{}"
,
userId
);
return
JsonResult
.
buildErrorStateResult
(
null
,
null
);
return
JsonResult
.
buildErrorStateResult
(
"该用户不存在"
,
null
);
}
}
List
<
Contact
>
contacts
=
contactService
.
findByUserId
(
userId
);
List
<
Contact
>
contacts
=
contactService
.
findByUserId
(
userId
);
if
(
null
==
contacts
||
contacts
.
size
()
==
0
)
{
if
(
null
==
contacts
||
contacts
.
size
()
==
0
)
{
...
@@ -372,7 +372,7 @@ public class UserCenterController {
...
@@ -372,7 +372,7 @@ public class UserCenterController {
Long
userId
=
queryUserId
(
phoneNo
);
Long
userId
=
queryUserId
(
phoneNo
);
if
(
null
==
userId
||
userId
==
0L
)
{
if
(
null
==
userId
||
userId
==
0L
)
{
LOGGER
.
error
(
"保存用户经济信息,未获取到用户id. userId:{}"
,
userId
);
LOGGER
.
error
(
"保存用户经济信息,未获取到用户id. userId:{}"
,
userId
);
return
JsonResult
.
buildErrorStateResult
(
null
,
null
);
return
JsonResult
.
buildErrorStateResult
(
"该用户不存在"
,
null
);
}
}
//查询用户是否保存过.
//查询用户是否保存过.
UserExtInfo
userExtInfo
=
userExtInfoService
.
findByUserId
(
userId
);
UserExtInfo
userExtInfo
=
userExtInfoService
.
findByUserId
(
userId
);
...
...
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