CourseTwoMapper.xml 5.0 KB
<?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="org.yrhl.syncdata.mapper.remote.CourseTwoMapper">

    <insert id="insertBusinessDataResultsBatch">
        INSERT INTO business_data_results (id,
        platform_code,
        pubservice_plat_code,
        system_code,
        tender_project_id,
        module,
        tender_flow_key,
        op_type,
        table_name,
        table_info_id,
        data_value,
        block_chain_prev,
        block_chain_hash,
        block_chain_url,
        status,
        block_num,
        creator,
        create_date )
        VALUES
        <foreach collection="list" item="item" separator=",">
            (
            #{item.id},
            #{item.platformCode},
            #{item.pubservicePlatCode},
            #{item.systemCode},
            #{item.tenderProjectId},
            #{item.module},
            #{item.tenderFlowKey},
            #{item.opType},
            #{item.tableName},
            #{item.tableInfoId},
            #{item.dataValue},
            #{item.blockChainPrev},
            #{item.blockChainHash},
            #{item.blockChainUrl},
            #{item.status},
            #{item.blockNum},
            #{item.creator},
            #{item.createDate} )
        </foreach>
    </insert>



    <insert id="insertBlockSourceDataEntityBatch">
        INSERT INTO block_source_data (id,
        platform_code,
        pubservice_plat_code,
        system_code,
        tender_project_id,
        module,
        tender_flow_key,
        op_type,
        table_name,
        table_info_id,
        block_chain_prev,
        block_chain_hash,
        block_chain_url,
        sign_value,
        data,
        des_data,
        status,
        ip,
        create_date,
        update_date,
        creator,
        bid_section_codes,
        block_chain_time,
        is_push )
        VALUES
        <foreach collection="list" item="item" separator=",">
            (
            #{item.id},
            #{item.platformCode},
            #{item.pubservicePlatCode},
            #{item.systemCode},
            #{item.tenderProjectId},
            #{item.module},
            #{item.tenderFlowKey},
            #{item.opType},
            #{item.tableName},
            #{item.tableInfoId},
            #{item.blockChainPrev},
            #{item.blockChainHash},
            #{item.blockChainUrl},
            #{item.signValue},
            #{item.data},
            #{item.desData},
            #{item.status},
            #{item.ip},
            #{item.createDate},
            #{item.updateDate},
            #{item.creator},
            #{item.bidSectionCodes},
            #{item.blockChainTime},
            #{item.isPush} )
        </foreach>
    </insert>




    <insert id="insertBlockNewSourceDataEntityBatch">
        INSERT INTO block_new_source_data (id,
        platform_code,
        pub_service_plat_code,
        system_code,
        block_chain_prev,
        data,
        des_data,
        callback_url,
        ip,
        create_date,
        creator,
        tender_project_id,
        module,
        tender_flow_key,
        op_type,
        table_name,
        table_info_id,
        datas_type
         )
        VALUES
        <foreach collection="list" item="item" separator=",">
            (
            #{item.id},
            #{item.platformCode},
            #{item.pubServicePlatCode},
            #{item.systemCode},
            #{item.blockChainPrev},
            #{item.data},
            #{item.desData},
            #{item.callbackUrl},
            #{item.ip},
            #{item.createDate},
            #{item.creator},
            #{item.tenderProjectId},
            #{item.module},
            #{item.tenderFlowKey},
            #{item.opType},
            #{item.tableName},
            #{item.tableInfoId},
            #{item.datasType}
          )
        </foreach>
    </insert>

    <insert id="insertAllinonepushresultsEntityBatch">
        INSERT INTO allinonepushresults (id,
        TenderProjectId,
        Module,
        TableName,
        InfoId,
        Success,
        SendData,
        OpType,
        CreateTime,
        UpdateTime,
        Remark,
        TenderFlowKey,
        PushInfo,
        DesData,
        MqKey
        )
        VALUES
        <foreach collection="list" item="item" separator=",">
            (
            #{item.id},
            #{item.tenderprojectid},
            #{item.module},
            #{item.tablename},
            #{item.infoid},
            #{item.success},
            #{item.senddata},
            #{item.optype},
            #{item.createtime},
            #{item.updatetime},
            #{item.remark},
            #{item.tenderflowkey},
            #{item.pushInfo},
            #{item.desData},
            #{item.mqKey}

          )
        </foreach>
    </insert>

    <select id="isExist" resultType="int" parameterType="long" >
        select count(1) from ${tableName} where Id=#{infoId}
    </select>
</mapper>