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

    <select id="countNoticeByRegionCode" resultType="java.lang.Integer">

        select count(1) from
            ZRZY_JYZB_BIDWIN_NOTICE zjbn
           left join zrzy_jyzb_notice zjb on zjbn.PROJECT_CODE = zjb.PROJECT_CODE
        where zjb.zone like CONCAT(#{regionCode}, '%')

    </select>
    <select id="countNoticeByRegionCodeAndTime" resultType="java.lang.Integer">

        select count(1) from
            ZRZY_JYZB_BIDWIN_NOTICE zjbn
                left join zrzy_jyzb_notice zjb on zjbn.PROJECT_CODE = zjb.PROJECT_CODE
        where
            zjbn.ISSUE_TIME &gt;= #{resultStartTime} and zjbn.ISSUE_TIME &lt;= #{resultEndTime}
              and
              zjb.zone like CONCAT(#{regionCode}, '%')

    </select>
    <select id="getSumMoneyByRegionCode" resultType="com.trs.ggzyexchange.entity.ZrzyJyzbBidwinNotice">
        select sum(zjbn.WIN_BID_PRICE) as sumAl from
            ZRZY_JYZB_BIDWIN_NOTICE zjbn
                left join zrzy_jyzb_notice zjb on zjbn.PROJECT_CODE = zjb.PROJECT_CODE
        where zjb.zone like CONCAT(#{regionCode}, '%')
    </select>
    <select id="getSumMoney" resultType="com.trs.ggzyexchange.entity.ZrzyJyzbBidwinNotice">
        select sum(zjbn.WIN_BID_PRICE) as sumAl from
            ZRZY_JYZB_BIDWIN_NOTICE zjbn
                left join zrzy_jyzb_notice zjb on zjbn.PROJECT_CODE = zjb.PROJECT_CODE
    </select>
</mapper>
