<?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.chinaweal.aiccs.aiccs.abnormal.mapper.TSBizDissentMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.chinaweal.aiccs.aiccs.abnormal.entity.TSBizDissent">
        <id column="DISSENTID" property="dissentid" />
        <result column="ABNLISTID" property="abnlistid" />
        <result column="BIZSEQ" property="bizseq" />
        <result column="PRIPID" property="pripid" />
        <result column="REGNO" property="regno" />
        <result column="UNISCID" property="uniscid" />
        <result column="ENTNAME" property="entname" />
        <result column="LEREPNAME" property="lerepname" />
        <result column="CONTACTS" property="contacts" />
        <result column="TELEPHONE" property="telephone" />
        <result column="SITUATION" property="situation" />
        <result column="APPROVALDATE" property="approvaldate" />
        <result column="ACCEPTSTAT" property="acceptstat" />
        <result column="APPROVALREMARK" property="approvalRemark" />
        <result column="APPLYREMARK" property="applyRemark" />
        <result column="AREA_CODE" property="areaCode" />
        <result column="LAUPTIME" property="lauptime" />
        <result column="ABNREA" property="abnRea" />
        <result column="ABNREA_CN" property="abnReaCn" />
        <result column="ABNTIME" property="abnTime" />
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        DISSENTID, ABNLISTID, BIZSEQ, PRIPID, REGNO, ENTNAME, LEREPNAME, CONTACTS, TELEPHONE, SITUATION, APPROVALDATE,
        ACCEPTSTAT, APPROVALREMARK, APPLYREMARK, AREA_CODE, LAUPTIME, ABNREA, ABNREA_CN, ABNTIME
    </sql>

    <select id="selectbizDissentList" parameterType="com.chinaweal.aiccs.aiccs.abnormal.entity.TSBizDissent" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List"/>
        from TSBizDissent
        <where>
            <if test="tsBizDissentModel.abnlistid!=null and tsBizDissentModel.abnlistid!=''">
                and abnListID = #{tsBizDissentModel.abnlistid}
            </if>
            <if test="tsBizDissentModel.bizseq!=null and tsBizDissentModel.bizseq!=''">
                and bizseq = #{tsBizDissentModel.bizseq}
            </if>
            <if test="tsBizDissentModel.pripid!=null and tsBizDissentModel.pripid!=''">
                and pripid = #{tsBizDissentModel.pripid}
            </if>
            <if test="tsBizDissentModel.regno!=null and tsBizDissentModel.regno!=''">
                and regno = #{tsBizDissentModel.regno}
            </if>
        </where>
    </select>
</mapper>
