| | |
| | | dept.is_deleted = 0 |
| | | <if test="parentId!=null and parentId!=''"> |
| | | and dept_category=1 |
| | | AND dept.id = #{parentId} |
| | | </if> |
| | | ) |
| | | |
| | |
| | | where 1=1 |
| | | <if test="parentId!=null and parentId!=''"> |
| | | and dept_category=1 |
| | | AND bu.dept_id = #{parentId} |
| | | </if> |
| | | ) |
| | | )c |
| | |
| | | SELECT id FROM blade_dept WHERE parent_id =#{id} and is_deleted = 0 |
| | | </select> |
| | | |
| | | |
| | | <insert id="add" parameterType="org.springblade.modules.system.entity.Dept" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into blade_dept(tenant_id, parent_id,ancestors,dept_category,dept_name) values(#{tenantId}, #{parentId}, #{ancestors}, #{deptCategory}, #{deptName}) |
| | | </insert> |
| | | |
| | | </mapper> |