|
|
|
|
@ -8,8 +8,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<id property="id" column="id" />
|
|
|
|
|
<result property="tradeDate" column="trade_date" />
|
|
|
|
|
<result property="industryName" column="industry_name" />
|
|
|
|
|
<result property="eastmoneyIndustryCode" column="eastmoney_industry_code" />
|
|
|
|
|
<result property="eastmoneyIndustryName" column="eastmoney_industry_name" />
|
|
|
|
|
<result property="stocksCount" column="stocks_count" />
|
|
|
|
|
<result property="trendValue" column="trend_value" />
|
|
|
|
|
<result property="trendValueChange" column="trend_value_change" />
|
|
|
|
|
@ -21,7 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectTTrendsVo">
|
|
|
|
|
select id, trade_date, industry_name, eastmoney_industry_code, eastmoney_industry_name, stocks_count, trend_value, trend_value_change, rank, rank_change, momentum_type, create_time, update_time from t_trends
|
|
|
|
|
select id, trade_date, industry_name, stocks_count, trend_value, trend_value_change, `rank`, `rank_change`, momentum_type, create_time, update_time from t_trends
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectTTrendsById" parameterType="Long" resultMap="TTrendsResult">
|
|
|
|
|
@ -34,8 +32,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<where>
|
|
|
|
|
<if test="tradeDate != null ">and trade_date = #{tradeDate}</if>
|
|
|
|
|
<if test="industryName != null and industryName != ''">and industry_name = #{industryName}</if>
|
|
|
|
|
<if test="eastmoneyIndustryCode != null and eastmoneyIndustryCode != ''">and eastmoney_industry_code = #{eastmoneyIndustryCode}</if>
|
|
|
|
|
<if test="eastmoneyIndustryName != null and eastmoneyIndustryName != ''">and eastmoney_industry_name = #{eastmoneyIndustryName}</if>
|
|
|
|
|
<if test="stocksCount != null ">and stocks_count = #{stocksCount}</if>
|
|
|
|
|
<if test="trendValue != null ">and trend_value = #{trendValue}</if>
|
|
|
|
|
<if test="trendValueChange != null ">and trend_value_change = #{trendValueChange}</if>
|
|
|
|
|
@ -50,13 +46,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="tradeDate != null">trade_date,</if>
|
|
|
|
|
<if test="industryName != null and industryName != ''">industry_name,</if>
|
|
|
|
|
<if test="eastmoneyIndustryCode != null and eastmoneyIndustryCode != ''">eastmoney_industry_code,</if>
|
|
|
|
|
<if test="eastmoneyIndustryName != null and eastmoneyIndustryName != ''">eastmoney_industry_name,</if>
|
|
|
|
|
<if test="stocksCount != null">stocks_count,</if>
|
|
|
|
|
<if test="trendValue != null">trend_value,</if>
|
|
|
|
|
<if test="trendValueChange != null">trend_value_change,</if>
|
|
|
|
|
<if test="rank != null">rank,</if>
|
|
|
|
|
<if test="rankChange != null">rank_change,</if>
|
|
|
|
|
<if test="rank != null">`rank`,</if>
|
|
|
|
|
<if test="rankChange != null">`rank_change`,</if>
|
|
|
|
|
<if test="momentumType != null and momentumType != ''">momentum_type,</if>
|
|
|
|
|
<if test="createTime != null">create_time,</if>
|
|
|
|
|
<if test="updateTime != null">update_time,</if>
|
|
|
|
|
@ -64,8 +58,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="tradeDate != null">#{tradeDate},</if>
|
|
|
|
|
<if test="industryName != null and industryName != ''">#{industryName},</if>
|
|
|
|
|
<if test="eastmoneyIndustryCode != null and eastmoneyIndustryCode != ''">#{eastmoneyIndustryCode},</if>
|
|
|
|
|
<if test="eastmoneyIndustryName != null and eastmoneyIndustryName != ''">#{eastmoneyIndustryName},</if>
|
|
|
|
|
<if test="stocksCount != null">#{stocksCount},</if>
|
|
|
|
|
<if test="trendValue != null">#{trendValue},</if>
|
|
|
|
|
<if test="trendValueChange != null">#{trendValueChange},</if>
|
|
|
|
|
@ -82,13 +74,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
|
|
<if test="tradeDate != null">trade_date = #{tradeDate},</if>
|
|
|
|
|
<if test="industryName != null and industryName != ''">industry_name = #{industryName},</if>
|
|
|
|
|
<if test="eastmoneyIndustryCode != null and eastmoneyIndustryCode != ''">eastmoney_industry_code = #{eastmoneyIndustryCode},</if>
|
|
|
|
|
<if test="eastmoneyIndustryName != null and eastmoneyIndustryName != ''">eastmoney_industry_name = #{eastmoneyIndustryName},</if>
|
|
|
|
|
<if test="stocksCount != null">stocks_count = #{stocksCount},</if>
|
|
|
|
|
<if test="trendValue != null">trend_value = #{trendValue},</if>
|
|
|
|
|
<if test="trendValueChange != null">trend_value_change = #{trendValueChange},</if>
|
|
|
|
|
<if test="rank != null">rank = #{rank},</if>
|
|
|
|
|
<if test="rankChange != null">rank_change = #{rankChange},</if>
|
|
|
|
|
<if test="rank != null">`rank` = #{rank},</if>
|
|
|
|
|
<if test="rankChange != null">`rank_change` = #{rankChange},</if>
|
|
|
|
|
<if test="momentumType != null and momentumType != ''">momentum_type = #{momentumType},</if>
|
|
|
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
@ -110,13 +100,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
INSERT INTO t_trends (
|
|
|
|
|
trade_date,
|
|
|
|
|
industry_name,
|
|
|
|
|
eastmoney_industry_code,
|
|
|
|
|
eastmoney_industry_name,
|
|
|
|
|
stocks_count,
|
|
|
|
|
trend_value,
|
|
|
|
|
trend_value_change,
|
|
|
|
|
rank,
|
|
|
|
|
rank_change,
|
|
|
|
|
`rank`,
|
|
|
|
|
`rank_change`,
|
|
|
|
|
momentum_type,
|
|
|
|
|
create_time,
|
|
|
|
|
update_time
|
|
|
|
|
@ -125,8 +113,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
(
|
|
|
|
|
#{item.tradeDate},
|
|
|
|
|
#{item.industryName},
|
|
|
|
|
#{item.eastmoneyIndustryCode},
|
|
|
|
|
#{item.eastmoneyIndustryName},
|
|
|
|
|
#{item.stocksCount},
|
|
|
|
|
#{item.trendValue},
|
|
|
|
|
#{item.trendValueChange},
|
|
|
|
|
@ -141,9 +127,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
stocks_count = VALUES(stocks_count),
|
|
|
|
|
trend_value = VALUES(trend_value),
|
|
|
|
|
trend_value_change = VALUES(trend_value_change),
|
|
|
|
|
rank = VALUES(rank),
|
|
|
|
|
rank_change = VALUES(rank_change),
|
|
|
|
|
eastmoney_industry_name = VALUES(eastmoney_industry_name),
|
|
|
|
|
`rank` = VALUES(`rank`),
|
|
|
|
|
`rank_change` = VALUES(`rank_change`),
|
|
|
|
|
update_time = VALUES(update_time)
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|