幼儿园新增部门管理
This commit is contained in:
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -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>
|
Reference in New Issue
Block a user