|
|
@@ -22,7 +22,7 @@ public class CourseController {
|
|
|
|
|
|
@GetMapping("/getCourseById")
|
|
|
public OkResponse<CourseVO> findCourseById(@RequestParam Long id) {
|
|
|
- Call call = MonitorClient.createCall(SeecSystem.PORTAL,"seec-portal","/api/course/getCourseById");
|
|
|
+ Call call = MonitorClient.createCall(SeecSystem.PORTAL, "seec-portal", "/api/course/getCourseById");
|
|
|
call.start();
|
|
|
OkResponse<CourseVO> res = OkResponse.of(courseService.findCourseById(id));
|
|
|
call.end();
|
|
|
@@ -65,8 +65,8 @@ public class CourseController {
|
|
|
}
|
|
|
|
|
|
@GetMapping("/getCourseByCoderId")
|
|
|
- public OkResponse<Long> findCourseByCoderId(@RequestParam Integer coderId) {
|
|
|
- return OkResponse.of(courseService.findCourseByCoderId(coderId).getId());
|
|
|
+ public OkResponse<CourseVO> findCourseByCoderId(@RequestParam Integer coderId) {
|
|
|
+ return OkResponse.of(courseService.findCourseByCoderId(coderId));
|
|
|
}
|
|
|
|
|
|
@GetMapping("/checkName")
|
|
|
@@ -95,12 +95,8 @@ public class CourseController {
|
|
|
}
|
|
|
|
|
|
@GetMapping("/getCourseByEvalId")
|
|
|
- public OkResponse<Long> findCourseByEvalId(@RequestParam int evalId) {
|
|
|
- try {
|
|
|
- return OkResponse.of(courseService.findCourseByEvalId(evalId).getId());
|
|
|
- } catch (Exception e) {
|
|
|
- throw new RuntimeException(e);
|
|
|
- }
|
|
|
+ public OkResponse<CourseVO> findCourseByEvalId(@RequestParam int evalId) {
|
|
|
+ return OkResponse.of(courseService.findCourseByEvalId(evalId));
|
|
|
}
|
|
|
|
|
|
@PostMapping("/uploadImage")
|
|
|
@@ -115,12 +111,12 @@ public class CourseController {
|
|
|
}
|
|
|
|
|
|
@GetMapping("/queryCarouselChart")
|
|
|
- public OkResponse<List<CourseVO>> queryCarouselChart(){
|
|
|
+ public OkResponse<List<CourseVO>> queryCarouselChart() {
|
|
|
return OkResponse.of(courseService.queryCarouselChart());
|
|
|
}
|
|
|
|
|
|
@GetMapping("/findCourseByName")
|
|
|
- public OkResponse<CourseVO> findCourseByName(@RequestParam String name){
|
|
|
+ public OkResponse<CourseVO> findCourseByName(@RequestParam String name) {
|
|
|
return OkResponse.of(courseService.findCourseByName(name));
|
|
|
}
|
|
|
}
|