| | |
| | | </select> |
| | | |
| | | <select id="checkDeptExistUser" parameterType="Long" resultType="int"> |
| | | select count(1) from sys_user where dept_id = #{deptId} and del_flag = '0' |
| | | select count(1) from sys_user_dept where dept_id = #{deptId} |
| | | </select> |
| | | |
| | | <select id="hasChildByDeptId" parameterType="Long" resultType="int"> |
| | |
| | | <if test="phone != null and phone != ''">phone,</if> |
| | | <if test="email != null and email != ''">email,</if> |
| | | <if test="deptNick != null and deptNick != ''">dept_nick,</if> |
| | | <if test="tenantId != null and tenantId != ''">tenant_id,</if> |
| | | <if test="status != null">status,</if> |
| | | <if test="createBy != null and createBy != ''">create_by,</if> |
| | | create_time |
| | |
| | | <if test="phone != null and phone != ''">#{phone},</if> |
| | | <if test="email != null and email != ''">#{email},</if> |
| | | <if test="deptNick != null and deptNick != '' ">#{deptNick},</if> |
| | | <if test="tenantId != null and tenantId != '' ">#{tenantId},</if> |
| | | <if test="status != null">#{status},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | sysdate() |
| | |
| | | <if test="email != null">email = #{email},</if> |
| | | <if test="deptNick != null and deptNick != '' ">dept_nick = #{deptNick},</if> |
| | | <if test="status != null and status != ''">status = #{status},</if> |
| | | <if test="tenantId != null and tenantId != ''">tenant_id = #{tenantId},</if> |
| | | <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
| | | update_time = sysdate() |
| | | </set> |
| | |
| | | FROM DepartmentHierarchy |
| | | WHERE parent_id = 100; |
| | | </select> |
| | | <select id="selectDeptByDeptName" resultType="com.ruoyi.project.system.domain.SysDept"> |
| | | <include refid="selectDeptVo"/> |
| | | WHERE d.dept_name = #{deptName} |
| | | LIMIT 1 |
| | | </select> |
| | | |
| | | </mapper> |