| | |
| | | |
| | | <select id="selectDeptById" parameterType="Long" resultMap="SysDeptResult"> |
| | | select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, |
| | | (select dept_name from sys_dept where dept_id = d.parent_id) parent_name |
| | | (select dept_name from sys_dept where dept_id = d.parent_id) parent_name, |
| | | d.dept_nick |
| | | from sys_dept d |
| | | where d.dept_id = #{deptId} |
| | | </select> |
| | |
| | | <if test="leader != null and leader != ''">leader,</if> |
| | | <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="status != null">status,</if> |
| | | <if test="createBy != null and createBy != ''">create_by,</if> |
| | | create_time |
| | |
| | | <if test="leader != null and leader != ''">#{leader},</if> |
| | | <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="status != null">#{status},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | sysdate() |
| | |
| | | <if test="leader != null">leader = #{leader},</if> |
| | | <if test="phone != null">phone = #{phone},</if> |
| | | <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="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
| | | update_time = sysdate() |