Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
caosy
/
fun-golf-mobile
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
f3ab5886
authored
Sep 13, 2018
by
Huang Linyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加姓名查询
parent
f90e5fef
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
1 deletions
src/main/java/com/ctrip/fun/golf/api/user/UserMController.java
src/main/java/com/ctrip/fun/golf/service/user/UserMService.java
src/main/resources/rpc.properties
src/main/java/com/ctrip/fun/golf/api/user/UserMController.java
View file @
f3ab5886
...
...
@@ -652,6 +652,26 @@ public class UserMController {
return
mp
;
}
/**
* 用户详情
*
* @param UserQuery
* UserQuery
* @return
*/
@SuppressWarnings
(
"unchecked"
)
@ResponseBody
@RequestMapping
(
value
=
"/v1/usersName/{userName}"
,
method
=
RequestMethod
.
GET
)
public
List
<
UserBean
>
userDetailByName
(
@PathVariable
String
userName
)
{
UserQuery
userQuery
=
new
UserQuery
();
userQuery
.
setUid
(
userName
);
List
<
UserBean
>
beanList
=
userMService
.
findUserByName
(
userName
);
return
beanList
;
}
@ResponseBody
@RequestMapping
(
value
=
"/v1/me/adr/{token}"
,
method
=
RequestMethod
.
GET
)
@Security
...
...
src/main/java/com/ctrip/fun/golf/service/user/UserMService.java
View file @
f3ab5886
...
...
@@ -18,7 +18,6 @@ import com.ctrip.fun.common.vo.user.ChangePasswordBean;
import
com.ctrip.fun.common.vo.user.ImUserBean
;
import
com.ctrip.fun.common.vo.user.LoginBean
;
import
com.ctrip.fun.common.vo.user.LoginResultBean
;
import
com.ctrip.fun.common.vo.user.MiniAppLoginBean
;
import
com.ctrip.fun.common.vo.user.MiniAppLoginResultBean
;
import
com.ctrip.fun.common.vo.user.RecommendRankBean
;
import
com.ctrip.fun.common.vo.user.RecommendUserBean
;
...
...
@@ -410,6 +409,26 @@ public class UserMService extends BaseService {
}
public
List
<
UserBean
>
findUserByName
(
String
uid
)
{
UserQuery
userQuery
=
new
UserQuery
();
userQuery
.
setUid
(
uid
);
Request
<
UserQuery
>
request
=
new
Request
<
UserQuery
>(
""
,
userQuery
);
HttpEntity
<
Request
<
UserQuery
>>
entity
=
new
HttpEntity
<
Request
<
UserQuery
>>(
request
);
List
<
UserBean
>
responseBean
=
null
;
Response
<
List
<
UserBean
>>
response
=
super
.
exchange
(
this
.
getServiceUri
(
"uri.user.findUserByName"
),
HttpMethod
.
POST
,
entity
,
new
ParameterizedTypeReference
<
Response
<
List
<
UserBean
>>>()
{
}).
getBody
();
if
(
response
.
getStatus
()
==
0
)
{
responseBean
=
response
.
getBody
();
}
else
{
logger
.
error
(
"[list] status:{}, msg: {}"
,
response
.
getStatus
(),
response
.
getMessage
());
throw
new
RestException
(
500
,
response
.
getMessage
());
}
return
responseBean
;
}
public
Integer
resetPassord
(
ChangePasswordBean
changePasswordBean
)
{
Request
<
ChangePasswordBean
>
request
=
new
Request
<
ChangePasswordBean
>(
""
,
...
...
src/main/resources/rpc.properties
View file @
f3ab5886
...
...
@@ -68,6 +68,7 @@ uri.order.rebook=/fun-golf-service/Order/rebook
uri.user.login
=
/fun-golf-service/user/login
uri.user.userDetailByToken
=
/fun-golf-service/user/userDetailByToken
uri.user.userDetail
=
/fun-golf-service/user/userDetail
uri.user.findUserByName
=
/fun-golf-service/user/findUserByName
uri.user.sendVerifyCode
=
/fun-golf-service/user/sendVerifyCode
uri.user.validateMobilePhone
=
/fun-golf-service/user/validateMobilePhone
uri.user.register
=
/fun-golf-service/user/register
...
...
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