65 lines
2.7 KiB
XML
65 lines
2.7 KiB
XML
<?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.alonginfo.project.gansu.mapper.GenerationRightDataSyncMapper">
|
|
|
|
<insert id="insertDealOrganize">
|
|
INSERT INTO job_ge_deal_organize
|
|
(data_id, power_count, power_count_per, deal_num, deal_num_per, deal_energy, deal_energy_per)
|
|
VALUES
|
|
(1, #{data.powerCount}, #{data.powerCountPer}, #{data.dealNum}, #{data.dealNumPer}, #{data.dealEnergy}, #{data.dealEnergyPer})
|
|
ON DUPLICATE KEY UPDATE
|
|
power_count=#{data.powerCount}, power_count_per=#{data.powerCountPer}, deal_num=#{data.dealNum}, deal_num_per=#{data.dealNumPer},
|
|
deal_energy=#{data.dealEnergy}, deal_energy_per=#{data.dealEnergyPer}, update_time=now()
|
|
</insert>
|
|
|
|
<insert id="insertSubjectJoin">
|
|
INSERT INTO job_ge_subject_join
|
|
(data_id, participant_count, vendee_participant_count, sale_participant_count)
|
|
VALUES
|
|
(1, #{data.participantCount}, #{data.vendeeParticipantCount}, #{data.saleParticipantCount})
|
|
ON DUPLICATE KEY UPDATE
|
|
participant_count=#{data.participantCount}, vendee_participant_count=#{data.vendeeParticipantCount},
|
|
sale_participant_count=#{data.saleParticipantCount}, update_time=now()
|
|
</insert>
|
|
|
|
<delete id="delBuySaleOrder">
|
|
DELETE FROM job_ge_buy_sale_order
|
|
</delete>
|
|
|
|
<insert id="insertBuySaleOrder">
|
|
INSERT INTO job_ge_buy_sale_order
|
|
(type, sum_sale_energy, sale_participant_name, sum_vendee_energy, vendee_participant_name)
|
|
VALUES
|
|
<foreach collection="data" item="item" separator=",">
|
|
(#{item.type}, #{item.sumSaleEnergy}, #{item.saleParticipantname}, #{item.sumVendeeEnergy}, #{item.vendeeParticipantname})
|
|
</foreach>
|
|
</insert>
|
|
|
|
<delete id="delTradeSettlementYear">
|
|
DELETE FROM job_ge_deal_energy_year
|
|
</delete>
|
|
|
|
<insert id="insertTradeSettlementYear">
|
|
INSERT INTO
|
|
job_ge_deal_energy_year
|
|
(year, energy, settlement)
|
|
VALUES
|
|
<foreach collection="data" item="item" separator=",">
|
|
(#{item.yearMonth}, #{item.energy}, #{item.settlement})
|
|
</foreach>
|
|
</insert>
|
|
|
|
<delete id="delTradeSettlementYearMonth">
|
|
DELETE FROM job_ge_deal_energy_year_month
|
|
</delete>
|
|
|
|
<insert id="insertTradeSettlementYearMonth">
|
|
INSERT INTO job_ge_deal_energy_year_month
|
|
(`year_month`, energy, settlement)
|
|
VALUES
|
|
<foreach collection="data" item="item" separator=",">
|
|
(#{item.yearMonth}, #{item.energy}, #{item.settlement})
|
|
</foreach>
|
|
</insert>
|
|
</mapper>
|