feat: 智聪记账管理,投资管理,新增交易所、股票基础信息、期货标准合约、期货基本合约功能。

This commit is contained in:
tianyongbao
2025-03-28 16:24:10 +08:00
parent c6d53199f8
commit 1de8b59ff4
32 changed files with 2737 additions and 0 deletions

View File

@@ -0,0 +1,165 @@
<?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.intc.invest.mapper.FutureBaseInforMapper">
<resultMap type="FutureBaseInforVo" id="FutureBaseInforResult">
<result property="id" column="id" />
<result property="name" column="name" />
<result property="code" column="code" />
<result property="standardId" column="standard_id" />
<result property="standardName" column="standard_name" />
<result property="exchangeName" column="exchange_name" />
<result property="tradingTimeName" column="trading_time" />
<result property="referencePrice" column="reference_price" />
<result property="tradingMultiplier" column="trading_multiplier" />
<result property="priceLimit" column="price_limit" />
<result property="deliveryMonth" column="delivery_month" />
<result property="marginRatio" column="margin_ratio" />
<result property="lastTradingDay" column="last_trading_day" />
<result property="deliveryDate" column="delivery_date" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="delFlag" column="del_flag" />
<result property="remark" column="remark" />
<result property="listingDate" column="listing_date" />
</resultMap>
<sql id="selectFutureBaseInforVo">
select
a.id,
a.name,
a.code,
a.standard_id,
a.reference_price,
a.trading_multiplier,
a.price_limit,
a.delivery_month,
a.margin_ratio,
a.last_trading_day,
a.delivery_date,
a.create_by,
a.create_time,
a.update_by,
a.update_time,
a.del_flag,
a.remark,
a.listing_date,
ie."name" as exchange_name,
ifsi."name" as standard_name,
ifsi.trading_time
from
invest_future_base_infor a
left join invest_future_standard_infor ifsi on ifsi.id =a.standard_id
left join invest_exchange ie on ie.id =ifsi.exchange_id
</sql>
<select id="selectFutureBaseInforList" parameterType="FutureBaseInforDto" resultMap="FutureBaseInforResult">
<include refid="selectFutureBaseInforVo"/>
<where>
a.del_flag='0'
<if test="name != null and name != ''"> and a.name like '%'|| #{name}||'%'</if>
<if test="code != null and code != ''"> and a.code = #{code}</if>
<if test="standardId != null "> and a.standard_id = #{standardId}</if>
</where>
order by a.create_time desc
</select>
<select id="selectFutureBaseInforById" parameterType="Long" resultMap="FutureBaseInforResult">
<include refid="selectFutureBaseInforVo"/>
where a.id = #{id}
</select>
<insert id="insertFutureBaseInfor" parameterType="FutureBaseInfor">
insert into invest_future_base_infor
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="name != null">name,</if>
<if test="code != null">code,</if>
<if test="standardId != null">standard_id,</if>
<if test="referencePrice != null">reference_price,</if>
<if test="tradingMultiplier != null">trading_multiplier,</if>
<if test="priceLimit != null">price_limit,</if>
<if test="deliveryMonth != null">delivery_month,</if>
<if test="marginRatio != null">margin_ratio,</if>
<if test="lastTradingDay != null">last_trading_day,</if>
<if test="deliveryDate != null">delivery_date,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="delFlag != null">del_flag,</if>
<if test="remark != null">remark,</if>
<if test="listingDate != null">listing_date,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="name != null">#{name},</if>
<if test="code != null">#{code},</if>
<if test="standardId != null">#{standardId},</if>
<if test="referencePrice != null">#{referencePrice},</if>
<if test="tradingMultiplier != null">#{tradingMultiplier},</if>
<if test="priceLimit != null">#{priceLimit},</if>
<if test="deliveryMonth != null">#{deliveryMonth},</if>
<if test="marginRatio != null">#{marginRatio},</if>
<if test="lastTradingDay != null">#{lastTradingDay},</if>
<if test="deliveryDate != null">#{deliveryDate},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="remark != null">#{remark},</if>
<if test="listingDate != null">#{listingDate},</if>
</trim>
</insert>
<update id="updateFutureBaseInfor" parameterType="FutureBaseInfor">
update invest_future_base_infor
<trim prefix="SET" suffixOverrides=",">
<if test="name != null">name = #{name},</if>
<if test="code != null">code = #{code},</if>
<if test="standardId != null">standard_id = #{standardId},</if>
<if test="referencePrice != null">reference_price = #{referencePrice},</if>
<if test="tradingMultiplier != null">trading_multiplier = #{tradingMultiplier},</if>
<if test="priceLimit != null">price_limit = #{priceLimit},</if>
<if test="deliveryMonth != null">delivery_month = #{deliveryMonth},</if>
<if test="marginRatio != null">margin_ratio = #{marginRatio},</if>
<if test="lastTradingDay != null">last_trading_day = #{lastTradingDay},</if>
<if test="deliveryDate != null">delivery_date = #{deliveryDate},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="listingDate != null">listing_date = #{listingDate},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteFutureBaseInforById" parameterType="Long">
delete from invest_future_base_infor where id = #{id}
</delete>
<delete id="deleteFutureBaseInforByIds" parameterType="String">
delete from invest_future_base_infor where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<update id="removeFutureBaseInforById" parameterType="Long">
update invest_future_base_infor set del_flag='1' where id = #{id}
</update>
<update id="removeFutureBaseInforByIds" parameterType="String">
update invest_future_base_infor set del_flag='1' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</update>
</mapper>

View File

@@ -0,0 +1,181 @@
<?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.intc.invest.mapper.FutureStandardInforMapper">
<resultMap type="FutureStandardInforVo" id="FutureStandardInforResult">
<result property="id" column="id" />
<result property="name" column="name" />
<result property="type" column="type" />
<result property="code" column="code" />
<result property="exchangeId" column="exchange_id" />
<result property="exchangeName" column="exchange_name" />
<result property="tradingUnit" column="trading_unit" />
<result property="minimumPriceFluctuation" column="minimum_price_fluctuation" />
<result property="tradingTime" column="trading_time" />
<result property="priceLimit" column="price_limit" />
<result property="deliveryMonth" column="delivery_month" />
<result property="deliveryMethod" column="delivery_method" />
<result property="deliveryLocation" column="delivery_location" />
<result property="marginRatio" column="margin_ratio" />
<result property="pricingUnit" column="pricing_unit" />
<result property="lastTradingDay" column="last_trading_day" />
<result property="deliveryDate" column="delivery_date" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="delFlag" column="del_flag" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectFutureStandardInforVo">
select
a.id,
a.name,
a.type,
a.code,
a.exchange_id,
a.trading_unit,
a.minimum_price_fluctuation,
a.trading_time,
a.price_limit,
a.delivery_month,
a.delivery_method,
a.delivery_location,
a.margin_ratio,
a.pricing_unit,
a.last_trading_day,
a.delivery_date,
a.create_by,
a.create_time,
a.update_by,
a.update_time,
a.del_flag,
a.remark,
ie."name" as exchange_name
from
invest_future_standard_infor a
left join invest_exchange ie on ie.id =a.exchange_id
</sql>
<select id="selectFutureStandardInforList" parameterType="FutureStandardInforDto" resultMap="FutureStandardInforResult">
<include refid="selectFutureStandardInforVo"/>
<where>
a.del_flag='0'
<if test="name != null and name != ''"> and a.name like '%'|| #{name}||'%'</if>
<if test="type != null and type != ''"> and a.type = #{type}</if>
<if test="code != null and code != ''"> and a.code = #{code}</if>
<if test="exchangeId != null "> and a.exchange_id = #{exchangeId}</if>
</where>
order by a.create_time desc
</select>
<select id="selectFutureStandardInforById" parameterType="Long" resultMap="FutureStandardInforResult">
<include refid="selectFutureStandardInforVo"/>
where a.id = #{id}
</select>
<insert id="insertFutureStandardInfor" parameterType="FutureStandardInfor">
insert into invest_future_standard_infor
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="name != null and name != ''">name,</if>
<if test="type != null and type != ''">type,</if>
<if test="code != null and code != ''">code,</if>
<if test="exchangeId != null">exchange_id,</if>
<if test="tradingUnit != null">trading_unit,</if>
<if test="minimumPriceFluctuation != null">minimum_price_fluctuation,</if>
<if test="tradingTime != null">trading_time,</if>
<if test="priceLimit != null">price_limit,</if>
<if test="deliveryMonth != null">delivery_month,</if>
<if test="deliveryMethod != null">delivery_method,</if>
<if test="deliveryLocation != null">delivery_location,</if>
<if test="marginRatio != null">margin_ratio,</if>
<if test="pricingUnit != null">pricing_unit,</if>
<if test="lastTradingDay != null">last_trading_day,</if>
<if test="deliveryDate != null">delivery_date,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="delFlag != null">del_flag,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="name != null and name != ''">#{name},</if>
<if test="type != null and type != ''">#{type},</if>
<if test="code != null and code != ''">#{code},</if>
<if test="exchangeId != null">#{exchangeId},</if>
<if test="tradingUnit != null">#{tradingUnit},</if>
<if test="minimumPriceFluctuation != null">#{minimumPriceFluctuation},</if>
<if test="tradingTime != null">#{tradingTime},</if>
<if test="priceLimit != null">#{priceLimit},</if>
<if test="deliveryMonth != null">#{deliveryMonth},</if>
<if test="deliveryMethod != null">#{deliveryMethod},</if>
<if test="deliveryLocation != null">#{deliveryLocation},</if>
<if test="marginRatio != null">#{marginRatio},</if>
<if test="pricingUnit != null">#{pricingUnit},</if>
<if test="lastTradingDay != null">#{lastTradingDay},</if>
<if test="deliveryDate != null">#{deliveryDate},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateFutureStandardInfor" parameterType="FutureStandardInfor">
update invest_future_standard_infor
<trim prefix="SET" suffixOverrides=",">
<if test="name != null and name != ''">name = #{name},</if>
<if test="type != null and type != ''">type = #{type},</if>
<if test="code != null and code != ''">code = #{code},</if>
<if test="exchangeId != null">exchange_id = #{exchangeId},</if>
<if test="tradingUnit != null">trading_unit = #{tradingUnit},</if>
<if test="minimumPriceFluctuation != null">minimum_price_fluctuation = #{minimumPriceFluctuation},</if>
<if test="tradingTime != null">trading_time = #{tradingTime},</if>
<if test="priceLimit != null">price_limit = #{priceLimit},</if>
<if test="deliveryMonth != null">delivery_month = #{deliveryMonth},</if>
<if test="deliveryMethod != null">delivery_method = #{deliveryMethod},</if>
<if test="deliveryLocation != null">delivery_location = #{deliveryLocation},</if>
<if test="marginRatio != null">margin_ratio = #{marginRatio},</if>
<if test="pricingUnit != null">pricing_unit = #{pricingUnit},</if>
<if test="lastTradingDay != null">last_trading_day = #{lastTradingDay},</if>
<if test="deliveryDate != null">delivery_date = #{deliveryDate},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteFutureStandardInforById" parameterType="Long">
delete from invest_future_standard_infor where id = #{id}
</delete>
<delete id="deleteFutureStandardInforByIds" parameterType="String">
delete from invest_future_standard_infor where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<update id="removeFutureStandardInforById" parameterType="Long">
update invest_future_standard_infor set del_flag='1' where id = #{id}
</update>
<update id="removeFutureStandardInforByIds" parameterType="String">
update invest_future_standard_infor set del_flag='1' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</update>
</mapper>

View File

@@ -0,0 +1,116 @@
<?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.intc.invest.mapper.InvestExchangeMapper">
<resultMap type="InvestExchangeVo" id="InvestExchangeResult">
<result property="id" column="id" />
<result property="name" column="name" />
<result property="type" column="type" />
<result property="code" column="code" />
<result property="shortName" column="short_name" />
<result property="foundingTime" column="founding_time" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="delFlag" column="del_flag" />
<result property="remark" column="remark" />
<result property="introduce" column="introduce" />
</resultMap>
<sql id="selectInvestExchangeVo">
select a.id, a.name, a.type, a.code, a.short_name, a.founding_time, a.create_by, a.create_time, a.update_by, a.update_time, a.del_flag, a.remark, a.introduce from invest_exchange a
</sql>
<select id="selectInvestExchangeList" parameterType="InvestExchangeDto" resultMap="InvestExchangeResult">
<include refid="selectInvestExchangeVo"/>
<where>
a.del_flag='0'
<if test="name != null and name != ''"> and (a.name like '%'|| #{name}||'%' or a.short_name like '%'|| #{name}||'%')</if>
<if test="type != null and type != ''"> and a.type = #{type}</if>
<if test="code != null and code != ''"> and a.code like '%'|| #{code}||'%'</if>
</where>
order by a.create_time desc
</select>
<select id="selectInvestExchangeById" parameterType="Long" resultMap="InvestExchangeResult">
<include refid="selectInvestExchangeVo"/>
where a.id = #{id}
</select>
<insert id="insertInvestExchange" parameterType="InvestExchange">
insert into invest_exchange
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="name != null and name != ''">name,</if>
<if test="type != null and type != ''">type,</if>
<if test="code != null and code != ''">code,</if>
<if test="shortName != null and shortName != ''">short_name,</if>
<if test="foundingTime != null">founding_time,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="delFlag != null">del_flag,</if>
<if test="remark != null">remark,</if>
<if test="introduce != null">introduce,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="name != null and name != ''">#{name},</if>
<if test="type != null and type != ''">#{type},</if>
<if test="code != null and code != ''">#{code},</if>
<if test="shortName != null and shortName != ''">#{shortName},</if>
<if test="foundingTime != null">#{foundingTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="remark != null">#{remark},</if>
<if test="introduce != null">#{introduce},</if>
</trim>
</insert>
<update id="updateInvestExchange" parameterType="InvestExchange">
update invest_exchange
<trim prefix="SET" suffixOverrides=",">
<if test="name != null and name != ''">name = #{name},</if>
<if test="type != null and type != ''">type = #{type},</if>
<if test="code != null and code != ''">code = #{code},</if>
<if test="shortName != null and shortName != ''">short_name = #{shortName},</if>
<if test="foundingTime != null">founding_time = #{foundingTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="introduce != null">introduce = #{introduce},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteInvestExchangeById" parameterType="Long">
delete from invest_exchange where id = #{id}
</delete>
<delete id="deleteInvestExchangeByIds" parameterType="String">
delete from invest_exchange where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<update id="removeInvestExchangeById" parameterType="Long">
update invest_exchange set del_flag='1' where id = #{id}
</update>
<update id="removeInvestExchangeByIds" parameterType="String">
update invest_exchange set del_flag='1' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</update>
</mapper>

View File

@@ -0,0 +1,158 @@
<?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.intc.invest.mapper.StockBaseInforMapper">
<resultMap type="StockBaseInforVo" id="StockBaseInforResult">
<result property="id" column="id" />
<result property="name" column="name" />
<result property="type" column="type" />
<result property="code" column="code" />
<result property="exchangeId" column="exchange_id" />
<result property="industryClassification" column="industry_classification" />
<result property="mainBusiness" column="main_business" />
<result property="listingDate" column="listing_date" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="delFlag" column="del_flag" />
<result property="remark" column="remark" />
<result property="introduce" column="introduce" />
<result property="region" column="region" />
<result property="shortName" column="short_name" />
<result property="exchangeName" column="exchange_name" />
</resultMap>
<sql id="selectStockBaseInforVo">
select
a.id,
a.name,
a.type,
a.code,
a.exchange_id,
a.industry_classification,
a.main_business,
a.listing_date,
a.create_by,
a.create_time,
a.update_by,
a.update_time,
a.del_flag,
a.remark,
a.introduce,
a.region,
a.short_name,
ie."name" as exchange_name
from
invest_stock_base_infor a
left join invest_exchange ie on
ie.id = a.exchange_id
</sql>
<select id="selectStockBaseInforList" parameterType="StockBaseInforDto" resultMap="StockBaseInforResult">
<include refid="selectStockBaseInforVo"/>
<where>
a.del_flag='0'
<if test="name != null and name != ''"> and (a.name like '%'|| #{name}||'%' or a.short_name like '%'|| #{name}||'%')</if>
<if test="type != null and type != ''"> and a.type = #{type}</if>
<if test="code != null and code != ''"> and a.code like '%'|| #{code}||'%'</if>
<if test="exchangeId != null "> and a.exchange_id = #{exchangeId}</if>
<if test="industryClassification != null and industryClassification != ''"> and a.industry_classification = #{industryClassification}</if>
<if test="shortName != null and shortName != ''"> and a.short_name like '%'|| #{shortName}||'%'</if>
</where>
order by a.create_time desc
</select>
<select id="selectStockBaseInforById" parameterType="Long" resultMap="StockBaseInforResult">
<include refid="selectStockBaseInforVo"/>
where a.id = #{id}
</select>
<insert id="insertStockBaseInfor" parameterType="StockBaseInfor">
insert into invest_stock_base_infor
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="name != null and name != ''">name,</if>
<if test="type != null">type,</if>
<if test="code != null and code != ''">code,</if>
<if test="exchangeId != null">exchange_id,</if>
<if test="industryClassification != null">industry_classification,</if>
<if test="mainBusiness != null">main_business,</if>
<if test="listingDate != null ">listing_date,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="delFlag != null">del_flag,</if>
<if test="remark != null">remark,</if>
<if test="introduce != null">introduce,</if>
<if test="region != null">region,</if>
<if test="shortName != null and shortName != ''">short_name,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="name != null and name != ''">#{name},</if>
<if test="type != null">#{type},</if>
<if test="code != null and code != ''">#{code},</if>
<if test="exchangeId != null">#{exchangeId},</if>
<if test="industryClassification != null">#{industryClassification},</if>
<if test="mainBusiness != null">#{mainBusiness},</if>
<if test="listingDate != null ">#{listingDate},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="remark != null">#{remark},</if>
<if test="introduce != null">#{introduce},</if>
<if test="region != null">#{region},</if>
<if test="shortName != null and shortName != ''">#{shortName},</if>
</trim>
</insert>
<update id="updateStockBaseInfor" parameterType="StockBaseInfor">
update invest_stock_base_infor
<trim prefix="SET" suffixOverrides=",">
<if test="name != null and name != ''">name = #{name},</if>
<if test="type != null">type = #{type},</if>
<if test="code != null and code != ''">code = #{code},</if>
<if test="exchangeId != null">exchange_id = #{exchangeId},</if>
<if test="industryClassification != null">industry_classification = #{industryClassification},</if>
<if test="mainBusiness != null">main_business = #{mainBusiness},</if>
<if test="listingDate != null ">listing_date = #{listingDate},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="introduce != null">introduce = #{introduce},</if>
<if test="region != null">region = #{region},</if>
<if test="shortName != null and shortName != ''">short_name = #{shortName},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteStockBaseInforById" parameterType="Long">
delete from invest_stock_base_infor where id = #{id}
</delete>
<delete id="deleteStockBaseInforByIds" parameterType="String">
delete from invest_stock_base_infor where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<update id="removeStockBaseInforById" parameterType="Long">
update invest_stock_base_infor set del_flag='1' where id = #{id}
</update>
<update id="removeStockBaseInforByIds" parameterType="String">
update invest_stock_base_infor set del_flag='1' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</update>
</mapper>