feat:股票数据拉取发送消息
This commit is contained in:
@@ -151,6 +151,14 @@
|
||||
DELETE FROM stock_gnshyx_record_data
|
||||
WHERE id = #{id}
|
||||
</delete>
|
||||
<select id="getList" resultMap="BaseResultMap">
|
||||
select <include refid="Base_Column_List"/>
|
||||
from stock_gnshyx_record_data where 1=1
|
||||
</select>
|
||||
<select id="getByStockCode" resultMap="BaseResultMap">
|
||||
select <include refid="Base_Column_List"/>
|
||||
from stock_gnshyx_record_data where stock_code = #{stockCode}
|
||||
</select>
|
||||
|
||||
<update id="update" parameterType="com.xiang.xservice.stock.gnshyx.entity.StockGnshyxRecordDataDO">
|
||||
UPDATE stock_gnshyx_record_data
|
||||
|
||||
@@ -0,0 +1,126 @@
|
||||
<?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.data.mapper.StockSinaDataRecordPullMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.xiang.xservice.stock.data.entity.StockSinaDataRecordDO" >
|
||||
<result column="id" property="id" />
|
||||
<result column="name" property="name" />
|
||||
<result column="jk_price" property="jkPrice" />
|
||||
<result column="zs_price" property="zsPrice" />
|
||||
<result column="xj_price" property="xjPrice" />
|
||||
<result column="zg_price" property="zgPrice" />
|
||||
<result column="zd_price" property="zdPrice" />
|
||||
<result column="zs_num" property="zsNum" />
|
||||
<result column="price" property="price" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,
|
||||
name,
|
||||
jk_price,
|
||||
zs_price,
|
||||
xj_price,
|
||||
zg_price,
|
||||
zd_price,
|
||||
zs_num,
|
||||
price,
|
||||
update_time
|
||||
</sql>
|
||||
|
||||
<insert id="insert" useGeneratedKeys="true" keyColumn="id" keyProperty="id" parameterType="com.xiang.xservice.stock.data.entity.StockSinaDataRecordDO">
|
||||
INSERT INTO stock_sina_record_data
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="null != name and '' != name">
|
||||
name,
|
||||
</if>
|
||||
<if test="null != jkPrice ">
|
||||
jk_price,
|
||||
</if>
|
||||
<if test="null != zsPrice ">
|
||||
zs_price,
|
||||
</if>
|
||||
<if test="null != xjPrice ">
|
||||
xj_price,
|
||||
</if>
|
||||
<if test="null != zgPrice ">
|
||||
zg_price,
|
||||
</if>
|
||||
<if test="null != zdPrice ">
|
||||
zd_price,
|
||||
</if>
|
||||
<if test="null != zsNum and '' != zsNum">
|
||||
zs_num,
|
||||
</if>
|
||||
<if test="null != price ">
|
||||
price,
|
||||
</if>
|
||||
<if test="null != updateTime ">
|
||||
update_time
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="null != name and '' != name">
|
||||
#{name},
|
||||
</if>
|
||||
<if test="null != jkPrice ">
|
||||
#{jkPrice},
|
||||
</if>
|
||||
<if test="null != zsPrice ">
|
||||
#{zsPrice},
|
||||
</if>
|
||||
<if test="null != xjPrice ">
|
||||
#{xjPrice},
|
||||
</if>
|
||||
<if test="null != zgPrice ">
|
||||
#{zgPrice},
|
||||
</if>
|
||||
<if test="null != zdPrice ">
|
||||
#{zdPrice},
|
||||
</if>
|
||||
<if test="null != zsNum and '' != zsNum">
|
||||
#{zsNum},
|
||||
</if>
|
||||
<if test="null != price ">
|
||||
#{price},
|
||||
</if>
|
||||
<if test="null != updateTime ">
|
||||
#{updateTime}
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<insert id="batchInsert">
|
||||
INSERT INTO stock_sina_record_data
|
||||
(name, jk_price, zs_price, xj_price, zg_price, zd_price, zs_num, price, update_time)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.name}, #{item.jkPrice}, #{item.zsPrice}, #{item.xjPrice},
|
||||
#{item.zgPrice}, #{item.zdPrice}, #{item.zsNum}, #{item.price}, #{item.updateTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<delete id="delete" >
|
||||
DELETE FROM stock_sina_record_data
|
||||
WHERE id = #{id}
|
||||
</delete>
|
||||
|
||||
<update id="update" parameterType="com.xiang.xservice.stock.data.entity.StockSinaDataRecordDO">
|
||||
UPDATE stock_sina_record_data
|
||||
<set>
|
||||
<if test="null != name and '' != name">name = #{name},</if>
|
||||
<if test="null != jkPrice ">jk_price = #{jkPrice},</if>
|
||||
<if test="null != zsPrice ">zs_price = #{zsPrice},</if>
|
||||
<if test="null != xjPrice ">xj_price = #{xjPrice},</if>
|
||||
<if test="null != zgPrice ">zg_price = #{zgPrice},</if>
|
||||
<if test="null != zdPrice ">zd_price = #{zdPrice},</if>
|
||||
<if test="null != zsNum and '' != zsNum">zs_num = #{zsNum},</if>
|
||||
<if test="null != price ">price = #{price},</if>
|
||||
<if test="null != updateTime ">update_time = #{updateTime}</if>
|
||||
</set>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user