<?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.hdkj.lt.core.sys.dao.JxzMapper">

    <resultMap id="BaseResultMap" type="com.hdkj.lt.core.bizms.modle.po.Jxz">
            <id property="jxzId" column="jxz_id" jdbcType="VARCHAR"/>
            <result property="jxzName" column="jxz_name" jdbcType="VARCHAR"/>
            <result property="city" column="city" jdbcType="VARCHAR"/>
            <result property="cityName" column="city_name" jdbcType="VARCHAR"/>
            <result property="maintOrg" column="maint_org" jdbcType="VARCHAR"/>
            <result property="maintOrgName" column="maint_org_name" jdbcType="VARCHAR"/>
            <result property="jxzLabel" column="jxz_label" jdbcType="VARCHAR"/>
            <result property="gridCode" column="grid_code" jdbcType="VARCHAR"/>
    </resultMap>

    <sql id="Base_Column_List">
        jxz_id,jxz_name,city,
        city_name,maint_org,maint_org_name,
        jxz_label,grid_code
    </sql>
    <select id="queryJxzXl" resultType="com.hdkj.lt.core.bizms.modle.po.Jxz">
        select j.*, rel.xlid feederId
        from t_jxz j join t_jxz_xl rel on j.jxz_id = rel.jxz_id
        where
            j.jxz_id in(select jxz_id from t_jxz_xl where xlid=#{feederId})
    </select>
</mapper>
