| | |
| | | <result property="deptType" column="dept_type"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="campusid" column="campusid"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="deptResult" type="com.ruoyi.common.core.domain.entity.SysDept"> |
| | |
| | | <result property="orderNum" column="order_num"/> |
| | | <result property="leader" column="leader"/> |
| | | <result property="status" column="dept_status"/> |
| | | <result property="campusid" column="campusid"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectSysUserDeptVo"> |
| | |
| | | user_id, |
| | | dept_id, |
| | | del_flag, |
| | | campusid, |
| | | orgid, |
| | | create_time, |
| | | update_time, |
| | |
| | | </if> |
| | | <if test="deptCode != null "> |
| | | and dept_code = #{deptCode} |
| | | </if> |
| | | <if test="campusid != null "> |
| | | and campusid = #{campusid} |
| | | </if> |
| | | </where> |
| | | </select> |
| | |
| | | <if test="orgid != null "> |
| | | orgid, |
| | | </if> |
| | | <if test="userCode != null "> |
| | | user_code, |
| | | </if> |
| | | <if test="campusid != null "> |
| | | campusid, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="userId != null">#{userId}, |
| | |
| | | </if> |
| | | <if test="orgid != null "> |
| | | #{orgid}, |
| | | </if> |
| | | <if test="userCode != null "> |
| | | #{userCode}, |
| | | </if> |
| | | <if test="campusid != null "> |
| | | #{campusid}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | |
| | | <if test="orgid != null "> |
| | | orgid = #{orgid}, |
| | | </if> |
| | | <if test="campusid != null "> |
| | | campusid = #{campusid}, |
| | | </if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | d.ancestors, |
| | | d.dept_name, |
| | | d.order_num, |
| | | d.campusid, |
| | | d.leader, |
| | | d.orgid, |
| | | d.status as dept_status |
| | | from sys_dept d |
| | | left join sys_user_dept ud on d.dept_id = ud.dept_id |
| | | left join sys_user_dept ud on d.dept_code = ud.dept_code |
| | | where ud.user_id = #{userId} |
| | | and ud.del_flag = 0 |
| | | and d.del_flag = 0 |