puzhibing
2023-12-07 aa0131b1efb96c9f52371160b3a1e6823db3656a
ruoyi-modules/ruoyi-system/src/main/resources/mapper/sys/SysUserMapper.xml
@@ -24,7 +24,8 @@
        <result property="updateBy"     column="update_by"    />
        <result property="updateTime"   column="update_time"  />
        <result property="remark"       column="remark"       />
      <result property="dataScope"       column="user_data_scope"       />
      <result property="dataScope"       column="data_scope"/>
      <result property="dataScopeEmployee" column="data_scope_employee"/>
        <association property="dept"    column="dept_id" javaType="SysDept" resultMap="deptResult" />
        <collection  property="roles"   javaType="java.util.List"           resultMap="RoleResult" />
    </resultMap>
@@ -49,7 +50,7 @@
    </resultMap>
   
   <sql id="selectUserVo">
        select u.user_id, u.dept_id, u.user_name,u.user_type, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, u.data_scope as user_data_scope,
        select u.user_id, u.dept_id, u.user_name,u.user_type, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, u.data_scope, u.data_scope_employee,
        d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
        r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
        from sys_user u
@@ -160,6 +161,7 @@
          <if test="remark != null and remark != ''">remark,</if>
         <if test="dataScope != null and dataScope != ''">data_scope,</if>
         <if test="userType != null and userType != ''">user_type,</if>
         <if test="dataScopeEmployee != null and dataScopeEmployee != ''">data_scope_employee,</if>
      create_time
       )values(
          <if test="userId != null and userId != ''">#{userId},</if>
@@ -176,6 +178,7 @@
          <if test="remark != null and remark != ''">#{remark},</if>
         <if test="dataScope != null and dataScope != ''">#{dataScope},</if>
         <if test="userType != null and userType != ''">#{userType},</if>
         <if test="dataScopeEmployee != null and dataScopeEmployee != ''">#{dataScopeEmployee},</if>
      sysdate()
       )
   </insert>
@@ -197,6 +200,7 @@
          <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
          <if test="remark != null">remark = #{remark},</if>
         <if test="dataScope != null and dataScope != ''">data_scope = #{dataScope},</if>
         <if test="dataScopeEmployee != null and dataScopeEmployee != ''">data_scope_employee = #{dataScopeEmployee},</if>
         update_time = sysdate()
       </set>
       where user_id = #{userId}