|  | @@ -228,12 +228,18 @@
 | 
	
		
			
				|  |  |          WHERE user_id_ = #{userId}
 | 
	
		
			
				|  |  |      </update>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    <select id="queryUserRole" resultType="java.lang.Long">
 | 
	
		
			
				|  |  | +        SELECT sur.role_id_ FROM sys_user_role sur WHERE sur.user_id_ = #{userId}
 | 
	
		
			
				|  |  | +    </select>
 | 
	
		
			
				|  |  |      <insert id="batchAddEmployeeRole">
 | 
	
		
			
				|  |  |          INSERT INTO sys_user_role(user_id_,role_id_) values
 | 
	
		
			
				|  |  |          <foreach collection="roleIds" item="item" index="index" separator=",">
 | 
	
		
			
				|  |  |              (#{userId},#{item})
 | 
	
		
			
				|  |  |          </foreach>
 | 
	
		
			
				|  |  |      </insert>
 | 
	
		
			
				|  |  | +    <delete id="delEmployeeRole">
 | 
	
		
			
				|  |  | +        DELETE FROM sys_user_role WHERE user_id_ = #{userId}
 | 
	
		
			
				|  |  | +    </delete>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <insert id="batchInsertRoleMenu">
 | 
	
		
			
				|  |  |          INSERT INTO sys_role_menu (role_id_,menu_id_) VALUES
 | 
	
	
		
			
				|  | @@ -254,9 +260,9 @@
 | 
	
		
			
				|  |  |  		select * from sys_user where id_ = #{id}
 | 
	
		
			
				|  |  |  	</select>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    <select id="queryUserRole" resultType="java.lang.Long">
 | 
	
		
			
				|  |  | -        SELECT sur.role_id_ FROM sys_user_role sur WHERE sur.user_id_ = #{userId}
 | 
	
		
			
				|  |  | -    </select>
 | 
	
		
			
				|  |  | +    <update id="updateUserDemissionDate">
 | 
	
		
			
				|  |  | +        UPDATE employee SET demission_date_ = IF(demission_date_ IS NULL,now(),NULL) WHERE user_id_=#{userID}
 | 
	
		
			
				|  |  | +    </update>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <!-- 根据主键查询一条记录 -->
 | 
	
	
		
			
				|  | @@ -286,23 +292,15 @@
 | 
	
		
			
				|  |  |                  #{updateTime}, #{delFlag}, #{organId}, #{tenantId});
 | 
	
		
			
				|  |  |      </insert>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |      <update id="updatePasswordReq">
 | 
	
		
			
				|  |  |          UPDATE sys_user SET password_ = #{password} WHERE id_ = #{userID}
 | 
	
		
			
				|  |  |      </update>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    <update id="updateUserDemissionDate">
 | 
	
		
			
				|  |  | -        UPDATE employee SET demission_date_ = IF(demission_date_ IS NULL,now(),NULL) WHERE user_id_=#{userID}
 | 
	
		
			
				|  |  | -    </update>
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |      <!-- 根据主键删除一条记录 -->
 | 
	
		
			
				|  |  |      <delete id="delete">
 | 
	
		
			
				|  |  |  		DELETE FROM employee WHERE user_id_ = #{userId}
 | 
	
		
			
				|  |  |  	</delete>
 | 
	
		
			
				|  |  | -    <delete id="delEmployeeRole">
 | 
	
		
			
				|  |  | -        DELETE FROM sys_user_role WHERE user_id_ = #{userId}
 | 
	
		
			
				|  |  | -    </delete>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <!-- 查询当前表的总记录数 -->
 | 
	
		
			
				|  |  |      <select id="queryCount" resultType="int">
 |