feat:gnshyx数据拉取

This commit is contained in:
xiang
2025-09-17 21:49:06 +08:00
parent 7c2e648831
commit e00916399d
16 changed files with 480 additions and 7 deletions

View File

@@ -0,0 +1,175 @@
<?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.xiang.xservice.stock.gnshyx.mapper.StockGnshyxRecordDataMapper">
<resultMap id="BaseResultMap" type="com.xiang.xservice.stock.gnshyx.entity.StockGnshyxRecordDataDO" >
<result column="id" property="id" />
<result column="symbol_name" property="symbolName" />
<result column="stock_name" property="stockName" />
<result column="attention_price" property="attentionPrice" />
<result column="target_price_low" property="targetPriceLow" />
<result column="target_price_high" property="targetPriceHigh" />
<result column="stop_price" property="stopPrice" />
<result column="stock_daily_selection_id" property="stockDailySelectionId" />
<result column="stock_code" property="stockCode" />
<result column="selection_time" property="selectionTime" />
<result column="maximum_increase" property="maximumIncrease" />
<result column="maximum_increase_seven" property="maximumIncreaseSeven" />
<result column="create_time" property="createTime" />
</resultMap>
<sql id="Base_Column_List">
id,
symbol_name,
stock_name,
attention_price,
target_price_low,
target_price_high,
stop_price,
stock_daily_selection_id,
stock_code,
selection_time,
maximum_increase,
maximum_increase_seven,
create_time
</sql>
<insert id="insert" useGeneratedKeys="true" keyColumn="id" keyProperty="id" parameterType="com.xiang.xservice.stock.gnshyx.entity.StockGnshyxRecordDataDO">
INSERT INTO stock_gnshyx_record_data
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="null != symbolName and '' != symbolName">
symbol_name,
</if>
<if test="null != stockName and '' != stockName">
stock_name,
</if>
<if test="null != attentionPrice ">
attention_price,
</if>
<if test="null != targetPriceLow ">
target_price_low,
</if>
<if test="null != targetPriceHigh ">
target_price_high,
</if>
<if test="null != stopPrice ">
stop_price,
</if>
<if test="null != stockDailySelectionId ">
stock_daily_selection_id,
</if>
<if test="null != stockCode and '' != stockCode">
stock_code,
</if>
<if test="null != selectionTime ">
selection_time,
</if>
<if test="null != maximumIncrease and '' != maximumIncrease">
maximum_increase,
</if>
<if test="null != maximumIncreaseSeven and '' != maximumIncreaseSeven">
maximum_increase_seven,
</if>
<if test="null != createTime ">
create_time
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="null != symbolName and '' != symbolName">
#{symbolName},
</if>
<if test="null != stockName and '' != stockName">
#{stockName},
</if>
<if test="null != attentionPrice ">
#{attentionPrice},
</if>
<if test="null != targetPriceLow ">
#{targetPriceLow},
</if>
<if test="null != targetPriceHigh ">
#{targetPriceHigh},
</if>
<if test="null != stopPrice ">
#{stopPrice},
</if>
<if test="null != stockDailySelectionId ">
#{stockDailySelectionId},
</if>
<if test="null != stockCode and '' != stockCode">
#{stockCode},
</if>
<if test="null != selectionTime ">
#{selectionTime},
</if>
<if test="null != maximumIncrease and '' != maximumIncrease">
#{maximumIncrease},
</if>
<if test="null != maximumIncreaseSeven and '' != maximumIncreaseSeven">
#{maximumIncreaseSeven},
</if>
<if test="null != createTime ">
#{createTime}
</if>
</trim>
</insert>
<insert id="batchInsertRecord">
insert into stock_gnshyx_record_data(symbol_name,
stock_name,
attention_price,
target_price_low,
target_price_high,
stop_price,
stock_daily_selection_id,
stock_code,
selection_time,
maximum_increase,
maximum_increase_seven,
create_time)
values
<foreach collection="list" item="item" separator=",">
(
#{item.symbolName},
#{item.stockName},
#{item.attentionPrice},
#{item.targetPriceLow},
#{item.targetPriceHigh},
#{item.stopPrice},
#{item.stockDailySelectionId},
#{item.stockCode},
#{item.selectionTime},
#{item.maximumIncrease},
#{item.maximumIncreaseSeven},
#{item.createTime}
)
</foreach>
</insert>
<delete id="delete" >
DELETE FROM stock_gnshyx_record_data
WHERE id = #{id}
</delete>
<update id="update" parameterType="com.xiang.xservice.stock.gnshyx.entity.StockGnshyxRecordDataDO">
UPDATE stock_gnshyx_record_data
<set>
<if test="null != symbolName and '' != symbolName">symbol_name = #{symbolName},</if>
<if test="null != stockName and '' != stockName">stock_name = #{stockName},</if>
<if test="null != attentionPrice ">attention_price = #{attentionPrice},</if>
<if test="null != targetPriceLow ">target_price_low = #{targetPriceLow},</if>
<if test="null != targetPriceHigh ">target_price_high = #{targetPriceHigh},</if>
<if test="null != stopPrice ">stop_price = #{stopPrice},</if>
<if test="null != stockDailySelectionId ">stock_daily_selection_id = #{stockDailySelectionId},</if>
<if test="null != stockCode and '' != stockCode">stock_code = #{stockCode},</if>
<if test="null != selectionTime ">selection_time = #{selectionTime},</if>
<if test="null != maximumIncrease and '' != maximumIncrease">maximum_increase = #{maximumIncrease},</if>
<if test="null != maximumIncreaseSeven and '' != maximumIncreaseSeven">maximum_increase_seven = #{maximumIncreaseSeven},</if>
<if test="null != createTime ">create_time = #{createTime}</if>
</set>
WHERE id = #{id}
</update>
</mapper>