fix: 添加学生管理学校树接口
前端调用 /business/student/schoolTree 接口获取学校树结构,
但后端缺失此接口导致路径匹配到 /{studentId} 引发类型转换错误。
This commit is contained in:
parent
2baf792159
commit
a9f57646fa
|
|
@ -8,11 +8,16 @@ import org.dromara.common.log.enums.BusinessType;
|
|||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.pangu.school.domain.PgSchool;
|
||||
import org.dromara.pangu.school.domain.vo.SchoolTreeNode;
|
||||
import org.dromara.pangu.school.service.IPgSchoolService;
|
||||
import org.dromara.pangu.student.domain.PgStudent;
|
||||
import org.dromara.pangu.student.service.IPgStudentService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 学生管理
|
||||
*
|
||||
|
|
@ -25,6 +30,7 @@ import org.springframework.web.bind.annotation.*;
|
|||
public class PgStudentController extends BaseController {
|
||||
|
||||
private final IPgStudentService studentService;
|
||||
private final IPgSchoolService schoolService;
|
||||
|
||||
@SaCheckPermission("business:student:list")
|
||||
@GetMapping("/list")
|
||||
|
|
@ -32,6 +38,14 @@ public class PgStudentController extends BaseController {
|
|||
return studentService.selectPageList(student, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学校树结构(用于学生管理左侧筛选)
|
||||
*/
|
||||
@GetMapping("/schoolTree")
|
||||
public R<List<SchoolTreeNode>> schoolTree() {
|
||||
return R.ok(schoolService.selectSchoolTree(new PgSchool()));
|
||||
}
|
||||
|
||||
@SaCheckPermission("business:student:query")
|
||||
@GetMapping("/{studentId}")
|
||||
public R<PgStudent> getInfo(@PathVariable Long studentId) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue