|
|
|
@ -10,22 +10,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<result property="tradeDate" column="trade_date" />
|
|
|
|
<result property="tradeDate" column="trade_date" />
|
|
|
|
<result property="openPrice" column="open_price" />
|
|
|
|
<result property="openPrice" column="open_price" />
|
|
|
|
<result property="closePrice" column="close_price" />
|
|
|
|
<result property="closePrice" column="close_price" />
|
|
|
|
|
|
|
|
<result property="highPrice" column="high_price" />
|
|
|
|
|
|
|
|
<result property="lowPrice" column="low_price" />
|
|
|
|
<result property="volume" column="volume" />
|
|
|
|
<result property="volume" column="volume" />
|
|
|
|
<result property="turnover" column="turnover" />
|
|
|
|
<result property="turnover" column="turnover" />
|
|
|
|
<result property="totalMarketCap" column="total_market_cap" />
|
|
|
|
<result property="totalMarketCap" column="total_market_cap" />
|
|
|
|
<result property="freeCirculationCap" column="free_circulation_cap" />
|
|
|
|
<result property="freeCirculationCap" column="free_circulation_cap" />
|
|
|
|
<result property="priceChangeRate" column="price_change_rate" />
|
|
|
|
<result property="priceChangeRate" column="price_change_rate" />
|
|
|
|
|
|
|
|
<result property="amplitude" column="amplitude" />
|
|
|
|
|
|
|
|
<result property="turnoverRate" column="turnover_rate" />
|
|
|
|
|
|
|
|
<result property="equalWeightAvgChangeRate" column="equal_weight_avg_change_rate" />
|
|
|
|
<result property="peTtm" column="pe_ttm" />
|
|
|
|
<result property="peTtm" column="pe_ttm" />
|
|
|
|
<result property="peTtmMedian" column="pe_ttm_median" />
|
|
|
|
<result property="peTtmMedian" column="pe_ttm_median" />
|
|
|
|
|
|
|
|
<result property="upCount" column="up_count" />
|
|
|
|
|
|
|
|
<result property="downCount" column="down_count" />
|
|
|
|
|
|
|
|
<result property="limitUpCount" column="limit_up_count" />
|
|
|
|
|
|
|
|
<result property="limitDownCount" column="limit_down_count" />
|
|
|
|
|
|
|
|
<result property="noChangeCount" column="no_change_count" />
|
|
|
|
|
|
|
|
<result property="suspendCount" column="suspend_count" />
|
|
|
|
|
|
|
|
<result property="newHighFlag" column="new_high_flag" />
|
|
|
|
|
|
|
|
<result property="newLowFlag" column="new_low_flag" />
|
|
|
|
<result property="createTime" column="create_time" />
|
|
|
|
<result property="createTime" column="create_time" />
|
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
|
</resultMap>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
<sql id="selectIndustryIndexVo">
|
|
|
|
<sql id="selectIndustryIndexVo">
|
|
|
|
select industry_index_code, industry_index_name, component_count, trade_date,
|
|
|
|
select industry_index_code, industry_index_name, component_count, trade_date,
|
|
|
|
open_price, close_price, volume, turnover, total_market_cap,
|
|
|
|
open_price, close_price, high_price, low_price, volume, turnover,
|
|
|
|
free_circulation_cap, price_change_rate, pe_ttm, pe_ttm_median,
|
|
|
|
total_market_cap, free_circulation_cap, price_change_rate, amplitude,
|
|
|
|
create_time, update_time
|
|
|
|
turnover_rate, equal_weight_avg_change_rate, pe_ttm, pe_ttm_median,
|
|
|
|
|
|
|
|
up_count, down_count, limit_up_count, limit_down_count, no_change_count,
|
|
|
|
|
|
|
|
suspend_count, new_high_flag, new_low_flag, create_time, update_time
|
|
|
|
from t_industry_index
|
|
|
|
from t_industry_index
|
|
|
|
</sql>
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
|
|
@ -77,13 +92,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<if test="tradeDate != null">trade_date,</if>
|
|
|
|
<if test="tradeDate != null">trade_date,</if>
|
|
|
|
<if test="openPrice != null">open_price,</if>
|
|
|
|
<if test="openPrice != null">open_price,</if>
|
|
|
|
<if test="closePrice != null">close_price,</if>
|
|
|
|
<if test="closePrice != null">close_price,</if>
|
|
|
|
|
|
|
|
<if test="highPrice != null">high_price,</if>
|
|
|
|
|
|
|
|
<if test="lowPrice != null">low_price,</if>
|
|
|
|
<if test="volume != null">volume,</if>
|
|
|
|
<if test="volume != null">volume,</if>
|
|
|
|
<if test="turnover != null">turnover,</if>
|
|
|
|
<if test="turnover != null">turnover,</if>
|
|
|
|
<if test="totalMarketCap != null">total_market_cap,</if>
|
|
|
|
<if test="totalMarketCap != null">total_market_cap,</if>
|
|
|
|
<if test="freeCirculationCap != null">free_circulation_cap,</if>
|
|
|
|
<if test="freeCirculationCap != null">free_circulation_cap,</if>
|
|
|
|
<if test="priceChangeRate != null">price_change_rate,</if>
|
|
|
|
<if test="priceChangeRate != null">price_change_rate,</if>
|
|
|
|
|
|
|
|
<if test="amplitude != null">amplitude,</if>
|
|
|
|
|
|
|
|
<if test="turnoverRate != null">turnover_rate,</if>
|
|
|
|
|
|
|
|
<if test="equalWeightAvgChangeRate != null">equal_weight_avg_change_rate,</if>
|
|
|
|
<if test="peTtm != null">pe_ttm,</if>
|
|
|
|
<if test="peTtm != null">pe_ttm,</if>
|
|
|
|
<if test="peTtmMedian != null">pe_ttm_median,</if>
|
|
|
|
<if test="peTtmMedian != null">pe_ttm_median,</if>
|
|
|
|
|
|
|
|
<if test="upCount != null">up_count,</if>
|
|
|
|
|
|
|
|
<if test="downCount != null">down_count,</if>
|
|
|
|
|
|
|
|
<if test="limitUpCount != null">limit_up_count,</if>
|
|
|
|
|
|
|
|
<if test="limitDownCount != null">limit_down_count,</if>
|
|
|
|
|
|
|
|
<if test="noChangeCount != null">no_change_count,</if>
|
|
|
|
|
|
|
|
<if test="suspendCount != null">suspend_count,</if>
|
|
|
|
|
|
|
|
<if test="newHighFlag != null">new_high_flag,</if>
|
|
|
|
|
|
|
|
<if test="newLowFlag != null">new_low_flag,</if>
|
|
|
|
create_time,
|
|
|
|
create_time,
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
@ -93,13 +121,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<if test="tradeDate != null">#{tradeDate},</if>
|
|
|
|
<if test="tradeDate != null">#{tradeDate},</if>
|
|
|
|
<if test="openPrice != null">#{openPrice},</if>
|
|
|
|
<if test="openPrice != null">#{openPrice},</if>
|
|
|
|
<if test="closePrice != null">#{closePrice},</if>
|
|
|
|
<if test="closePrice != null">#{closePrice},</if>
|
|
|
|
|
|
|
|
<if test="highPrice != null">#{highPrice},</if>
|
|
|
|
|
|
|
|
<if test="lowPrice != null">#{lowPrice},</if>
|
|
|
|
<if test="volume != null">#{volume},</if>
|
|
|
|
<if test="volume != null">#{volume},</if>
|
|
|
|
<if test="turnover != null">#{turnover},</if>
|
|
|
|
<if test="turnover != null">#{turnover},</if>
|
|
|
|
<if test="totalMarketCap != null">#{totalMarketCap},</if>
|
|
|
|
<if test="totalMarketCap != null">#{totalMarketCap},</if>
|
|
|
|
<if test="freeCirculationCap != null">#{freeCirculationCap},</if>
|
|
|
|
<if test="freeCirculationCap != null">#{freeCirculationCap},</if>
|
|
|
|
<if test="priceChangeRate != null">#{priceChangeRate},</if>
|
|
|
|
<if test="priceChangeRate != null">#{priceChangeRate},</if>
|
|
|
|
|
|
|
|
<if test="amplitude != null">#{amplitude},</if>
|
|
|
|
|
|
|
|
<if test="turnoverRate != null">#{turnoverRate},</if>
|
|
|
|
|
|
|
|
<if test="equalWeightAvgChangeRate != null">#{equalWeightAvgChangeRate},</if>
|
|
|
|
<if test="peTtm != null">#{peTtm},</if>
|
|
|
|
<if test="peTtm != null">#{peTtm},</if>
|
|
|
|
<if test="peTtmMedian != null">#{peTtmMedian},</if>
|
|
|
|
<if test="peTtmMedian != null">#{peTtmMedian},</if>
|
|
|
|
|
|
|
|
<if test="upCount != null">#{upCount},</if>
|
|
|
|
|
|
|
|
<if test="downCount != null">#{downCount},</if>
|
|
|
|
|
|
|
|
<if test="limitUpCount != null">#{limitUpCount},</if>
|
|
|
|
|
|
|
|
<if test="limitDownCount != null">#{limitDownCount},</if>
|
|
|
|
|
|
|
|
<if test="noChangeCount != null">#{noChangeCount},</if>
|
|
|
|
|
|
|
|
<if test="suspendCount != null">#{suspendCount},</if>
|
|
|
|
|
|
|
|
<if test="newHighFlag != null">#{newHighFlag},</if>
|
|
|
|
|
|
|
|
<if test="newLowFlag != null">#{newLowFlag},</if>
|
|
|
|
NOW(),
|
|
|
|
NOW(),
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
</insert>
|
|
|
|
</insert>
|
|
|
|
@ -111,13 +152,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<if test="componentCount != null">component_count = #{componentCount},</if>
|
|
|
|
<if test="componentCount != null">component_count = #{componentCount},</if>
|
|
|
|
<if test="openPrice != null">open_price = #{openPrice},</if>
|
|
|
|
<if test="openPrice != null">open_price = #{openPrice},</if>
|
|
|
|
<if test="closePrice != null">close_price = #{closePrice},</if>
|
|
|
|
<if test="closePrice != null">close_price = #{closePrice},</if>
|
|
|
|
|
|
|
|
<if test="highPrice != null">high_price = #{highPrice},</if>
|
|
|
|
|
|
|
|
<if test="lowPrice != null">low_price = #{lowPrice},</if>
|
|
|
|
<if test="volume != null">volume = #{volume},</if>
|
|
|
|
<if test="volume != null">volume = #{volume},</if>
|
|
|
|
<if test="turnover != null">turnover = #{turnover},</if>
|
|
|
|
<if test="turnover != null">turnover = #{turnover},</if>
|
|
|
|
<if test="totalMarketCap != null">total_market_cap = #{totalMarketCap},</if>
|
|
|
|
<if test="totalMarketCap != null">total_market_cap = #{totalMarketCap},</if>
|
|
|
|
<if test="freeCirculationCap != null">free_circulation_cap = #{freeCirculationCap},</if>
|
|
|
|
<if test="freeCirculationCap != null">free_circulation_cap = #{freeCirculationCap},</if>
|
|
|
|
<if test="priceChangeRate != null">price_change_rate = #{priceChangeRate},</if>
|
|
|
|
<if test="priceChangeRate != null">price_change_rate = #{priceChangeRate},</if>
|
|
|
|
|
|
|
|
<if test="amplitude != null">amplitude = #{amplitude},</if>
|
|
|
|
|
|
|
|
<if test="turnoverRate != null">turnover_rate = #{turnoverRate},</if>
|
|
|
|
|
|
|
|
<if test="equalWeightAvgChangeRate != null">equal_weight_avg_change_rate = #{equalWeightAvgChangeRate},</if>
|
|
|
|
<if test="peTtm != null">pe_ttm = #{peTtm},</if>
|
|
|
|
<if test="peTtm != null">pe_ttm = #{peTtm},</if>
|
|
|
|
<if test="peTtmMedian != null">pe_ttm_median = #{peTtmMedian},</if>
|
|
|
|
<if test="peTtmMedian != null">pe_ttm_median = #{peTtmMedian},</if>
|
|
|
|
|
|
|
|
<if test="upCount != null">up_count = #{upCount},</if>
|
|
|
|
|
|
|
|
<if test="downCount != null">down_count = #{downCount},</if>
|
|
|
|
|
|
|
|
<if test="limitUpCount != null">limit_up_count = #{limitUpCount},</if>
|
|
|
|
|
|
|
|
<if test="limitDownCount != null">limit_down_count = #{limitDownCount},</if>
|
|
|
|
|
|
|
|
<if test="noChangeCount != null">no_change_count = #{noChangeCount},</if>
|
|
|
|
|
|
|
|
<if test="suspendCount != null">suspend_count = #{suspendCount},</if>
|
|
|
|
|
|
|
|
<if test="newHighFlag != null">new_high_flag = #{newHighFlag},</if>
|
|
|
|
|
|
|
|
<if test="newLowFlag != null">new_low_flag = #{newLowFlag},</if>
|
|
|
|
update_time = NOW(),
|
|
|
|
update_time = NOW(),
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
where industry_index_code = #{industryIndexCode} and trade_date = #{tradeDate}
|
|
|
|
where industry_index_code = #{industryIndexCode} and trade_date = #{tradeDate}
|
|
|
|
@ -129,38 +183,63 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="batchInsertIndustryIndex" parameterType="java.util.List">
|
|
|
|
<insert id="batchInsertIndustryIndex" parameterType="java.util.List">
|
|
|
|
insert into t_industry_index(industry_index_code, industry_index_name, component_count, trade_date,
|
|
|
|
insert into t_industry_index(industry_index_code, industry_index_name, component_count, trade_date,
|
|
|
|
open_price, close_price, volume, turnover, total_market_cap,
|
|
|
|
open_price, close_price, high_price, low_price, volume, turnover,
|
|
|
|
free_circulation_cap, price_change_rate, pe_ttm, pe_ttm_median, create_time)
|
|
|
|
total_market_cap, free_circulation_cap, price_change_rate, amplitude,
|
|
|
|
|
|
|
|
turnover_rate, equal_weight_avg_change_rate, pe_ttm, pe_ttm_median,
|
|
|
|
|
|
|
|
up_count, down_count, limit_up_count, limit_down_count, no_change_count,
|
|
|
|
|
|
|
|
suspend_count, new_high_flag, new_low_flag, create_time)
|
|
|
|
values
|
|
|
|
values
|
|
|
|
<foreach collection="list" item="item" separator=",">
|
|
|
|
<foreach collection="list" item="item" separator=",">
|
|
|
|
(#{item.industryIndexCode}, #{item.industryIndexName}, #{item.componentCount}, #{item.tradeDate},
|
|
|
|
(#{item.industryIndexCode}, #{item.industryIndexName}, #{item.componentCount}, #{item.tradeDate},
|
|
|
|
#{item.openPrice}, #{item.closePrice}, #{item.volume}, #{item.turnover}, #{item.totalMarketCap},
|
|
|
|
#{item.openPrice}, #{item.closePrice}, #{item.highPrice}, #{item.lowPrice}, #{item.volume}, #{item.turnover},
|
|
|
|
#{item.freeCirculationCap}, #{item.priceChangeRate}, #{item.peTtm}, #{item.peTtmMedian}, NOW())
|
|
|
|
#{item.totalMarketCap}, #{item.freeCirculationCap}, #{item.priceChangeRate}, #{item.amplitude},
|
|
|
|
|
|
|
|
#{item.turnoverRate}, #{item.equalWeightAvgChangeRate}, #{item.peTtm}, #{item.peTtmMedian},
|
|
|
|
|
|
|
|
#{item.upCount}, #{item.downCount}, #{item.limitUpCount}, #{item.limitDownCount}, #{item.noChangeCount},
|
|
|
|
|
|
|
|
#{item.suspendCount}, #{item.newHighFlag}, #{item.newLowFlag}, NOW())
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
|
</insert>
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="batchUpsertIndustryIndex" parameterType="java.util.List">
|
|
|
|
<insert id="batchUpsertIndustryIndex" parameterType="java.util.List">
|
|
|
|
insert into t_industry_index(industry_index_code, industry_index_name, component_count, trade_date,
|
|
|
|
insert into t_industry_index(industry_index_code, industry_index_name, component_count, trade_date,
|
|
|
|
open_price, close_price, volume, turnover, total_market_cap,
|
|
|
|
open_price, close_price, high_price, low_price, volume, turnover,
|
|
|
|
free_circulation_cap, price_change_rate, pe_ttm, pe_ttm_median, create_time)
|
|
|
|
total_market_cap, free_circulation_cap, price_change_rate, amplitude,
|
|
|
|
|
|
|
|
turnover_rate, equal_weight_avg_change_rate, pe_ttm, pe_ttm_median,
|
|
|
|
|
|
|
|
up_count, down_count, limit_up_count, limit_down_count, no_change_count,
|
|
|
|
|
|
|
|
suspend_count, new_high_flag, new_low_flag, create_time)
|
|
|
|
values
|
|
|
|
values
|
|
|
|
<foreach collection="list" item="item" separator=",">
|
|
|
|
<foreach collection="list" item="item" separator=",">
|
|
|
|
(#{item.industryIndexCode}, #{item.industryIndexName}, #{item.componentCount}, #{item.tradeDate},
|
|
|
|
(#{item.industryIndexCode}, #{item.industryIndexName}, #{item.componentCount}, #{item.tradeDate},
|
|
|
|
#{item.openPrice}, #{item.closePrice}, #{item.volume}, #{item.turnover}, #{item.totalMarketCap},
|
|
|
|
#{item.openPrice}, #{item.closePrice}, #{item.highPrice}, #{item.lowPrice}, #{item.volume}, #{item.turnover},
|
|
|
|
#{item.freeCirculationCap}, #{item.priceChangeRate}, #{item.peTtm}, #{item.peTtmMedian}, NOW())
|
|
|
|
#{item.totalMarketCap}, #{item.freeCirculationCap}, #{item.priceChangeRate}, #{item.amplitude},
|
|
|
|
|
|
|
|
#{item.turnoverRate}, #{item.equalWeightAvgChangeRate}, #{item.peTtm}, #{item.peTtmMedian},
|
|
|
|
|
|
|
|
#{item.upCount}, #{item.downCount}, #{item.limitUpCount}, #{item.limitDownCount}, #{item.noChangeCount},
|
|
|
|
|
|
|
|
#{item.suspendCount}, #{item.newHighFlag}, #{item.newLowFlag}, NOW())
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
|
ON DUPLICATE KEY UPDATE
|
|
|
|
ON DUPLICATE KEY UPDATE
|
|
|
|
industry_index_name = VALUES(industry_index_name),
|
|
|
|
industry_index_name = VALUES(industry_index_name),
|
|
|
|
component_count = VALUES(component_count),
|
|
|
|
component_count = VALUES(component_count),
|
|
|
|
open_price = VALUES(open_price),
|
|
|
|
open_price = VALUES(open_price),
|
|
|
|
close_price = VALUES(close_price),
|
|
|
|
close_price = VALUES(close_price),
|
|
|
|
|
|
|
|
high_price = VALUES(high_price),
|
|
|
|
|
|
|
|
low_price = VALUES(low_price),
|
|
|
|
volume = VALUES(volume),
|
|
|
|
volume = VALUES(volume),
|
|
|
|
turnover = VALUES(turnover),
|
|
|
|
turnover = VALUES(turnover),
|
|
|
|
total_market_cap = VALUES(total_market_cap),
|
|
|
|
total_market_cap = VALUES(total_market_cap),
|
|
|
|
free_circulation_cap = VALUES(free_circulation_cap),
|
|
|
|
free_circulation_cap = VALUES(free_circulation_cap),
|
|
|
|
price_change_rate = VALUES(price_change_rate),
|
|
|
|
price_change_rate = VALUES(price_change_rate),
|
|
|
|
|
|
|
|
amplitude = VALUES(amplitude),
|
|
|
|
|
|
|
|
turnover_rate = VALUES(turnover_rate),
|
|
|
|
|
|
|
|
equal_weight_avg_change_rate = VALUES(equal_weight_avg_change_rate),
|
|
|
|
pe_ttm = VALUES(pe_ttm),
|
|
|
|
pe_ttm = VALUES(pe_ttm),
|
|
|
|
pe_ttm_median = VALUES(pe_ttm_median),
|
|
|
|
pe_ttm_median = VALUES(pe_ttm_median),
|
|
|
|
|
|
|
|
up_count = VALUES(up_count),
|
|
|
|
|
|
|
|
down_count = VALUES(down_count),
|
|
|
|
|
|
|
|
limit_up_count = VALUES(limit_up_count),
|
|
|
|
|
|
|
|
limit_down_count = VALUES(limit_down_count),
|
|
|
|
|
|
|
|
no_change_count = VALUES(no_change_count),
|
|
|
|
|
|
|
|
suspend_count = VALUES(suspend_count),
|
|
|
|
|
|
|
|
new_high_flag = VALUES(new_high_flag),
|
|
|
|
|
|
|
|
new_low_flag = VALUES(new_low_flag),
|
|
|
|
update_time = NOW()
|
|
|
|
update_time = NOW()
|
|
|
|
</insert>
|
|
|
|
</insert>
|
|
|
|
</mapper>
|
|
|
|
</mapper>
|
|
|
|
|