|
@@ -0,0 +1,45 @@
|
|
|
|
+package com.ym.mec.web.controller.teacher;
|
|
|
|
+
|
|
|
|
+import com.ym.mec.common.controller.BaseController;
|
|
|
|
+import com.ym.mec.web.dal.entity.StudentCourseHomeworkReply;
|
|
|
|
+import com.ym.mec.web.dal.page.StudentCourseHomeworkReplyQueryInfo;
|
|
|
|
+import com.ym.mec.web.service.StudentCourseHomeworkReplyService;
|
|
|
|
+import io.swagger.annotations.Api;
|
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
|
+import io.swagger.annotations.ApiParam;
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * @Author Joburgess
|
|
|
|
+ * @Date 2019/9/19
|
|
|
|
+ */
|
|
|
|
+@RequestMapping("teacherCourseHomeworkReply")
|
|
|
|
+@Api(tags = "作业评论-教师端")
|
|
|
|
+@RestController
|
|
|
|
+public class TeacherCourseHomeworkReplyController extends BaseController {
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private StudentCourseHomeworkReplyService studentCourseHomeworkReplyService;
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value = "新增回复")
|
|
|
|
+ @PostMapping("/add")
|
|
|
|
+ public Object add(@RequestBody StudentCourseHomeworkReply studentCourseHomeworkReply) {
|
|
|
|
+ studentCourseHomeworkReplyService.insert(studentCourseHomeworkReply);
|
|
|
|
+ return succeed();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value = "回复查询")
|
|
|
|
+ @GetMapping("/queryPage")
|
|
|
|
+ public Object queryPage(@RequestBody StudentCourseHomeworkReplyQueryInfo queryInfo){
|
|
|
|
+ return succeed(studentCourseHomeworkReplyService.queryPage(queryInfo));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value = "删除回复")
|
|
|
|
+ @DeleteMapping("/del/{id}")
|
|
|
|
+ public Object del(@ApiParam(value = "回复ID", required = true) @PathVariable("id") Long id){
|
|
|
|
+ studentCourseHomeworkReplyService.delete(id);
|
|
|
|
+ return succeed();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+}
|