|
@@ -1,19 +1,19 @@
|
|
|
package com.ym.mec.web.controller;
|
|
|
|
|
|
+import com.ym.mec.common.page.PageInfo;
|
|
|
import com.yonge.log.model.AuditLogAnnotation;
|
|
|
import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiImplicitParam;
|
|
|
+import io.swagger.annotations.ApiImplicitParams;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
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 org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import com.ym.mec.biz.dal.entity.TeacherDefaultVipGroupSalary;
|
|
|
import com.ym.mec.biz.service.TeacherDefaultVipGroupSalaryService;
|
|
@@ -40,10 +40,22 @@ public class TeacherDefaultVipGroupSalaryController extends BaseController {
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "获取教师的vip课酬列表")
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "search", value = "关键字匹配", dataType = "String", paramType = "query"),
|
|
|
+ @ApiImplicitParam(name = "groupType", value = "课程类型", dataType = "String", paramType = "query"),
|
|
|
+ })
|
|
|
@GetMapping("/queryPageByTeacherId")
|
|
|
@PreAuthorize("@pcs.hasPermissions('teacherDefaultVipGroupSalary/queryPageByTeacherId')")
|
|
|
- public Object queryPageByTeacherId(QueryInfo queryInfo){
|
|
|
- return succeed(teacherDefaultVipGroupSalaryService.queryPage(queryInfo));
|
|
|
+ public Object queryPageByTeacherId(QueryInfo queryInfo, @RequestParam(defaultValue = "VIP") String groupType){
|
|
|
+
|
|
|
+ PageInfo<TeacherDefaultVipGroupSalary> salaryPageInfo = teacherDefaultVipGroupSalaryService.queryPage(queryInfo);
|
|
|
+
|
|
|
+ List<TeacherDefaultVipGroupSalary> collect = salaryPageInfo.getRows().stream()
|
|
|
+ .filter(x -> x.getGroupType().equals(groupType)).collect(Collectors.toList());
|
|
|
+ // 重置过滤后的数据
|
|
|
+ salaryPageInfo.setRows(collect);
|
|
|
+
|
|
|
+ return succeed(salaryPageInfo);
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "批量新增、修改教师vip课酬")
|