幼儿园新增部门管理

This commit is contained in:
sk1551
2020-04-17 07:42:54 +08:00
parent 16f4cc0d9a
commit fb937034a7
3 changed files with 31 additions and 1 deletions

View File

@ -147,6 +147,29 @@ public class BySchoolController extends BaseController
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
//遍历ids
for (int i=0;i<ids.length;i++)
{
//循环找出school表的id
Long bySchId = ids[i];
//用school表ID获取xxdm的值
//将值赋给dept中的schoolID
SysDept dept = new SysDept();
dept.setSchoolId(bySchoolService.selectBySchoolById(bySchId).getXxdm());
//通过dept表的schoolID来找出dept的List
deptService.deleteDeptById(deptService.selectDeptList(dept).get(0).getDeptId());
}
return toAjax(bySchoolService.deleteBySchoolByIds(ids));
}
}

View File

@ -40,6 +40,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null and status != ''">
AND status = #{status}
</if>
<if test="schoolId != null and schoolId != ''">
AND school_id = #{schoolId}
</if>
<!-- 数据范围过滤 -->
${dataScope}
order by d.parent_id, d.order_num
@ -152,4 +155,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update sys_dept set del_flag = '2' where dept_id = #{deptId}
</delete>
</mapper>