|
@@ -2,12 +2,10 @@ package com.futu.course.course.controller;
|
|
|
|
|
|
import com.futu.course.common.entity.R;
|
|
|
import com.futu.course.course.domain.Course;
|
|
|
+import com.futu.course.course.dto.CourseByIdDto;
|
|
|
import com.futu.course.course.service.impl.CourseServiceImpl;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
/**
|
|
|
* @author "杨旭朋"
|
|
@@ -28,8 +26,8 @@ public class CourseController {
|
|
|
* @date: 2025/5/11 19:13
|
|
|
*/
|
|
|
@PostMapping("CourseGetOneById")
|
|
|
- public Course CourseGetOneById(@RequestParam Long id){
|
|
|
- return courseService.getById(id);
|
|
|
+ public Course CourseGetOneById(@RequestBody CourseByIdDto id){
|
|
|
+ return courseService.getById(id.getId());
|
|
|
}
|
|
|
|
|
|
|