<?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.trs.ggzyexchange.mapper.GcTenderbidfileMapper">

    <select id="queryGcTenderbidfileAllList" resultType="com.trs.ggzyexchange.entity.TenderDetailsVo">

        select
            gctb.SOURCE_DATA_KEY sourceDataKey,
            gcp.PROJECT_CODE projectCode,
            gcp.PROJECT_NAME projectName,
            gctb.TENDER_PROJECT_CODE tenderProjectCode,
            gctb.DOC_NAME noticeName,
            gctb.CLARIFY_CONTENT noticeContent,
            gctb.SUBMIT_TIME noticeSendTime,
            gct.REGION_CODE regionCode,
            gcp.INDUSTRIES_TYPE industriesTypeCode,
            gctb.PLATFORM_CODE platformCode,
            gctb.DATA_SOURCE_CODE dataSourceCode,
            gctb.BID_SECTION_CODE bidSectionCodes,
            gctb.valid_period validPeriod,
            gctb.clarify_time clarifyTime
        from
            GC_TENDERBIDFILE gctb
                left join GC_TENDERPROJECT gct
                          on gct.TENDER_PROJECT_CODE = gctb.TENDER_PROJECT_CODE
                left join GC_PROJECT gcp
                          on gct.PROJECT_CODE = gcp.PROJECT_CODE
    </select>
    <select id="maxDataTimeStamp" resultType="java.lang.Long">
        select max(DATA_TIMESTAMP) from "ggzyexchange"."GC_TENDERBIDFILE";
    </select>
    <select id="queryGcTenderbidfileAllListByTime" resultType="com.trs.ggzyexchange.entity.TenderDetailsVo">
        select
            gctb.SOURCE_DATA_KEY sourceDataKey,
            gcp.PROJECT_CODE projectCode,
            gcp.PROJECT_NAME projectName,
            gctb.TENDER_PROJECT_CODE tenderProjectCode,
            gctb.DOC_NAME noticeName,
            gctb.CLARIFY_CONTENT noticeContent,
            gctb.SUBMIT_TIME noticeSendTime,
            gct.REGION_CODE regionCode,
            gcp.INDUSTRIES_TYPE industriesTypeCode,
            gctb.PLATFORM_CODE platformCode,
            gctb.DATA_SOURCE_CODE dataSourceCode,
            gctb.BID_SECTION_CODE bidSectionCodes,
            gctb.valid_period validPeriod,
            gctb.clarify_time clarifyTime
        from
            GC_TENDERBIDFILE gctb
                left join GC_TENDERPROJECT gct
                          on gct.TENDER_PROJECT_CODE = gctb.TENDER_PROJECT_CODE
                left join GC_PROJECT gcp
                          on gct.PROJECT_CODE = gcp.PROJECT_CODE
        where gctb.DATA_TIMESTAMP &gt; #{time}
    </select>
</mapper>
