|
@@ -1,23 +1,15 @@
|
|
|
package com.ym.mec.web.controller.education;
|
|
|
|
|
|
-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.DeleteMapping;
|
|
|
-import org.springframework.web.bind.annotation.PathVariable;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.PutMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
-
|
|
|
import com.ym.mec.biz.dal.entity.CourseHomeworkTemplate;
|
|
|
import com.ym.mec.biz.dal.enums.YesOrNoEnum;
|
|
|
import com.ym.mec.biz.dal.page.CourseHomeWorkTemplateQueryInfo;
|
|
|
import com.ym.mec.biz.service.CourseHomeworkTemplateService;
|
|
|
import com.ym.mec.common.controller.BaseController;
|
|
|
+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
|
|
@@ -34,22 +26,22 @@ public class CourseHomeworkTemplateController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "新增作业模板")
|
|
|
@PostMapping("/add")
|
|
|
- public Object add(@RequestBody CourseHomeworkTemplate courseHomeworkTemplate){
|
|
|
+ public Object add(CourseHomeworkTemplate courseHomeworkTemplate){
|
|
|
courseHomeworkTemplate.setDelFlag(YesOrNoEnum.NO);
|
|
|
courseHomeworkTemplateService.insert(courseHomeworkTemplate);
|
|
|
return succeed();
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "删除作业模板")
|
|
|
- @DeleteMapping("/del/{id}")
|
|
|
+ @PostMapping("/del/{id}")
|
|
|
public Object del(@ApiParam(value = "科目编号", required = true) @PathVariable("id") Integer id){
|
|
|
courseHomeworkTemplateService.delete(id);
|
|
|
return succeed();
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "修改作业模板")
|
|
|
- @PutMapping("/update")
|
|
|
- public Object update(@RequestBody CourseHomeworkTemplate courseHomeworkTemplate){
|
|
|
+ @PostMapping("/update")
|
|
|
+ public Object update(CourseHomeworkTemplate courseHomeworkTemplate){
|
|
|
courseHomeworkTemplateService.update(courseHomeworkTemplate);
|
|
|
return succeed();
|
|
|
}
|