Commit d7ebb4a3 by unknown

add the sync of mobile

parent 4cc48a53
...@@ -1084,5 +1084,15 @@ public class CourseOrderController { ...@@ -1084,5 +1084,15 @@ public class CourseOrderController {
map.put("communeProducts", courseProductBean); map.put("communeProducts", courseProductBean);
return map; return map;
} }
/**
* 资源同步
*/
@ResponseBody
@RequestMapping(value = "/res/sync", method = RequestMethod.GET)
public Object allResSync(Integer courseId) {
Response<Object> response = courseService.allResSync();
return response;
}
} }
...@@ -333,4 +333,28 @@ public class CourseService extends BaseService { ...@@ -333,4 +333,28 @@ public class CourseService extends BaseService {
return responseBean; 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;
}
} }
#endpoint #endpoint
uri.endpoint=http://localhost:5898 uri.endpoint=http://localhost:8080
uri.img.endpoint=http://7x2w1g.com1.z0.glb.clouddn.com uri.img.endpoint=http://7x2w1g.com1.z0.glb.clouddn.com
uri.dimg.endpoint=http://7x2w1g.com1.z0.glb.clouddn.com uri.dimg.endpoint=http://7x2w1g.com1.z0.glb.clouddn.com
maxUploadFileSize=500000 maxUploadFileSize=500000
......
...@@ -126,6 +126,7 @@ uri.course.getUserOrderedCourse=/fun-golf-service/user/ordered/courses ...@@ -126,6 +126,7 @@ uri.course.getUserOrderedCourse=/fun-golf-service/user/ordered/courses
uri.course.cities.courseCites=/fun-golf-service/course/courseCities uri.course.cities.courseCites=/fun-golf-service/course/courseCities
uri.course.rewardCourses=/fun-golf-service/course/queryRewardCourses uri.course.rewardCourses=/fun-golf-service/course/queryRewardCourses
uri.asmCourseData.getMinCommuneProduct=/fun-golf-service/asmCourseData/getMinCommuneProduct 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 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