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
854e755d
authored
Oct 27, 2017
by
Huang Linyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add interface 社员活动日历排期
parent
03c3e946
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
0 deletions
src/main/java/com/ctrip/fun/golf/api/product/CommuneMController.java
src/main/java/com/ctrip/fun/golf/service/product/CommuneMService.java
src/main/resources/rpc.properties
src/main/java/com/ctrip/fun/golf/api/product/CommuneMController.java
View file @
854e755d
...
...
@@ -24,6 +24,7 @@ import com.ctrip.fun.common.vo.product.AggregationCommuneResourceBean;
import
com.ctrip.fun.common.vo.product.AggregationCommuneResourceDetailQuery
;
import
com.ctrip.fun.common.vo.product.CommuneResourceBean
;
import
com.ctrip.fun.common.vo.product.CommuneResourceQuery
;
import
com.ctrip.fun.common.vo.product.CommuneResourceV4
;
import
com.ctrip.fun.common.vo.product.ProductPaymentTypeEnum
;
import
com.ctrip.fun.common.vo.product.ResourceTypeEnum
;
import
com.ctrip.fun.golf.service.product.CommuneMService
;
...
...
@@ -65,6 +66,16 @@ public class CommuneMController {
return
this
.
getResultMap
(
pagedResponseBean
,
communeResourceQuery
.
getImageSize
());
}
@ResponseBody
@RequestMapping
(
value
=
"/v4/commune/communeResources"
,
method
=
RequestMethod
.
GET
,
params
=
{
"cityId"
,
"imageSize"
,
"pagerOffset"
,
"pagerPerPage"
,
"sortField"
,
"sortDirection"
})
public
Object
queryCommuneResourceListV4
(
CommuneResourceQuery
communeResourceQuery
)
{
List
<
Integer
>
resourceTypeList
=
new
ArrayList
<
Integer
>();
resourceTypeList
.
add
(
ResourceTypeEnum
.
EVENT_ACTIVITY
.
getValue
());
communeResourceQuery
.
setResourceTypeList
(
resourceTypeList
);
List
<
CommuneResourceV4
>
pagedResponseBean
=
communeMService
.
queryCommuneResourceListV4
(
communeResourceQuery
);
return
pagedResponseBean
;
}
@SuppressWarnings
(
"unchecked"
)
private
Object
getResultMap
(
PagedResponseBean
<
CommuneResourceBean
>
pagedResponseBean
,
String
imageSize
)
{
Map
map
=
new
HashMap
();
...
...
src/main/java/com/ctrip/fun/golf/service/product/CommuneMService.java
View file @
854e755d
package
com
.
ctrip
.
fun
.
golf
.
service
.
product
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.core.ParameterizedTypeReference
;
import
org.springframework.http.HttpEntity
;
import
org.springframework.http.HttpMethod
;
...
...
@@ -11,6 +15,7 @@ import com.ctrip.fun.common.vo.product.AggregationCommuneResourceBean;
import
com.ctrip.fun.common.vo.product.AggregationCommuneResourceDetailQuery
;
import
com.ctrip.fun.common.vo.product.CommuneResourceBean
;
import
com.ctrip.fun.common.vo.product.CommuneResourceQuery
;
import
com.ctrip.fun.common.vo.product.CommuneResourceV4
;
import
com.ctrip.fun.golf.exceptions.RestException
;
import
com.ctrip.fun.golf.service.BaseService
;
...
...
@@ -54,6 +59,24 @@ public class CommuneMService extends BaseService {
}
public
List
<
CommuneResourceV4
>
queryCommuneResourceListV4
(
CommuneResourceQuery
communeResourceQuery
)
{
Request
<
CommuneResourceQuery
>
request
=
new
Request
<
CommuneResourceQuery
>(
""
,
communeResourceQuery
);
HttpEntity
<
Request
<
CommuneResourceQuery
>>
entity
=
new
HttpEntity
<
Request
<
CommuneResourceQuery
>>(
request
);
List
<
CommuneResourceV4
>
responseBean
=
null
;
Response
<
List
<
CommuneResourceV4
>>
response
=
super
.
exchange
(
this
.
getServiceUri
(
"uri.Commune.queryCommuneResourceListV4"
),
HttpMethod
.
POST
,
entity
,
new
ParameterizedTypeReference
<
Response
<
List
<
CommuneResourceV4
>>>()
{
}).
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
PagedResponseBean
<
CommuneResourceBean
>
queryCommuneResourceList
(
CommuneResourceQuery
communeResourceQuery
)
{
Request
<
CommuneResourceQuery
>
request
=
new
Request
<
CommuneResourceQuery
>(
""
,
communeResourceQuery
);
...
...
src/main/resources/rpc.properties
View file @
854e755d
...
...
@@ -334,6 +334,7 @@ uri.insideSms.findByIdForAll=/fun-golf-service/insideSms/findByIdForAll
uri.Commune.queryCommuneResourceList
=
/fun-golf-service/asmCourseData/queryCommuneResourceList
uri.Commune.queryCommuneResourceListV2
=
/fun-golf-service/asmCourseData/queryCommuneResourceListV2
uri.Commune.queryCommuneResourceListV3
=
/fun-golf-service/asmCourseData/queryCommuneResourceListV3
uri.Commune.queryCommuneResourceListV4
=
/fun-golf-service/asmCourseData/queryCommuneResourceListV4
uri.Commune.queryCommuneResourceByCourse
=
/fun-golf-service/asmCourseData/queryCommuneResourceByCourse
uri.Commune.getCommuneResourceDetail
=
/fun-golf-service/asmCourseData/getCommuneResourceDetail
uri.Commune.getAggregationCommuneResourceDetail
=
/fun-golf-service/asmCourseData/getAggregationCommuneResourceDetail
...
...
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