huminmin
8 小时以前 5929fa552fd2d8cf9d4cad0d519c89728e4a6ada
src/main/resources/mapper/system/SysUserMapper.xml
@@ -88,7 +88,7 @@
      <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
         AND date_format(u.create_time,'%Y%m%d') &lt;= date_format(#{params.endTime},'%Y%m%d')
      </if>
      <if test="params.deptId != null">
      <if test="deptId != null">
         AND u.user_id IN
         (
         SELECT user_id FROM sys_user_dept WHERE dept_id = #{deptId}
@@ -190,7 +190,6 @@
   <insert id="insertUser" parameterType="com.ruoyi.project.system.domain.SysUser" useGeneratedKeys="true" keyProperty="userId">
       insert into sys_user(
          <if test="userId != null and userId != 0">user_id,</if>
          <if test="deptId != null and deptId != 0">dept_id,</if>
          <if test="userName != null and userName != ''">user_name,</if>
          <if test="nickName != null and nickName != ''">nick_name,</if>
          <if test="email != null and email != ''">email,</if>
@@ -205,7 +204,6 @@
          create_time
       )values(
          <if test="userId != null and userId != ''">#{userId},</if>
          <if test="deptId != null and deptId != ''">#{deptId},</if>
          <if test="userName != null and userName != ''">#{userName},</if>
          <if test="nickName != null and nickName != ''">#{nickName},</if>
          <if test="email != null and email != ''">#{email},</if>
@@ -300,4 +298,16 @@
      </if>
   </select>
   <!-- 根据岗位编码查询用户列表 -->
   <select id="selectUserListByPostCode" resultType="com.ruoyi.project.system.domain.SysUser">
      SELECT DISTINCT u.user_id, u.user_name, u.nick_name, u.phonenumber, u.status, u.tenant_id
      FROM sys_user u
      LEFT JOIN sys_user_post up ON u.user_id = up.user_id
      LEFT JOIN sys_post p ON up.post_id = p.post_id
      WHERE u.del_flag = '0'
        AND u.status = '0'
        AND p.post_code = #{postCode}
        AND p.status = '0'
   </select>
</mapper>