培训资源管理修改请求方式

dev
zhaokai 2026-01-14 08:55:26 +08:00
parent 5d03409fb6
commit f03a838499
7 changed files with 27 additions and 26 deletions

View File

@ -53,8 +53,8 @@ public class CurriculumController {
return SingleResponse.buildSuccess();
}
@ApiOperation("课程详情")
@PostMapping("/getInfoById")
public SingleResponse<CurriculumCO> getInfoById(@RequestParam("id") Long id) {
@GetMapping("/getInfoById/{id}")
public SingleResponse<CurriculumCO> getInfoById(@PathVariable("id") Long id) {
return SingleResponse.of(curriculumService.getInfoById(id));
}
@ApiOperation("上架/下架")
@ -66,7 +66,7 @@ public class CurriculumController {
@ApiOperation("删除")
@PostMapping("/{id}")
@GetMapping("/remove/{id}")
public Response remove(@PathVariable("id") Long id) {
curriculumService.remove(id);
return SingleResponse.buildSuccess();

View File

@ -42,9 +42,10 @@ public class ExamPaperController {
return examPaperService.listPage(qry);
}
@ApiOperation("试卷详情")
@PostMapping("/getInfoById")
public SingleResponse<ExamPaperCO> getInfoById(@RequestParam("id") Long id) {
@GetMapping("/getInfoById/{id}")
public SingleResponse<ExamPaperCO> getInfoById(@PathVariable("id") Long id) {
return SingleResponse.of(examPaperService.getInfoById(id));
}
@ -64,7 +65,7 @@ public class ExamPaperController {
@ApiOperation("删除试卷")
@PostMapping("/delete/{id}")
@GetMapping("/remove/{id}")
public Response remove(@PathVariable("id") Long id) {
examPaperService.remove(id);
return SingleResponse.buildSuccess();

View File

@ -65,14 +65,14 @@ public class QuestionController {
}
@ApiOperation("详情")
@PostMapping("/getInfoById")
public SingleResponse<QuestionCO> getInfoById(@RequestParam(value = "id") Long id) {
@GetMapping("/getInfoById/{id}")
public SingleResponse<QuestionCO> getInfoById(@PathVariable(value = "id") Long id) {
return questionService.getInfoById(id);
}
@ApiOperation("删除")
@PostMapping("/remove")
public SingleResponse<ExamPaperCO> remove(@RequestParam(value = "id") Long id) {
@GetMapping("/remove/{id}")
public SingleResponse<ExamPaperCO> remove(@PathVariable(value = "id") Long id) {
ExamPaperCO examPaperCO =questionService.remove(id);
return SingleResponse.of(examPaperCO);
}

View File

@ -60,14 +60,14 @@ public class TeacherCertificateController {
}
@ApiOperation("详情")
@PostMapping("/getInfoById")
public SingleResponse<TeacherCertificateCO> getInfoById(@RequestParam(value = "id") Long id) {
@GetMapping("/getInfoById/{id}")
public SingleResponse<TeacherCertificateCO> getInfoById(@PathVariable(value = "id") Long id) {
return teacherCertificateService.getInfoById(id);
}
@ApiOperation("删除")
@PostMapping("/remove")
public Response remove(@RequestParam(value = "id") Long id) {
@GetMapping("/remove/{id}")
public Response remove(@PathVariable(value = "id") Long id) {
teacherCertificateService.remove(id);
return SingleResponse.buildSuccess();
}

View File

@ -60,14 +60,14 @@ public class TeacherController {
}
@ApiOperation("详情")
@PostMapping("/getInfoById")
public SingleResponse<TeacherCO> getInfoById(@RequestParam(value = "id") Long id) {
@GetMapping("/getInfoById/{id}")
public SingleResponse<TeacherCO> getInfoById(@PathVariable(value = "id") Long id) {
return teacherService.getInfoById(id);
}
@ApiOperation("删除")
@PostMapping("/remove")
public Response remove(@RequestParam(value = "id") Long id) {
@GetMapping("/remove/{id}")
public Response remove(@PathVariable(value = "id") Long id) {
teacherService.remove(id);
return SingleResponse.buildSuccess();
}

View File

@ -53,14 +53,14 @@ public class TrainingTypeController {
}
@ApiOperation("详情")
@PostMapping("/getInfoById")
public SingleResponse<TrainingTypeCO> getInfoById(@RequestParam(value = "id") Long id) {
@GetMapping("/getInfoById/{id}")
public SingleResponse<TrainingTypeCO> getInfoById(@PathVariable(value = "id") Long id) {
return trainingTypeService.getInfoById(id);
}
@ApiOperation("删除")
@PostMapping("/remove")
public Response remove(@RequestParam(value = "id") Long id) {
@GetMapping("/remove/{id}")
public Response remove(@PathVariable(value = "id") Long id) {
trainingTypeService.remove(id);
return SingleResponse.buildSuccess();
}

View File

@ -60,14 +60,14 @@ public class VideoCoursewareController {
}
@ApiOperation("详情")
@PostMapping("/getInfoById")
public SingleResponse<VideoCoursewareCO> getInfoById(@RequestParam(value = "id") Long id) {
@GetMapping("/getInfoById/{id}")
public SingleResponse<VideoCoursewareCO> getInfoById(@PathVariable(value = "id") Long id) {
return videoCoursewareService.getInfoById(id);
}
@ApiOperation("删除")
@PostMapping("/remove")
public Response remove(@RequestParam(value = "id") Long id) {
@GetMapping("/remove/{id}")
public Response remove(@PathVariable(value = "id") Long id) {
videoCoursewareService.remove(id);
return SingleResponse.buildSuccess();
}