Commit d453a91f by zhangchen

1.根据产品和日期查询teetime价格

parent 21dd1029
......@@ -10,6 +10,7 @@ import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
......@@ -31,9 +32,11 @@ import com.ctrip.fun.common.vo.product.AsmCourseresourceQuery;
import com.ctrip.fun.common.vo.product.CampaignBean;
import com.ctrip.fun.common.vo.product.CourseBean;
import com.ctrip.fun.common.vo.product.CourseCityBean;
import com.ctrip.fun.common.vo.product.CourseMinPriceQuery;
import com.ctrip.fun.common.vo.product.CourseProductBean;
import com.ctrip.fun.common.vo.product.CourseQuery;
import com.ctrip.fun.common.vo.product.ProductPaymentTypeEnum;
import com.ctrip.fun.common.vo.product.ProductTeePriceBean;
import com.ctrip.fun.common.vo.product.ProductTypeEnum;
import com.ctrip.fun.common.vo.product.ResourcePriceStatusEnum;
import com.ctrip.fun.common.vo.product.ResourceTypeEnum;
......@@ -1115,5 +1118,17 @@ public class CourseOrderController {
Response<Object> response = courseService.allResSync();
return response;
}
/**
* 获取产品指定日期teetime价格
*/
@ResponseBody
@RequestMapping(value = "/courses/getProductPriceList", method = RequestMethod.POST)
public Object getProductPriceList(@RequestBody CourseMinPriceQuery courseMinPriceQuery) {
List<ProductTeePriceBean> productPriceList = courseService.getProductPriceList(courseMinPriceQuery);
Map<String, List<ProductTeePriceBean>> map = new HashMap<String, List<ProductTeePriceBean>>();
map.put("productPriceList", productPriceList);
return map;
}
}
......@@ -23,8 +23,10 @@ import com.ctrip.fun.common.vo.product.AsmCourseresourceBean;
import com.ctrip.fun.common.vo.product.AsmCourseresourceQuery;
import com.ctrip.fun.common.vo.product.CourseBean;
import com.ctrip.fun.common.vo.product.CourseCityBean;
import com.ctrip.fun.common.vo.product.CourseMinPriceQuery;
import com.ctrip.fun.common.vo.product.CourseProductBean;
import com.ctrip.fun.common.vo.product.CourseQuery;
import com.ctrip.fun.common.vo.product.ProductTeePriceBean;
import com.ctrip.fun.golf.exceptions.RestException;
import com.ctrip.fun.golf.service.BaseService;
......@@ -357,4 +359,27 @@ public class CourseService extends BaseService {
return responseBean;
}
/**
* 球场资源关联赛事活动
*/
public List<ProductTeePriceBean> getProductPriceList(CourseMinPriceQuery courseMinPriceQuery) {
List<ProductTeePriceBean> productTeePriceBeanList = new ArrayList<ProductTeePriceBean>();
Request<CourseMinPriceQuery> request = new Request<CourseMinPriceQuery>("", courseMinPriceQuery);
HttpEntity<Request<CourseMinPriceQuery>> entity = new HttpEntity<Request<CourseMinPriceQuery>>(request);
Response<List<ProductTeePriceBean>> response = super.exchange(
this.getServiceUri("uri.asmCourseData.getProductPriceList"), HttpMethod.POST,
entity, new ParameterizedTypeReference<Response<List<ProductTeePriceBean>>>() {
}).getBody();
if (response != null && response.getStatus() == 0) {
productTeePriceBeanList = response.getBody();
} else {
productTeePriceBeanList = null;
logger.error("[list] status:{}, msg: {}", response.getStatus(), response.getMessage());
throw new RestException(500, response.getMessage());
}
return productTeePriceBeanList;
}
}
......@@ -158,6 +158,7 @@ uri.course.cities.courseCites=/fun-golf-service/course/courseCities
uri.course.rewardCourses=/fun-golf-service/course/queryRewardCourses
uri.asmCourseData.getMinCommuneProduct=/fun-golf-service/asmCourseData/getMinCommuneProduct
uri.asmCourseData.sync=/fun-golf-service/asmCourseData/sync
uri.asmCourseData.getProductPriceList=/fun-golf-service/asmCourseData/getProductPriceList
uri.gamecourse.callGameCoursefairwayAndCourseZone=/fun-golf-service/course/coursefairways_coursezone
......
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