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
f77153ae
authored
Aug 06, 2018
by
Huang Linyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加排名数据返回接口
parent
f62d9cfc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
0 deletions
src/main/java/com/ctrip/fun/golf/api/version/RecommendStaticController.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/version/RecommendStaticController.java
0 → 100644
View file @
f77153ae
package
com
.
ctrip
.
fun
.
golf
.
api
.
version
;
import
java.util.ArrayList
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
com.ctrip.fun.common.vo.Response
;
import
com.ctrip.fun.common.vo.user.RecommendRankBean
;
import
com.ctrip.fun.golf.service.user.UserMService
;
@Controller
@RequestMapping
(
value
=
"/recommend/static"
)
public
class
RecommendStaticController
{
@Autowired
private
UserMService
userService
;
@ResponseBody
@RequestMapping
(
value
=
"/ranking"
,
method
=
RequestMethod
.
POST
)
public
Response
<
List
<
RecommendRankBean
>>
getRanking
()
{
Response
<
List
<
RecommendRankBean
>>
response
=
new
Response
<
List
<
RecommendRankBean
>>();
List
<
RecommendRankBean
>
rankingList
=
new
ArrayList
<
RecommendRankBean
>();
// 查询数据库最新版本的App
rankingList
=
userService
.
getRanking
();
response
.
setBody
(
rankingList
);
return
response
;
}
}
src/main/java/com/ctrip/fun/golf/service/user/UserMService.java
View file @
f77153ae
...
...
@@ -20,6 +20,7 @@ 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
;
import
com.ctrip.fun.common.vo.user.RecommendUserItemBean
;
import
com.ctrip.fun.common.vo.user.RecommendUserListQuery
;
...
...
@@ -738,4 +739,15 @@ public class UserMService extends BaseService {
return
response
.
getBody
();
}
public
List
<
RecommendRankBean
>
getRanking
()
{
HttpEntity
<
String
>
entity
=
new
HttpEntity
<
String
>(
""
);
Response
<
List
<
RecommendRankBean
>>
response
=
super
.
exchange
(
this
.
getServiceUri
(
"uri.recommend.getRanking"
),
HttpMethod
.
POST
,
entity
,
new
ParameterizedTypeReference
<
Response
<
List
<
RecommendRankBean
>>>()
{
}).
getBody
();
return
response
.
getBody
();
}
}
src/main/resources/rpc.properties
View file @
f77153ae
...
...
@@ -85,6 +85,7 @@ uri.user.sendVerifyCodeForBlueFocus=/fun-golf-service/user/sendVerifyCodeForBlue
uri.user.validateMobilePhoneForBlueFocus
=
/fun-golf-service/user/validateMobilePhoneForBlueFocus
uri.user.saveUserDetail
=
/fun-golf-service/user/saveUserDetail
uri.user.getUserByUmNickName
=
/fun-golf-service/user/getUserByUmNickName
uri.recommend.getRanking
=
/fun-golf-service/recommend/static/ranking
#recommend
uri.recommend.queryRecommendList
=
/fun-golf-service/recommend/recommendList
...
...
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