yupeng
2025-04-09 db7e077ea8f2d995e922bc11b77dc149592a7455
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
@@ -225,7 +225,8 @@
      select u.user_id AS userId, u.dept_id AS deptId, u.user_name AS userName, u.nick_name AS nickName, u.email AS email, u.avatar AS avatar,u.disable_remark AS disableRemark,
            u.phonenumber AS phonenumber, u.sex AS sex, u.status AS status, u.del_flag AS delFlag, u.login_ip AS loginIp,u.operating_time AS operatingTime,u.operating_person AS operatingPerson,
            u.login_date AS loginDate, u.create_by AS createBy, u.create_time AS createTime, u.remark AS remark,u.ifBlack AS ifBlack, u.districtId AS districtId,
            r.role_id AS roleId, r.role_name AS roleName, r.role_key AS roleKey, r.role_sort AS roleSort, r.data_scope AS dataScope, r.status as role_status,u.deptName as deptName
            r.role_id AS roleId, r.role_name AS roleName, r.role_key AS roleKey, r.role_sort AS roleSort, r.data_scope AS dataScope, r.status as role_status,u.deptName as deptName,
            u.business_dept_id AS businessDeptId
      from sys_user u
      left join sys_user_role ur on u.user_id = ur.user_id
      left join sys_role r on r.role_id = ur.role_id
@@ -249,7 +250,7 @@
            #{roleId}
         </foreach>
      </if>
      <if test="query.businessDeptId != null and query.businessDeptId != '' and query.businessDeptId != '0'">
      <if test="query.businessDeptId != null and query.businessDeptId != '' and query.businessDeptId != 0">
         AND u.business_dept_id = #{query.businessDeptId}
      </if>
      ORDER BY u.create_time DESC
@@ -275,6 +276,7 @@
          <if test="remark != null and remark != ''">remark,</if>
          <if test="ifBlack != null">ifBlack,</if>
          <if test="districtId != null">districtId,</if>
         <if test="businessDeptId != null">business_dept_id,</if>
          create_time
       )values(
          <if test="userId != null and userId != ''">#{userId},</if>
@@ -293,6 +295,7 @@
          <if test="remark != null and remark != ''">#{remark},</if>
         <if test="ifBlack != null">#{ifBlack},</if>
         <if test="districtId != null">#{districtId},</if>
         <if test="businessDeptId != null">#{businessDeptId},</if>
          sysdate()
       )
   </insert>
@@ -319,6 +322,7 @@
         <if test="disableRemark != null">disable_remark = #{disableRemark},</if>
         <if test="operatingTime != null">operating_time = #{operatingTime},</if>
         <if test="operatingPerson != null">operating_person = #{operatingPerson},</if>
         <if test="businessDeptId != null">business_dept_id = #{businessDeptId},</if>
          update_time = sysdate()
       </set>
       where user_id = #{userId}