|
@@ -0,0 +1,53 @@
|
|
|
+package com.keao.edu.user.controller;
|
|
|
+
|
|
|
+import com.keao.edu.common.controller.BaseController;
|
|
|
+import com.keao.edu.common.entity.HttpResponseResult;
|
|
|
+import com.keao.edu.common.page.PageInfo;
|
|
|
+import com.keao.edu.user.entity.ExamTeacherSalary;
|
|
|
+import com.keao.edu.user.page.ExamTeacherSalaryQueryInfo;
|
|
|
+import com.keao.edu.user.service.ExamTeacherSalaryService;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.PathVariable;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+
|
|
|
+import java.util.Date;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @Author Joburgess
|
|
|
+ * @Date 2020.07.01
|
|
|
+ */
|
|
|
+public class ExamTeacherSalaryController extends BaseController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ExamTeacherSalaryService examTeacherSalaryService;
|
|
|
+
|
|
|
+ @ApiOperation("分页查询")
|
|
|
+ @GetMapping(value = "/list")
|
|
|
+ public HttpResponseResult<PageInfo<ExamTeacherSalary>> getList(ExamTeacherSalaryQueryInfo queryInfo) {
|
|
|
+ return succeed(examTeacherSalaryService.queryPage(queryInfo));
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("新增")
|
|
|
+ @PostMapping(value = "/add")
|
|
|
+ public HttpResponseResult add(ExamTeacherSalary examTeacherSalary) {
|
|
|
+ examTeacherSalaryService.insert(examTeacherSalary);
|
|
|
+ return succeed();
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("更新")
|
|
|
+ @PostMapping(value = "/update")
|
|
|
+ public HttpResponseResult update(ExamTeacherSalary examTeacherSalary) {
|
|
|
+ examTeacherSalary.setUpdateTime(new Date());
|
|
|
+ examTeacherSalaryService.update(examTeacherSalary);
|
|
|
+ return succeed();
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("删除")
|
|
|
+ @PostMapping(value = "/del/{id}")
|
|
|
+ public HttpResponseResult add(@PathVariable("id") Long id) {
|
|
|
+ return succeed(examTeacherSalaryService.delete(id));
|
|
|
+ }
|
|
|
+
|
|
|
+}
|