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
68cd8519
Commit
68cd8519
authored
Apr 25, 2017
by
lee_mingzhu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询不到数据时返回成功。
parent
4193c4db
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
8 deletions
+2
-8
UserCenterController.java
...controller/external/user/center/UserCenterController.java
+2
-8
No files found.
src/main/java/cn/quantgroup/xyqb/controller/external/user/center/UserCenterController.java
View file @
68cd8519
...
...
@@ -248,7 +248,7 @@ public class UserCenterController {
List
<
Contact
>
contacts
=
JSONObject
.
parseObject
(
contactJson
,
new
TypeReference
<
List
<
Contact
>>()
{});
Timestamp
now
=
new
Timestamp
(
System
.
currentTimeMillis
());
if
(
CollectionUtils
.
isEmpty
(
contacts
))
{
return
JsonResult
.
buildErrorStateResult
(
null
,
null
);
return
JsonResult
.
buildErrorStateResult
(
"参数转换错误"
,
null
);
}
if
(
null
!=
userContact
&&
userContact
.
size
()
>
0
)
{
for
(
int
i
=
0
;
i
<
contacts
.
size
();
i
++)
{
...
...
@@ -283,7 +283,7 @@ public class UserCenterController {
Long
districtCode
,
String
district
)
{
LOGGER
.
info
(
"保存用户地址信息, phoneNo:{}, province:{}, provinceCode:{}, city:{}, cityCode:{}"
,
phoneNo
,
province
,
provinceCode
,
city
,
cityCode
);
if
(
StringUtils
.
isEmpty
(
phoneNo
)
||
provinceCode
==
null
||
cityCode
==
null
)
{
return
JsonResult
.
buildErrorStateResult
(
null
,
null
);
return
JsonResult
.
buildErrorStateResult
(
"参数错误"
,
null
);
}
Long
userId
=
queryUserId
(
phoneNo
);
if
(
null
==
userId
||
userId
==
0L
)
{
...
...
@@ -328,9 +328,6 @@ public class UserCenterController {
return
JsonResult
.
buildErrorStateResult
(
"该用户不存在"
,
null
);
}
Address
address
=
addressService
.
findByUserId
(
userId
);
if
(
address
==
null
)
{
return
JsonResult
.
buildErrorStateResult
(
null
,
null
);
}
return
JsonResult
.
buildSuccessResult
(
null
,
address
);
}
...
...
@@ -350,9 +347,6 @@ public class UserCenterController {
return
JsonResult
.
buildErrorStateResult
(
"该用户不存在"
,
null
);
}
List
<
Contact
>
contacts
=
contactService
.
findByUserId
(
userId
);
if
(
null
==
contacts
||
contacts
.
size
()
==
0
)
{
return
JsonResult
.
buildErrorStateResult
(
null
,
Collections
.
emptyList
());
}
return
JsonResult
.
buildSuccessResult
(
null
,
contacts
);
}
...
...
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