|
|
@@ -41,13 +41,9 @@ public class GradeServiceImpl implements GradeService{
|
|
|
private DataImportMapper dataImportMapper;
|
|
|
|
|
|
@Override
|
|
|
- public TreeNode getSchoolTree(Long id) {
|
|
|
- if (null == id || "0".equals(id)) {
|
|
|
- throw new BizException(BizExceptionCode.USELESS_DATA);
|
|
|
- }
|
|
|
- id = 1l;
|
|
|
-
|
|
|
- SysSchool school = sysSchoolMapper.selectByPrimaryKey(id);
|
|
|
+ public TreeNode getSchoolTree() {
|
|
|
+ Long school_id = BaseContextHolder.getSchoolId();
|
|
|
+ SysSchool school = sysSchoolMapper.selectByPrimaryKey(school_id);
|
|
|
TreeNode schoolTree = new TreeNode();
|
|
|
TreeNode gradeNode = null;
|
|
|
TreeNode classNode = null;
|
|
|
@@ -58,7 +54,7 @@ public class GradeServiceImpl implements GradeService{
|
|
|
schoolTree.setText(school.getSchool_name());
|
|
|
schoolTree.setType(SCHOOLTYPE.SCHOOL.name());
|
|
|
|
|
|
- List<SysGrade> grades = sysGradeMapper.selectBySchool(id);
|
|
|
+ List<SysGrade> grades = sysGradeMapper.selectBySchool(school_id);
|
|
|
if (null != grades && grades.size() > 0) {
|
|
|
|
|
|
for (SysGrade grade : grades) {
|