liusheng
2024-09-18 907641e56c2085aaa81f267946dc3e3e9fca73e7
smartor/src/main/resources/mapper/smartor/SysUserDeptMapper.xml
@@ -9,6 +9,8 @@
        <result property="userId" column="user_id"/>
        <result property="deptId" column="dept_id"/>
        <result property="delFlag" column="del_flag"/>
        <result property="deptCode" column="dept_code"/>
        <result property="deptType" column="dept_type"/>
        <result property="createTime" column="create_time"/>
        <result property="updateTime" column="update_time"/>
    </resultMap>
@@ -24,7 +26,14 @@
    </resultMap>
    <sql id="selectSysUserDeptVo">
        select id, user_id, dept_id, del_flag, create_time, update_time
        select id,
               user_id,
               dept_id,
               del_flag,
               create_time,
               update_time,
               dept_code,
               dept_type
        from sys_user_dept
    </sql>
@@ -73,6 +82,12 @@
            <if test="updateTime != null ">
                update_time,
            </if>
            <if test="deptType != null ">
                dept_type,
            </if>
            <if test="deptCode != null ">
                dept_code,
            </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="userId != null">#{userId},
@@ -87,6 +102,12 @@
            </if>
            <if test="updateTime != null ">
                #{updateTime},
            </if>
            <if test="deptType != null ">
                #{deptType},
            </if>
            <if test="deptCode != null ">
                #{deptCode},
            </if>
        </trim>
    </insert>
@@ -109,6 +130,12 @@
            <if test="updateTime != null ">
                update_time = #{updateTime},
            </if>
            <if test="deptType != null ">
                dept_type = #{deptType},
            </if>
            <if test="deptCode != null ">
                dept_code = #{deptCode},
            </if>
        </trim>
        where id = #{id}
    </update>