<?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.mosty.base.manager.mapper.TbJcglAbfcMapper">
    <resultMap type="com.mosty.base.model.entity.jcgl.TbJcglAbfc" id="tbJcglAbfc">
        <result property="id" column="id" jdbcType="VARCHAR"/>
        <result property="bt" column="bt" jdbcType="VARCHAR"/>
        <result property="zy" column="zy" jdbcType="VARCHAR"/>
        <result property="fjid" column="fjid" jdbcType="VARCHAR"/>
        <result property="cjrid" column="cjrid" jdbcType="VARCHAR"/>
        <result property="cjrxm" column="cjrxm" jdbcType="VARCHAR"/>
        <result property="cjrsfzh" column="cjrsfzh" jdbcType="TIMESTAMP"/>
        <result property="tjsj" column="tjsj" jdbcType="TIMESTAMP"/>
        <result property="ssbm" column="ssbm" jdbcType="VARCHAR"/>
        <result property="ssbmdm" column="ssbmdm" jdbcType="VARCHAR"/>
        <result property="ssxgaj" column="ssxgaj" jdbcType="VARCHAR"/>
        <result property="ssxgajdm" column="ssxgajdm" jdbcType="VARCHAR"/>
        <result property="sssgaj" column="sssgaj" jdbcType="VARCHAR"/>
        <result property="sssgajdm" column="sssgajdm" jdbcType="VARCHAR"/>
        <result property="xtSjly" column="xt_sjly" jdbcType="VARCHAR"/>
        <result property="xtSjzt" column="xt_sjzt" jdbcType="VARCHAR"/>
        <result property="xtScbz" column="xt_scbz" jdbcType="VARCHAR"/>
        <result property="xtCjip" column="xt_cjip" jdbcType="VARCHAR"/>
        <result property="xtCjsj" column="xt_cjsj" jdbcType="VARCHAR"/>
        <result property="xtCjrId" column="xt_cjr_id" jdbcType="VARCHAR"/>
        <result property="xtCjr" column="xt_cjr" jdbcType="VARCHAR"/>
        <result property="xtCjbmdm" column="xt_cjbmdm" jdbcType="VARCHAR"/>
        <result property="xtCjbmmc" column="xt_cjbmmc" jdbcType="VARCHAR"/>
        <result property="xtZhgxip" column="xt_zhgxip" jdbcType="VARCHAR"/>
        <result property="xtZhgxsj" column="xt_zhgxsj" jdbcType="VARCHAR"/>
        <result property="xtZhgxrid" column="xt_zhgxrid" jdbcType="VARCHAR"/>
        <result property="xtZhgxr" column="xt_zhgxr" jdbcType="VARCHAR"/>
        <result property="xtZhgxbmdm" column="xt_zhgxbmdm" jdbcType="VARCHAR"/>
        <result property="xtZhgxbm" column="xt_zhgxbm" jdbcType="VARCHAR"/>
        <result property="bz" column="bz" jdbcType="VARCHAR"/>
    </resultMap>

    <sql id="base_column_list">
        id,bt,zy,fjid,cjrid,cjrxm,cjrsfzh,tjsj,
        ssbm, ssbmdm, ssxgaj, ssxgajdm, sssgaj, sssgajdm, xt_sjly, xt_sjzt, xt_scbz,
        xt_cjip, xt_cjsj, xt_cjr_id, xt_cjr, xt_cjbmdm, xt_cjbmmc, xt_zhgxip, xt_zhgxsj, xt_zhgxrid,
        xt_zhgxr, xt_zhgxbmdm, xt_zhgxbm, bz
    </sql>

    <select id="getList" resultMap="tbJcglAbfc"
            parameterType="com.mosty.base.model.query.jcgl.TbJcglAbfcQuery">
        select
        <include refid="base_column_list"/>
        from tb_jcgl_abfc where xt_scbz = '0' and xt_sjzt = '1'
        <if test="bt != null and bt != ''">
            and bt like concat('%',#{bt},'%')
        </if>
        <if test="zy != null and zy != ''">
            and zy like concat('%',#{zy},'%')
        </if>
        <if test="cjrid != null and cjrid != ''">
            and cjrid = #{cjrid}
        </if>
        <if test="cjrxm != null and cjrxm != ''">
            and cjrxm like concat('%',#{cjrxm},'%')
        </if>
    </select>
</mapper>