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
d453a91f
authored
Apr 19, 2019
by
zhangchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.根据产品和日期查询teetime价格
parent
21dd1029
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
0 deletions
src/main/java/com/ctrip/fun/golf/api/course/CourseOrderController.java
src/main/java/com/ctrip/fun/golf/service/course/CourseService.java
src/main/resources/rpc.properties
src/main/java/com/ctrip/fun/golf/api/course/CourseOrderController.java
View file @
d453a91f
...
...
@@ -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
;
}
}
src/main/java/com/ctrip/fun/golf/service/course/CourseService.java
View file @
d453a91f
...
...
@@ -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
;
}
}
src/main/resources/rpc.properties
View file @
d453a91f
...
...
@@ -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
...
...
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