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
d7ebb4a3
authored
Sep 21, 2017
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add the sync of mobile
parent
4cc48a53
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
1 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/debug/rpc.properties
src/main/resources/rpc.properties
src/main/java/com/ctrip/fun/golf/api/course/CourseOrderController.java
View file @
d7ebb4a3
...
...
@@ -1085,4 +1085,14 @@ public class CourseOrderController {
return
map
;
}
/**
* 资源同步
*/
@ResponseBody
@RequestMapping
(
value
=
"/res/sync"
,
method
=
RequestMethod
.
GET
)
public
Object
allResSync
(
Integer
courseId
)
{
Response
<
Object
>
response
=
courseService
.
allResSync
();
return
response
;
}
}
src/main/java/com/ctrip/fun/golf/service/course/CourseService.java
View file @
d7ebb4a3
...
...
@@ -333,4 +333,28 @@ public class CourseService extends BaseService {
return
responseBean
;
}
/**
* 所有资源同步
*/
public
Response
<
Object
>
allResSync
()
{
// HttpEntity<Request<String>> entity = new HttpEntity<Request<String>>(request);
Response
<
Object
>
responseBean
=
new
Response
<
Object
>();
try
{
Response
<
Object
>
response
=
super
.
exchange
(
this
.
getServiceUri
(
"uri.asmCourseData.sync"
),
HttpMethod
.
POST
,
null
,
new
ParameterizedTypeReference
<
Response
<
Object
>>(){}).
getBody
();
if
(
response
.
getStatus
()
==
0
)
{
responseBean
=
response
;
}
else
{
throw
new
RestException
(
500
,
response
.
getMessage
());
}
}
catch
(
Exception
e
)
{
throw
new
RestException
(
500
,
"资源同步失败"
);
}
return
responseBean
;
}
}
src/main/resources/debug/rpc.properties
View file @
d7ebb4a3
#endpoint
uri.endpoint
=
http://localhost:
5898
uri.endpoint
=
http://localhost:
8080
uri.img.endpoint
=
http://7x2w1g.com1.z0.glb.clouddn.com
uri.dimg.endpoint
=
http://7x2w1g.com1.z0.glb.clouddn.com
maxUploadFileSize
=
500000
...
...
src/main/resources/rpc.properties
View file @
d7ebb4a3
...
...
@@ -126,6 +126,7 @@ uri.course.getUserOrderedCourse=/fun-golf-service/user/ordered/courses
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.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