<?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.diagbot.mapper.UserOrganizationMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.diagbot.entity.UserOrganization">
        <id column="id" property="id"/>
        <result column="is_deleted" property="isDeleted"/>
        <result column="gmt_create" property="gmtCreate"/>
        <result column="gmt_modified" property="gmtModified"/>
        <result column="creator" property="creator"/>
        <result column="modifier" property="modifier"/>
        <result column="user_id" property="userId"/>
        <result column="organization_id" property="organizationId"/>
    </resultMap>

    <select id="getAgencyPersonnel" resultType="com.diagbot.entity.UserOrganization">
		SELECT * FROM 
		sys_user_organization 
		WHERE 
		is_deleted = "N" AND
		organization_id = #{userORG.organizationId} 
		AND user_id !=0
	</select>

</mapper>
