<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ankaibei.workFlow.webadmin.upms.dao.SysUserInfoMapper">
    <resultMap id="BaseResultMap" type="com.ankaibei.workFlow.webadmin.ankaibei.entity.UserInfoEntity">
        <id column="user_id" jdbcType="VARCHAR" property="userId"/>
        <result column="login_name" jdbcType="VARCHAR" property="loginName"/>
        <result column="password" jdbcType="VARCHAR" property="password"/>
        <result column="show_name" jdbcType="VARCHAR" property="showName"/>
        <result column="dept_id" jdbcType="BIGINT" property="deptId"/>
        <result column="user_type" jdbcType="INTEGER" property="userType"/>
        <result column="head_image_url" jdbcType="VARCHAR" property="headImageUrl"/>
        <result column="user_status" jdbcType="INTEGER" property="userStatus"/>
        <result column="email" jdbcType="VARCHAR" property="email"/>
        <result column="mobile" jdbcType="VARCHAR" property="mobile"/>
        <result column="deleted_flag" jdbcType="INTEGER" property="deletedFlag"/>
        <result column="create_user_id" jdbcType="BIGINT" property="createUserId"/>
        <result column="update_user_id" jdbcType="BIGINT" property="updateUserId"/>
        <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
        <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
        <result column="region" jdbcType="VARCHAR" property="region"/>
        <result column="job_number" jdbcType="BIGINT" property="jobNumber"/>
    </resultMap>


    <select id="getSysUsersByDeptId" resultMap="BaseResultMap">
        SELECT
        work_sys_user.*
        FROM
        work_sys_user
        <where>
            work_sys_user.dept_id = #{deptId}
        </where>
        and deleted_flag ='1'
        ORDER BY create_time desc
    </select>
</mapper>
