Commit 0aa23964 by Huang Linyu

Merge branch 'f-6.6.3' into f-6.6.4

parents 2f9d4606 854e755d
...@@ -24,6 +24,7 @@ import com.ctrip.fun.common.vo.product.AggregationCommuneResourceBean; ...@@ -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.AggregationCommuneResourceDetailQuery;
import com.ctrip.fun.common.vo.product.CommuneResourceBean; import com.ctrip.fun.common.vo.product.CommuneResourceBean;
import com.ctrip.fun.common.vo.product.CommuneResourceQuery; 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.ProductPaymentTypeEnum;
import com.ctrip.fun.common.vo.product.ResourceTypeEnum; import com.ctrip.fun.common.vo.product.ResourceTypeEnum;
import com.ctrip.fun.golf.service.product.CommuneMService; import com.ctrip.fun.golf.service.product.CommuneMService;
...@@ -65,6 +66,16 @@ public class CommuneMController { ...@@ -65,6 +66,16 @@ public class CommuneMController {
return this.getResultMap(pagedResponseBean, communeResourceQuery.getImageSize()); 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") @SuppressWarnings("unchecked")
private Object getResultMap(PagedResponseBean<CommuneResourceBean> pagedResponseBean, String imageSize) { private Object getResultMap(PagedResponseBean<CommuneResourceBean> pagedResponseBean, String imageSize) {
Map map = new HashMap(); Map map = new HashMap();
......
package com.ctrip.fun.golf.service.product; 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.core.ParameterizedTypeReference;
import org.springframework.http.HttpEntity; import org.springframework.http.HttpEntity;
import org.springframework.http.HttpMethod; import org.springframework.http.HttpMethod;
...@@ -11,6 +15,7 @@ import com.ctrip.fun.common.vo.product.AggregationCommuneResourceBean; ...@@ -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.AggregationCommuneResourceDetailQuery;
import com.ctrip.fun.common.vo.product.CommuneResourceBean; import com.ctrip.fun.common.vo.product.CommuneResourceBean;
import com.ctrip.fun.common.vo.product.CommuneResourceQuery; 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.exceptions.RestException;
import com.ctrip.fun.golf.service.BaseService; import com.ctrip.fun.golf.service.BaseService;
...@@ -54,6 +59,24 @@ public class CommuneMService extends 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) { public PagedResponseBean<CommuneResourceBean> queryCommuneResourceList(CommuneResourceQuery communeResourceQuery) {
Request<CommuneResourceQuery> request = new Request<CommuneResourceQuery>("", communeResourceQuery); Request<CommuneResourceQuery> request = new Request<CommuneResourceQuery>("", communeResourceQuery);
......
...@@ -335,6 +335,7 @@ uri.insideSms.findByIdForAll=/fun-golf-service/insideSms/findByIdForAll ...@@ -335,6 +335,7 @@ uri.insideSms.findByIdForAll=/fun-golf-service/insideSms/findByIdForAll
uri.Commune.queryCommuneResourceList=/fun-golf-service/asmCourseData/queryCommuneResourceList uri.Commune.queryCommuneResourceList=/fun-golf-service/asmCourseData/queryCommuneResourceList
uri.Commune.queryCommuneResourceListV2=/fun-golf-service/asmCourseData/queryCommuneResourceListV2 uri.Commune.queryCommuneResourceListV2=/fun-golf-service/asmCourseData/queryCommuneResourceListV2
uri.Commune.queryCommuneResourceListV3=/fun-golf-service/asmCourseData/queryCommuneResourceListV3 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.queryCommuneResourceByCourse=/fun-golf-service/asmCourseData/queryCommuneResourceByCourse
uri.Commune.getCommuneResourceDetail=/fun-golf-service/asmCourseData/getCommuneResourceDetail uri.Commune.getCommuneResourceDetail=/fun-golf-service/asmCourseData/getCommuneResourceDetail
uri.Commune.getAggregationCommuneResourceDetail=/fun-golf-service/asmCourseData/getAggregationCommuneResourceDetail uri.Commune.getAggregationCommuneResourceDetail=/fun-golf-service/asmCourseData/getAggregationCommuneResourceDetail
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment