<?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.TSBizAbnRevokeMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.chinaweal.aiccs.aiccs.abnormal.entity.TSBizAbnRevoke">
        <result column="BizAbnRevokeID" property="bizAbnRevokeID" />
        <result column="BizSeq" property="bizSeq" />
        <result column="RevokeName" property="revokeName" />
        <result column="RevokeReason" property="revokeReason" />
        <result column="InitiatorID" property="initiatorID" />
        <result column="Initiator" property="initiator" />
        <result column="initiateTime" property="initiateTime" />
        <result column="AicID" property="aicID" />
        <result column="BizType" property="bizType" />
        <result column="Status" property="status" />
        <result column="ApprTime" property="apprTime" />
        <result column="LaUpTime" property="laUpTime" />
        <result column="AREA_CODE" property="areaCode" />
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        BizAbnRevokeID, BizSeq, RevokeName, RevokeReason, InitiatorID, Initiator, initiateTime, AicID, BizType, Status, ApprTime, LaUpTime, AREA_CODE
    </sql>

    <select id="selectBizAbnRevokeByStatus" parameterType="java.lang.String" resultMap="BaseResultMap">
        select
            a.BizAbnRevokeID,  a.BizSeq,  a.RevokeName,
            a.RevokeReason,  a.InitiatorID,  a.Initiator,
            a.initiateTime,  a.AicID,  a.BizType,
            a.Status,  a.ApprTime,  a.LaUpTime
        from TSBizAbnRevoke a ,TSRevokeEnts b
        where a.bizseq = b.bizSeq and a.status = '0'
          and b.revokeid = #{revokeid,jdbcType=CHAR}
    </select>
</mapper>
