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

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

        select

            count(1)

        from ZRZY_BG_BIDWIN_NOTICE zbbn

                 left join zrzy_bg_notice zbn on zbbn.PROJECT_CODE = zbn.PROJECT_CODE

        where zbn.zone like CONCAT(#{regionCode}, '%')



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

        select

            count(1)

        from ZRZY_BG_BIDWIN_NOTICE zbbn

                 left join zrzy_bg_notice zbn on zbbn.PROJECT_CODE = zbn.PROJECT_CODE

        where
            zbbn.ISSUE_TIME &gt;= #{resultStartTime} and zbbn.ISSUE_TIME &lt;= #{resultEndTime}
            and
              zbn.zone like CONCAT(#{regionCode}, '%')


    </select>
    <select id="getSumMoneyByRegionCode" resultType="com.trs.ggzyexchange.entity.ZrzyBgBidwinNotice">
        select
            sum(cast(zbbn.WIN_BID_PRICE as decimal(9,2)) * 10000) as sumAll
        from ZRZY_BG_BIDWIN_NOTICE zbbn
                 left join zrzy_bg_notice zbn on zbbn.PROJECT_CODE = zbn.PROJECT_CODE
        where
            zbn.zone like CONCAT(#{regionCode}, '%')

    </select>
    <select id="getSumMoney" resultType="com.trs.ggzyexchange.entity.ZrzyBgBidwinNotice">
        select
            sum(cast(zbbn.WIN_BID_PRICE as decimal(9,2)) * 10000) as sumAll
        from ZRZY_BG_BIDWIN_NOTICE zbbn
                 left join zrzy_bg_notice zbn on zbbn.PROJECT_CODE = zbn.PROJECT_CODE
    </select>
</mapper>
