|
@@ -3,13 +3,18 @@ package com.ym.mec.web.controller;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
|
+import java.util.Date;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+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.TeacherDefaultPracticeGroupSalary;
|
|
|
import com.ym.mec.biz.service.TeacherDefaultPracticeGroupSalaryService;
|
|
|
import com.ym.mec.common.controller.BaseController;
|
|
|
|
|
@@ -18,21 +23,44 @@ import com.ym.mec.common.controller.BaseController;
|
|
|
@RestController
|
|
|
public class TeacherDefaultPracticeGroupSalaryController extends BaseController {
|
|
|
|
|
|
- @Autowired
|
|
|
- private TeacherDefaultPracticeGroupSalaryService teacherDefaultPracticeGroupSalaryService;
|
|
|
+ @Autowired
|
|
|
+ private TeacherDefaultPracticeGroupSalaryService teacherDefaultPracticeGroupSalaryService;
|
|
|
+
|
|
|
+ @ApiOperation(value = "获取教师的陪练课课酬列表")
|
|
|
+ @GetMapping("/queryPageByTeacherId")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('teacherDefaultPracticeGroupSalary/queryByTeacherId')")
|
|
|
+ public Object queryByTeacherId(Integer teacherId) {
|
|
|
+ return succeed(teacherDefaultPracticeGroupSalaryService.queryByUserId(teacherId));
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "批量新增、修改教师陪练课课酬")
|
|
|
+ @PostMapping("/update")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('teacherDefaultPracticeGroupSalary/update')")
|
|
|
+ public Object update(@RequestBody TeacherDefaultPracticeGroupSalaryTemp teacherDefaultPracticeGroupSalaryTemp) {
|
|
|
+ return teacherDefaultPracticeGroupSalaryService.update(teacherDefaultPracticeGroupSalaryTemp.getTeacherDefaultPracticeGroupSalaries(),
|
|
|
+ teacherDefaultPracticeGroupSalaryTemp.getStartDate()) ? succeed() : failed();
|
|
|
+ }
|
|
|
+
|
|
|
+ class TeacherDefaultPracticeGroupSalaryTemp {
|
|
|
+
|
|
|
+ private List<TeacherDefaultPracticeGroupSalary> teacherDefaultPracticeGroupSalaries;
|
|
|
+
|
|
|
+ private Date startDate;
|
|
|
+
|
|
|
+ public List<TeacherDefaultPracticeGroupSalary> getTeacherDefaultPracticeGroupSalaries() {
|
|
|
+ return teacherDefaultPracticeGroupSalaries;
|
|
|
+ }
|
|
|
|
|
|
- @ApiOperation(value = "获取教师的陪练课课酬列表")
|
|
|
- @GetMapping("/queryPageByTeacherId")
|
|
|
- @PreAuthorize("@pcs.hasPermissions('teacherDefaultPracticeGroupSalary/queryByTeacherId')")
|
|
|
- public Object queryByTeacherId(Integer teacherId){
|
|
|
- return succeed();
|
|
|
- }
|
|
|
+ public void setTeacherDefaultPracticeGroupSalaries(List<TeacherDefaultPracticeGroupSalary> teacherDefaultPracticeGroupSalaries) {
|
|
|
+ this.teacherDefaultPracticeGroupSalaries = teacherDefaultPracticeGroupSalaries;
|
|
|
+ }
|
|
|
|
|
|
- @ApiOperation(value = "批量新增、修改教师vip课酬")
|
|
|
- @PostMapping("/update")
|
|
|
- @PreAuthorize("@pcs.hasPermissions('teacherDefaultPracticeGroupSalary/update')")
|
|
|
- public Object setVipGroupSalary(){
|
|
|
- return succeed();
|
|
|
- }
|
|
|
+ public Date getStartDate() {
|
|
|
+ return startDate;
|
|
|
+ }
|
|
|
|
|
|
+ public void setStartDate(Date startDate) {
|
|
|
+ this.startDate = startDate;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|