|
@@ -6,16 +6,16 @@ import com.yonge.cooleshow.biz.dal.entity.Subject;
|
|
|
import com.yonge.cooleshow.biz.dal.entity.Teacher;
|
|
|
import com.yonge.cooleshow.biz.dal.service.SubjectService;
|
|
|
import com.yonge.cooleshow.biz.dal.service.TeacherService;
|
|
|
+import com.yonge.cooleshow.biz.dal.wrapper.SubjectWrapper;
|
|
|
import com.yonge.cooleshow.common.controller.BaseController;
|
|
|
import com.yonge.cooleshow.common.entity.HttpResponseResult;
|
|
|
+import com.yonge.toolset.base.page.PageInfo;
|
|
|
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.GetMapping;
|
|
|
-import org.springframework.web.bind.annotation.PathVariable;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
@@ -39,6 +39,14 @@ public class SubjectController extends BaseController {
|
|
|
return succeed(subjectService.get(id));
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "分页查询声部列表")
|
|
|
+ @PostMapping("/queryPage")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('subject/queryPage')")
|
|
|
+ public HttpResponseResult<PageInfo<SubjectWrapper.Subject>> queryPage(@RequestBody SubjectWrapper.SubjectQuery query) {
|
|
|
+ query.setParentSubjectId(0);
|
|
|
+ return succeed(subjectService.selectPage(query));
|
|
|
+ }
|
|
|
+
|
|
|
@ApiOperation(value = "获取声部")
|
|
|
@GetMapping("/subjectSelect")
|
|
|
public HttpResponseResult<List<Subject>> subjectSelect(
|