fix: 新行情数据调整到新的模块中,与老接口隔离开

dev_refactor_0118
Lxy 4 months ago
parent f2e36a3ecb
commit aef00b9b6e

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>ruoyi</artifactId>
<groupId>com.ruoyi</groupId>
<version>3.8.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>newstock-system</artifactId>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<!-- 通用工具-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-system</artifactId>
</dependency>
<!-- 通用工具-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common</artifactId>
</dependency>
</dependencies>
</project>

@ -1,12 +1,12 @@
package com.ruoyi.stocksystem.controller; package com.ruoyi.newstocksystem.controller;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.stocksystem.domain.NewStockBasic; import com.ruoyi.newstocksystem.domain.NewStockBasic;
import com.ruoyi.stocksystem.domain.NewStocks; import com.ruoyi.newstocksystem.domain.NewStocks;
import com.ruoyi.stocksystem.domain.service.INewStockBasicService; import com.ruoyi.newstocksystem.service.INewStockBasicService;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -21,7 +21,7 @@ import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.stocksystem.domain.service.INewStocksService; import com.ruoyi.newstocksystem.service.INewStocksService;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
@ -33,7 +33,7 @@ import org.springframework.web.multipart.MultipartFile;
* @date 2026-01-18 * @date 2026-01-18
*/ */
@RestController @RestController
@RequestMapping("/stocksystem/newstocks") @RequestMapping("/newstocksystem/newstocks")
public class NewStocksController extends BaseController public class NewStocksController extends BaseController
{ {
@Autowired @Autowired
@ -191,4 +191,4 @@ public class NewStocksController extends BaseController
List<NewStockBasic> list = newStockBasicService.selectNewStockBasicList(newStockBasic); List<NewStockBasic> list = newStockBasicService.selectNewStockBasicList(newStockBasic);
return AjaxResult.success(list); return AjaxResult.success(list);
} }
} }

@ -1,4 +1,4 @@
package com.ruoyi.stocksystem.domain; package com.ruoyi.newstocksystem.domain;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;

@ -1,4 +1,4 @@
package com.ruoyi.stocksystem.domain; package com.ruoyi.newstocksystem.domain;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;

@ -1,4 +1,4 @@
package com.ruoyi.stocksystem.domain; package com.ruoyi.newstocksystem.domain;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
@ -90,8 +90,8 @@ public class NewStocks extends BaseEntity
private String industryName; private String industryName;
@Excel(name = "行业级别", sort = 19, type = Excel.Type.ALL) @Excel(name = "行业级别", sort = 19, type = Excel.Type.ALL)
private Integer industryLevel; private Integer industryLevel;
@Excel(name = "所属东财行业指数代码\\n\" +\n" + @Excel(name = "所属东财行业指数代码\n" +
" \"[行业类别]2级\"", sort = 20, type = Excel.Type.ALL) "[行业类别]2级", sort = 20, type = Excel.Type.ALL)
private String industryCode; private String industryCode;
@Excel(name = "父行业代码", sort = 21, type = Excel.Type.ALL) @Excel(name = "父行业代码", sort = 21, type = Excel.Type.ALL)
private String parentCode; private String parentCode;

@ -1,6 +1,6 @@
package com.ruoyi.stocksystem.mapper; package com.ruoyi.newstocksystem.mapper;
import com.ruoyi.stocksystem.domain.NewStockBasic; import com.ruoyi.newstocksystem.domain.NewStockBasic;
import java.util.List; import java.util.List;

@ -1,6 +1,6 @@
package com.ruoyi.stocksystem.mapper; package com.ruoyi.newstocksystem.mapper;
import com.ruoyi.stocksystem.domain.NewStockIndustry; import com.ruoyi.newstocksystem.domain.NewStockIndustry;
import java.util.List; import java.util.List;

@ -1,6 +1,6 @@
package com.ruoyi.stocksystem.mapper; package com.ruoyi.newstocksystem.mapper;
import com.ruoyi.stocksystem.domain.NewStocks; import com.ruoyi.newstocksystem.domain.NewStocks;
import java.util.List; import java.util.List;

@ -1,8 +1,8 @@
package com.ruoyi.stocksystem.domain.service; package com.ruoyi.newstocksystem.service;
import java.util.List; import java.util.List;
import com.ruoyi.stocksystem.domain.NewStockBasic; import com.ruoyi.newstocksystem.domain.NewStockBasic;
/** /**
* Service * Service

@ -1,8 +1,8 @@
package com.ruoyi.stocksystem.domain.service; package com.ruoyi.newstocksystem.service;
import java.util.List; import java.util.List;
import com.ruoyi.stocksystem.domain.NewStockIndustry; import com.ruoyi.newstocksystem.domain.NewStockIndustry;
/** /**
* Service * Service

@ -1,8 +1,8 @@
package com.ruoyi.stocksystem.domain.service; package com.ruoyi.newstocksystem.service;
import java.util.List; import java.util.List;
import com.ruoyi.stocksystem.domain.NewStocks; import com.ruoyi.newstocksystem.domain.NewStocks;
/** /**
* Service * Service

@ -1,4 +1,4 @@
package com.ruoyi.stocksystem.domain.service.impl; package com.ruoyi.newstocksystem.service.impl;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -7,9 +7,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import com.ruoyi.stocksystem.domain.NewStockBasic; import com.ruoyi.newstocksystem.domain.NewStockBasic;
import com.ruoyi.stocksystem.domain.service.INewStockBasicService; import com.ruoyi.newstocksystem.service.INewStockBasicService;
import com.ruoyi.stocksystem.mapper.NewStockBasicMapper; import com.ruoyi.newstocksystem.mapper.NewStockBasicMapper;
/** /**
* Service * Service

@ -1,4 +1,4 @@
package com.ruoyi.stocksystem.domain.service.impl; package com.ruoyi.newstocksystem.service.impl;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -7,9 +7,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import com.ruoyi.stocksystem.domain.NewStockIndustry; import com.ruoyi.newstocksystem.domain.NewStockIndustry;
import com.ruoyi.stocksystem.domain.service.INewStockIndustryService; import com.ruoyi.newstocksystem.service.INewStockIndustryService;
import com.ruoyi.stocksystem.mapper.NewStockIndustryMapper; import com.ruoyi.newstocksystem.mapper.NewStockIndustryMapper;
/** /**
* Service * Service

@ -1,4 +1,4 @@
package com.ruoyi.stocksystem.domain.service.impl; package com.ruoyi.newstocksystem.service.impl;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
@ -12,13 +12,13 @@ import org.springframework.transaction.annotation.Transactional;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.stocksystem.domain.NewStockBasic; import com.ruoyi.newstocksystem.domain.NewStockBasic;
import com.ruoyi.stocksystem.domain.NewStockIndustry; import com.ruoyi.newstocksystem.domain.NewStockIndustry;
import com.ruoyi.stocksystem.domain.NewStocks; import com.ruoyi.newstocksystem.domain.NewStocks;
import com.ruoyi.stocksystem.domain.service.INewStockBasicService; import com.ruoyi.newstocksystem.service.INewStockBasicService;
import com.ruoyi.stocksystem.domain.service.INewStockIndustryService; import com.ruoyi.newstocksystem.service.INewStockIndustryService;
import com.ruoyi.stocksystem.domain.service.INewStocksService; import com.ruoyi.newstocksystem.service.INewStocksService;
import com.ruoyi.stocksystem.mapper.NewStocksMapper; import com.ruoyi.newstocksystem.mapper.NewStocksMapper;
/** /**
* Service * Service

@ -0,0 +1,132 @@
<?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.ruoyi.newstocksystem.mapper.NewStockBasicMapper">
<resultMap type="com.ruoyi.newstocksystem.domain.NewStockBasic" id="NewStockBasicResult">
<id property="id" column="id" />
<result property="code" column="code" />
<result property="name" column="name" />
<result property="industryId" column="industry_id" />
<result property="industryName" column="industry_name" />
<result property="market" column="market" />
<result property="listDate" column="list_date" />
<result property="status" column="status" />
<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="remark" column="remark" />
</resultMap>
<sql id="selectNewStockBasicVo">
select id, code, name, industry_id, industry_name, market, list_date, status, create_by, create_time, update_by, update_time, remark from new_stock_basic
</sql>
<select id="selectNewStockBasicById" parameterType="Integer" resultMap="NewStockBasicResult">
<include refid="selectNewStockBasicVo" />
where id = #{id}
</select>
<select id="selectNewStockBasicByCode" parameterType="String" resultMap="NewStockBasicResult">
<include refid="selectNewStockBasicVo" />
where code = #{code}
</select>
<select id="selectNewStockBasicList" parameterType="com.ruoyi.newstocksystem.domain.NewStockBasic" resultMap="NewStockBasicResult">
<include refid="selectNewStockBasicVo" />
<where>
<if test="code != null and code != ''">
and code = #{code}
</if>
<if test="name != null and name != ''">
and name like concat('%', #{name}, '%')
</if>
<if test="industryId != null">
and industry_id = #{industryId}
</if>
<if test="industryName != null and industryName != ''">
and industry_name like concat('%', #{industryName}, '%')
</if>
<if test="market != null and market != ''">
and market = #{market}
</if>
<if test="listDate != null and listDate != ''">
and list_date = #{listDate}
</if>
<if test="status != null">
and status = #{status}
</if>
</where>
</select>
<insert id="insertNewStockBasic" parameterType="com.ruoyi.newstocksystem.domain.NewStockBasic" useGeneratedKeys="true" keyProperty="id">
insert into new_stock_basic
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="code != null and code != ''">code,</if>
<if test="name != null and name != ''">name,</if>
<if test="industryId != null">industry_id,</if>
<if test="industryName != null and industryName != ''">industry_name,</if>
<if test="market != null and market != ''">market,</if>
<if test="listDate != null and listDate != ''">list_date,</if>
<if test="status != null">status,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null and updateBy != ''">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null and remark != ''">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="code != null and code != ''">#{code},</if>
<if test="name != null and name != ''">#{name},</if>
<if test="industryId != null">#{industryId},</if>
<if test="industryName != null and industryName != ''">#{industryName},</if>
<if test="market != null and market != ''">#{market},</if>
<if test="listDate != null and listDate != ''">#{listDate},</if>
<if test="status != null">#{status},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null and remark != ''">#{remark},</if>
</trim>
</insert>
<update id="updateNewStockBasic" parameterType="com.ruoyi.newstocksystem.domain.NewStockBasic">
update new_stock_basic
<trim prefix="set" suffixOverrides=",">
<if test="code != null and code != ''">code = #{code},</if>
<if test="name != null and name != ''">name = #{name},</if>
<if test="industryId != null">industry_id = #{industryId},</if>
<if test="industryName != null and industryName != ''">industry_name = #{industryName},</if>
<if test="market != null and market != ''">market = #{market},</if>
<if test="listDate != null and listDate != ''">list_date = #{listDate},</if>
<if test="status != null">status = #{status},</if>
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null and remark != ''">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteNewStockBasicById" parameterType="Integer">
delete from new_stock_basic where id = #{id}
</delete>
<delete id="deleteNewStockBasicByIds" parameterType="String">
delete from new_stock_basic where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<insert id="batchInsertNewStockBasic" parameterType="java.util.List">
insert into new_stock_basic(code, name, industry_id, industry_name, market, list_date, status, create_by, create_time, update_by, update_time, remark)
values
<foreach collection="list" item="item" separator=",">
(#{item.code}, #{item.name}, #{item.industryId}, #{item.industryName}, #{item.market}, #{item.listDate}, #{item.status}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.remark})
</foreach>
</insert>
</mapper>

@ -0,0 +1,111 @@
<?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.ruoyi.newstocksystem.mapper.NewStockIndustryMapper">
<resultMap type="com.ruoyi.newstocksystem.domain.NewStockIndustry" id="NewStockIndustryResult">
<id property="industryId" column="industry_id" />
<result property="industryCode" column="industry_code" />
<result property="industryName" column="industry_name" />
<result property="level" column="level" />
<result property="parentId" column="parent_id" />
<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="remark" column="remark" />
</resultMap>
<sql id="selectNewStockIndustryVo">
select industry_id, industry_code, industry_name, level, parent_id, create_by, create_time, update_by, update_time, remark from new_stock_industry
</sql>
<select id="selectNewStockIndustryById" parameterType="Integer" resultMap="NewStockIndustryResult">
<include refid="selectNewStockIndustryVo" />
where industry_id = #{industryId}
</select>
<select id="selectNewStockIndustryByCode" parameterType="String" resultMap="NewStockIndustryResult">
<include refid="selectNewStockIndustryVo" />
where industry_code = #{industryCode}
</select>
<select id="selectNewStockIndustryList" parameterType="com.ruoyi.newstocksystem.domain.NewStockIndustry" resultMap="NewStockIndustryResult">
<include refid="selectNewStockIndustryVo" />
<where>
<if test="industryCode != null and industryCode != ''">
and industry_code = #{industryCode}
</if>
<if test="industryName != null and industryName != ''">
and industry_name like concat('%', #{industryName}, '%')
</if>
<if test="level != null">
and level = #{level}
</if>
<if test="parentId != null">
and parent_id = #{parentId}
</if>
</where>
</select>
<insert id="insertNewStockIndustry" parameterType="com.ruoyi.newstocksystem.domain.NewStockIndustry" useGeneratedKeys="true" keyProperty="industryId">
insert into new_stock_industry
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="industryCode != null and industryCode != ''">industry_code,</if>
<if test="industryName != null and industryName != ''">industry_name,</if>
<if test="level != null">level,</if>
<if test="parentId != null">parent_id,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null and updateBy != ''">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null and remark != ''">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="industryCode != null and industryCode != ''">#{industryCode},</if>
<if test="industryName != null and industryName != ''">#{industryName},</if>
<if test="level != null">#{level},</if>
<if test="parentId != null">#{parentId},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null and remark != ''">#{remark},</if>
</trim>
</insert>
<update id="updateNewStockIndustry" parameterType="com.ruoyi.newstocksystem.domain.NewStockIndustry">
update new_stock_industry
<trim prefix="set" suffixOverrides=",">
<if test="industryCode != null and industryCode != ''">industry_code = #{industryCode},</if>
<if test="industryName != null and industryName != ''">industry_name = #{industryName},</if>
<if test="level != null">level = #{level},</if>
<if test="parentId != null">parent_id = #{parentId},</if>
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null and remark != ''">remark = #{remark},</if>
</trim>
where industry_id = #{industryId}
</update>
<delete id="deleteNewStockIndustryById" parameterType="Integer">
delete from new_stock_industry where industry_id = #{industryId}
</delete>
<delete id="deleteNewStockIndustryByIds" parameterType="String">
delete from new_stock_industry where industry_id in
<foreach item="industryId" collection="array" open="(" separator="," close=")">
#{industryId}
</foreach>
</delete>
<insert id="batchInsertNewStockIndustry" parameterType="java.util.List">
insert into new_stock_industry(industry_code, industry_name, level, parent_id, create_by, create_time, update_by, update_time, remark)
values
<foreach collection="list" item="item" separator=",">
(#{item.industryCode}, #{item.industryName}, #{item.level}, #{item.parentId}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.remark})
</foreach>
</insert>
</mapper>

@ -2,9 +2,8 @@
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.stocksystem.mapper.NewStocksMapper"> <mapper namespace="com.ruoyi.newstocksystem.mapper.NewStocksMapper">
<resultMap type="com.ruoyi.newstocksystem.domain.NewStocks" id="NewStocksResult">
<resultMap type="com.ruoyi.stocksystem.domain.NewStocks" id="NewStocksResult">
<id property="id" column="id" /> <id property="id" column="id" />
<result property="code" column="code" /> <result property="code" column="code" />
<result property="tradeDate" column="trade_date" /> <result property="tradeDate" column="trade_date" />
@ -27,8 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectNewStocksVo"> <sql id="selectNewStocksVo">
select id, code, trade_date, open, close, change_rate, trade_days, volume, amount, change_rate_10, change_rate_20, change_rate_60, avg_volume_20, free_float_market_value, total_market_value, agencies_hold select id, code, trade_date, open, close, change_rate, trade_days, volume, amount, change_rate_10, change_rate_20, change_rate_60, avg_volume_20, free_float_market_value, total_market_value, agencies_hold from new_stocks
from new_stocks
</sql> </sql>
<select id="selectNewStocksById" parameterType="Integer" resultMap="NewStocksResult"> <select id="selectNewStocksById" parameterType="Integer" resultMap="NewStocksResult">
@ -36,20 +34,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id} where id = #{id}
</select> </select>
<select id="selectNewStocksList" parameterType="com.ruoyi.stocksystem.domain.NewStocks" resultMap="NewStocksResult"> <select id="selectNewStocksList" parameterType="com.ruoyi.newstocksystem.domain.NewStocks" resultMap="NewStocksResult">
<include refid="selectNewStocksVo" /> <include refid="selectNewStocksVo" />
<where> <where>
<if test="code != null and code != ''"> <if test="code != null and code != ''">
and code = #{code} and code = #{code}
</if> </if>
<if test="tradeDate != null"> <if test="tradeDate != null and tradeDate != ''">
and trade_date = #{tradeDate} and trade_date = #{tradeDate}
</if> </if>
<if test="changeRate != null">
and change_rate = #{changeRate}
</if>
</where> </where>
order by trade_date desc, code order by trade_date desc, code
</select> </select>
<select id="selectNewStocksListB" parameterType="com.ruoyi.stocksystem.domain.NewStocks" resultMap="NewStocksResult"> <select id="selectNewStocksListB" parameterType="com.ruoyi.newstocksystem.domain.NewStocks" resultMap="NewStocksResult">
select s.id, s.code, s.trade_date, s.open, s.close, s.change_rate, s.trade_days, s.volume, s.amount, s.change_rate_10, s.change_rate_20, s.change_rate_60, s.avg_volume_20, s.free_float_market_value, s.total_market_value, s.agencies_hold, b.name, b.industry_id, i.industry_name select s.id, s.code, s.trade_date, s.open, s.close, s.change_rate, s.trade_days, s.volume, s.amount, s.change_rate_10, s.change_rate_20, s.change_rate_60, s.avg_volume_20, s.free_float_market_value, s.total_market_value, s.agencies_hold, b.name, b.industry_id, i.industry_name
from new_stocks s from new_stocks s
left join new_stock_basic b on s.code = b.code left join new_stock_basic b on s.code = b.code
@ -58,41 +59,92 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="code != null and code != ''"> <if test="code != null and code != ''">
and s.code = #{code} and s.code = #{code}
</if> </if>
<if test="name != null and name != ''"> <if test="tradeDate != null and tradeDate != ''">
and b.name like concat('%', #{name}, '%')
</if>
<if test="tradeDate != null">
and s.trade_date = #{tradeDate} and s.trade_date = #{tradeDate}
</if> </if>
<if test="changeRate != null"> <if test="changeRate != null">
and s.change_rate = #{changeRate} and s.change_rate = #{changeRate}
</if> </if>
<if test="industryId != null"> <if test="name != null and name != ''">
and b.industry_id = #{industryId} and b.name like concat('%', #{name}, '%')
</if>
<if test="industryName != null and industryName != ''">
and i.industry_name like concat('%', #{industryName}, '%')
</if> </if>
</where> </where>
order by s.trade_date desc, s.code order by s.trade_date desc, s.code
</select> </select>
<select id="selectNewStrongStocksList" parameterType="com.ruoyi.stocksystem.domain.NewStocks" resultMap="NewStocksResult"> <select id="selectNewStrongStocksList" parameterType="com.ruoyi.newstocksystem.domain.NewStocks" resultMap="NewStocksResult">
<include refid="selectNewStocksVo" /> select s.id, s.code, s.trade_date, s.open, s.close, s.change_rate, s.trade_days, s.volume, s.amount, s.change_rate_10, s.change_rate_20, s.change_rate_60, s.avg_volume_20, s.free_float_market_value, s.total_market_value, s.agencies_hold, b.name, b.industry_id, i.industry_name
where change_rate > 0 from new_stocks s
order by change_rate desc, volume desc left join new_stock_basic b on s.code = b.code
limit 10 left join new_stock_industry i on b.industry_id = i.industry_id
<where>
<if test="tradeDate != null and tradeDate != ''">
and s.trade_date = #{tradeDate}
</if>
<if test="industryName != null and industryName != ''">
and i.industry_name like concat('%', #{industryName}, '%')
</if>
</where>
order by s.change_rate_20 desc, s.change_rate_10 desc
limit 100
</select> </select>
<select id="selectNewLimitStocksList" parameterType="com.ruoyi.stocksystem.domain.NewStocks" resultMap="NewStocksResult"> <select id="selectNewLimitStocksList" parameterType="com.ruoyi.newstocksystem.domain.NewStocks" resultMap="NewStocksResult">
<include refid="selectNewStocksVo" /> select s.id, s.code, s.trade_date, s.open, s.close, s.change_rate, s.trade_days, s.volume, s.amount, s.change_rate_10, s.change_rate_20, s.change_rate_60, s.avg_volume_20, s.free_float_market_value, s.total_market_value, s.agencies_hold, b.name, b.industry_id, i.industry_name
where change_rate >= 9.9 from new_stocks s
order by change_rate desc, volume desc left join new_stock_basic b on s.code = b.code
left join new_stock_industry i on b.industry_id = i.industry_id
<where>
<if test="tradeDate != null and tradeDate != ''">
and s.trade_date = #{tradeDate}
</if>
<if test="industryName != null and industryName != ''">
and i.industry_name like concat('%', #{industryName}, '%')
</if>
and s.change_rate &gt;= 9.8
</where>
order by s.change_rate desc
</select> </select>
<insert id="insertNewStocks" parameterType="com.ruoyi.stocksystem.domain.NewStocks"> <insert id="insertNewStocks" parameterType="com.ruoyi.newstocksystem.domain.NewStocks" useGeneratedKeys="true" keyProperty="id">
insert into new_stocks( insert into new_stocks
code, trade_date, open, close, change_rate, trade_days, volume, amount, change_rate_10, change_rate_20, change_rate_60, avg_volume_20, free_float_market_value, total_market_value, agencies_hold <trim prefix="(" suffix=")" suffixOverrides=",">
) values ( <if test="code != null and code != ''">code,</if>
#{code}, #{tradeDate}, #{open}, #{close}, #{changeRate}, #{tradeDays}, #{volume}, #{amount}, #{changeRate10}, #{changeRate20}, #{changeRate60}, #{avgVolume20}, #{freeFloatMarketValue}, #{totalMarketValue}, #{agenciesHold} <if test="tradeDate != null and tradeDate != ''">trade_date,</if>
) <if test="open != null">open,</if>
<if test="close != null">close,</if>
<if test="changeRate != null">change_rate,</if>
<if test="tradeDays != null">trade_days,</if>
<if test="volume != null">volume,</if>
<if test="amount != null">amount,</if>
<if test="changeRate10 != null">change_rate_10,</if>
<if test="changeRate20 != null">change_rate_20,</if>
<if test="changeRate60 != null">change_rate_60,</if>
<if test="avgVolume20 != null">avg_volume_20,</if>
<if test="freeFloatMarketValue != null">free_float_market_value,</if>
<if test="totalMarketValue != null">total_market_value,</if>
<if test="agenciesHold != null">agencies_hold,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="code != null and code != ''">#{code},</if>
<if test="tradeDate != null and tradeDate != ''">#{tradeDate},</if>
<if test="open != null">#{open},</if>
<if test="close != null">#{close},</if>
<if test="changeRate != null">#{changeRate},</if>
<if test="tradeDays != null">#{tradeDays},</if>
<if test="volume != null">#{volume},</if>
<if test="amount != null">#{amount},</if>
<if test="changeRate10 != null">#{changeRate10},</if>
<if test="changeRate20 != null">#{changeRate20},</if>
<if test="changeRate60 != null">#{changeRate60},</if>
<if test="avgVolume20 != null">#{avgVolume20},</if>
<if test="freeFloatMarketValue != null">#{freeFloatMarketValue},</if>
<if test="totalMarketValue != null">#{totalMarketValue},</if>
<if test="agenciesHold != null">#{agenciesHold},</if>
</trim>
</insert> </insert>
<insert id="batchInsertNewStocks" parameterType="java.util.List"> <insert id="batchInsertNewStocks" parameterType="java.util.List">
@ -106,11 +158,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach> </foreach>
</insert> </insert>
<update id="updateNewStocks" parameterType="com.ruoyi.stocksystem.domain.NewStocks"> <update id="updateNewStocks" parameterType="com.ruoyi.newstocksystem.domain.NewStocks">
update new_stocks update new_stocks
<set> <trim prefix="set" suffixOverrides=",">
<if test="code != null and code != ''">code = #{code},</if> <if test="code != null and code != ''">code = #{code},</if>
<if test="tradeDate != null">trade_date = #{tradeDate},</if> <if test="tradeDate != null and tradeDate != ''">trade_date = #{tradeDate},</if>
<if test="open != null">open = #{open},</if> <if test="open != null">open = #{open},</if>
<if test="close != null">close = #{close},</if> <if test="close != null">close = #{close},</if>
<if test="changeRate != null">change_rate = #{changeRate},</if> <if test="changeRate != null">change_rate = #{changeRate},</if>
@ -124,7 +176,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="freeFloatMarketValue != null">free_float_market_value = #{freeFloatMarketValue},</if> <if test="freeFloatMarketValue != null">free_float_market_value = #{freeFloatMarketValue},</if>
<if test="totalMarketValue != null">total_market_value = #{totalMarketValue},</if> <if test="totalMarketValue != null">total_market_value = #{totalMarketValue},</if>
<if test="agenciesHold != null">agencies_hold = #{agenciesHold},</if> <if test="agenciesHold != null">agencies_hold = #{agenciesHold},</if>
</set> </trim>
where id = #{id} where id = #{id}
</update> </update>
@ -132,7 +184,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
delete from new_stocks where id = #{id} delete from new_stocks where id = #{id}
</delete> </delete>
<delete id="deleteNewStocksByIds" parameterType="Integer[]"> <delete id="deleteNewStocksByIds" parameterType="String">
delete from new_stocks where id in delete from new_stocks where id in
<foreach item="id" collection="array" open="(" separator="," close=")"> <foreach item="id" collection="array" open="(" separator="," close=")">
#{id} #{id}
@ -143,5 +195,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectNewStocksVo" /> <include refid="selectNewStocksVo" />
where code = #{code} and trade_date = #{tradeDate} where code = #{code} and trade_date = #{tradeDate}
</select> </select>
</mapper> </mapper>

@ -218,6 +218,12 @@
<version>${ruoyi.version}</version> <version>${ruoyi.version}</version>
</dependency> </dependency>
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>newstock-system</artifactId>
<version>${ruoyi.version}</version>
</dependency>
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>
@ -229,6 +235,7 @@
<module>ruoyi-generator</module> <module>ruoyi-generator</module>
<module>ruoyi-common</module> <module>ruoyi-common</module>
<module>stock-system</module> <module>stock-system</module>
<module>newstock-system</module>
<module>book-system</module> <module>book-system</module>
</modules> </modules>
<packaging>pom</packaging> <packaging>pom</packaging>

@ -67,6 +67,11 @@
<artifactId>stock-system</artifactId> <artifactId>stock-system</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>newstock-system</artifactId>
</dependency>
<dependency> <dependency>
<groupId>com.ruoyi</groupId> <groupId>com.ruoyi</groupId>
<artifactId>book-system</artifactId> <artifactId>book-system</artifactId>

@ -37,7 +37,11 @@ server:
logging: logging:
level: level:
com.ruoyi: debug com.ruoyi: debug
org.springframework: warn # org.springframework: warn
# 打印RequestMapping映射详情
org.springframework.web.servlet.mvc.method.annotation: TRACE
# 简化版也可只开启web模块的DEBUG
org.springframework.web: DEBUG
# Spring配置 # Spring配置
spring: spring:

@ -5,7 +5,7 @@ export default {
// 查询行情数据列表 // 查询行情数据列表
listNewStocks(query) { listNewStocks(query) {
return request({ return request({
url: '/stocksystem/newstocks/list', url: '/newstocksystem/newstocks/list',
method: 'get', method: 'get',
params: query params: query
}) })
@ -14,7 +14,7 @@ export default {
// 查询行情数据列表含基础数据 // 查询行情数据列表含基础数据
listNewStocksB(query) { listNewStocksB(query) {
return request({ return request({
url: '/stocksystem/newstocks/listB', url: '/newstocksystem/newstocks/listB',
method: 'get', method: 'get',
params: query params: query
}) })
@ -23,7 +23,7 @@ export default {
// 查询强势股列表 // 查询强势股列表
listNewStrongStocks(query) { listNewStrongStocks(query) {
return request({ return request({
url: '/stocksystem/newstocks/listStrongStocks', url: '/newstocksystem/newstocks/listStrongStocks',
method: 'get', method: 'get',
params: query params: query
}) })
@ -32,7 +32,7 @@ export default {
// 查询涨停股列表 // 查询涨停股列表
listNewLimitStocks(query) { listNewLimitStocks(query) {
return request({ return request({
url: '/stocksystem/newstocks/listLimitStocks', url: '/newstocksystem/newstocks/listLimitStocks',
method: 'get', method: 'get',
params: query params: query
}) })
@ -41,7 +41,7 @@ export default {
// 获取行情数据详细信息 // 获取行情数据详细信息
getNewStocks(id) { getNewStocks(id) {
return request({ return request({
url: `/stocksystem/newstocks/${id}`, url: `/newstocksystem/newstocks/${id}`,
method: 'get' method: 'get'
}) })
}, },
@ -49,7 +49,7 @@ export default {
// 新增行情数据 // 新增行情数据
addNewStocks(data) { addNewStocks(data) {
return request({ return request({
url: '/stocksystem/newstocks', url: '/newstocksystem/newstocks',
method: 'post', method: 'post',
data: data data: data
}) })
@ -58,7 +58,7 @@ export default {
// 修改行情数据 // 修改行情数据
updateNewStocks(data) { updateNewStocks(data) {
return request({ return request({
url: '/stocksystem/newstocks', url: '/newstocksystem/newstocks',
method: 'put', method: 'put',
data: data data: data
}) })
@ -67,7 +67,7 @@ export default {
// 删除行情数据 // 删除行情数据
deleteNewStocks(ids) { deleteNewStocks(ids) {
return request({ return request({
url: `/stocksystem/newstocks/${ids}`, url: `/newstocksystem/newstocks/${ids}`,
method: 'delete' method: 'delete'
}) })
}, },
@ -75,7 +75,7 @@ export default {
// 导出行情数据 // 导出行情数据
exportNewStocks(query) { exportNewStocks(query) {
return request({ return request({
url: '/stocksystem/newstocks/export', url: '/newstocksystem/newstocks/export',
method: 'post', method: 'post',
params: query, params: query,
responseType: 'blob' responseType: 'blob'
@ -85,7 +85,7 @@ export default {
// 导入行情数据 // 导入行情数据
importNewStocks(data) { importNewStocks(data) {
return request({ return request({
url: '/stocksystem/newstocks/importData', url: '/newstocksystem/newstocks/importData',
method: 'post', method: 'post',
data: data data: data
}) })
@ -94,7 +94,7 @@ export default {
// 分析行情数据 // 分析行情数据
analyzeNewStocks(data) { analyzeNewStocks(data) {
return request({ return request({
url: '/stocksystem/newstocks/analyze', url: '/newstocksystem/newstocks/analyze',
method: 'post', method: 'post',
data: data data: data
}) })
@ -103,7 +103,7 @@ export default {
// 获取联想的数据(股票代码) // 获取联想的数据(股票代码)
stockQueryData(query) { stockQueryData(query) {
return request({ return request({
url: '/stocksystem/newstocks/stockQueryData', url: '/newstocksystem/newstocks/stockQueryData',
method: 'get', method: 'get',
params: { query } params: { query }
}) })
@ -112,7 +112,7 @@ export default {
// 获取联想的数据(股票名称) // 获取联想的数据(股票名称)
stockNameQueryData(query) { stockNameQueryData(query) {
return request({ return request({
url: '/stocksystem/newstocks/stockNameQueryData', url: '/newstocksystem/newstocks/stockNameQueryData',
method: 'get', method: 'get',
params: { query } params: { query }
}) })

@ -52,7 +52,7 @@
icon="el-icon-plus" icon="el-icon-plus"
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['stocksystem:newstocks:add']" v-hasPermi="['newstocksystem:newstocks:add']"
>新增</el-button> >新增</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
@ -63,7 +63,7 @@
size="mini" size="mini"
:disabled="single" :disabled="single"
@click="handleUpdate" @click="handleUpdate"
v-hasPermi="['stocksystem:newstocks:edit']" v-hasPermi="['newstocksystem:newstocks:edit']"
>修改</el-button> >修改</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
@ -74,7 +74,7 @@
size="mini" size="mini"
:disabled="multiple" :disabled="multiple"
@click="handleDelete" @click="handleDelete"
v-hasPermi="['stocksystem:newstocks:remove']" v-hasPermi="['newstocksystem:newstocks:remove']"
>删除</el-button> >删除</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
@ -84,7 +84,7 @@
icon="el-icon-download" icon="el-icon-download"
size="mini" size="mini"
@click="handleExport" @click="handleExport"
v-hasPermi="['stocksystem:newstocks:export']" v-hasPermi="['newstocksystem:newstocks:export']"
>导出</el-button> >导出</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
@ -116,14 +116,14 @@
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['stocksystem:newstocks:edit']" v-hasPermi="['newstocksystem:newstocks:edit']"
>修改</el-button> >修改</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['stocksystem:newstocks:remove']" v-hasPermi="['newstocksystem:newstocks:remove']"
>删除</el-button> >删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -254,7 +254,7 @@
import { getToken } from '@/utils/auth' import { getToken } from '@/utils/auth'
import { parseTime } from '@/utils/ruoyi' import { parseTime } from '@/utils/ruoyi'
import request from '@/utils/request' import request from '@/utils/request'
import newstocksApi from '@/api/stocksystem/newstocks' import newstocksApi from '@/api/newstocksystem/newstocks'
export default { export default {
name: 'NewStocks', name: 'NewStocks',
@ -319,7 +319,7 @@ export default {
// //
tradeDate: new Date().toISOString().split('T')[0], tradeDate: new Date().toISOString().split('T')[0],
// //
url: '/stocksystem/newstocks/importData' url: '/newstocksystem/newstocks/importData'
}, },
// //
fileList: [] fileList: []
@ -529,4 +529,4 @@ export default {
.fixed-width { .fixed-width {
width: 150px; width: 150px;
} }
</style> </style>

@ -1,97 +0,0 @@
<?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.ruoyi.stocksystem.mapper.NewStockBasicMapper">
<resultMap type="com.ruoyi.stocksystem.domain.NewStockBasic" id="NewStockBasicResult">
<id property="id" column="id" />
<result property="code" column="code" />
<result property="name" column="name" />
<result property="industryId" column="industry_id" />
<result property="listDate" column="list_date" />
<result property="marketType" column="market_type" />
<result property="status" column="status" />
</resultMap>
<sql id="selectNewStockBasicVo">
select id, code, name, industry_id, list_date, market_type, status
from new_stock_basic
</sql>
<select id="selectNewStockBasicById" parameterType="Integer" resultMap="NewStockBasicResult">
<include refid="selectNewStockBasicVo" />
where id = #{id}
</select>
<select id="selectNewStockBasicByCode" parameterType="String" resultMap="NewStockBasicResult">
<include refid="selectNewStockBasicVo" />
where code = #{code}
</select>
<select id="selectNewStockBasicList" parameterType="com.ruoyi.stocksystem.domain.NewStockBasic" resultMap="NewStockBasicResult">
<include refid="selectNewStockBasicVo" />
<where>
<if test="code != null and code != ''">
and code = #{code}
</if>
<if test="name != null and name != ''">
and name like concat('%', #{name}, '%')
</if>
<if test="industryId != null">
and industry_id = #{industryId}
</if>
<if test="status != null">
and status = #{status}
</if>
</where>
order by code
</select>
<insert id="insertNewStockBasic" parameterType="com.ruoyi.stocksystem.domain.NewStockBasic">
insert into new_stock_basic(
code, name, industry_id, list_date, market_type, status
) values (
#{code}, #{name}, #{industryId}, #{listDate}, #{marketType}, #{status}
)
</insert>
<insert id="batchInsertNewStockBasic" parameterType="java.util.List">
insert into new_stock_basic(
code, name, industry_id, list_date, market_type, status
) values
<foreach collection="list" item="item" separator=",">
(
#{item.code}, #{item.name}, #{item.industryId}, #{item.listDate}, #{item.marketType}, #{item.status}
)
</foreach>
</insert>
<update id="updateNewStockBasic" parameterType="com.ruoyi.stocksystem.domain.NewStockBasic">
update new_stock_basic
<set>
<if test="name != null and name != ''">name = #{name},</if>
<if test="industryId != null">industry_id = #{industryId},</if>
<if test="listDate != null">list_date = #{listDate},</if>
<if test="marketType != null and marketType != ''">market_type = #{marketType},</if>
<if test="status != null">status = #{status},</if>
</set>
where code = #{code}
</update>
<delete id="deleteNewStockBasicById" parameterType="Integer">
delete from new_stock_basic where id = #{id}
</delete>
<delete id="deleteNewStockBasicByCode" parameterType="String">
delete from new_stock_basic where code = #{code}
</delete>
<delete id="deleteNewStockBasicByIds" parameterType="Integer[]">
delete from new_stock_basic where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

@ -1,79 +0,0 @@
<?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.ruoyi.stocksystem.mapper.NewStockIndustryMapper">
<resultMap type="com.ruoyi.stocksystem.domain.NewStockIndustry" id="NewStockIndustryResult">
<id property="industryId" column="industry_id" />
<result property="industryLevel" column="industry_level" />
<result property="industryCode" column="industry_code" />
<result property="industryName" column="industry_name" />
<result property="parentCode" column="parent_code" />
</resultMap>
<sql id="selectNewStockIndustryVo">
select industry_id, industry_level, industry_code, industry_name, parent_code
from new_stock_industry
</sql>
<select id="selectNewStockIndustryById" parameterType="Integer" resultMap="NewStockIndustryResult">
<include refid="selectNewStockIndustryVo" />
where industry_id = #{industryId}
</select>
<select id="selectNewStockIndustryList" parameterType="com.ruoyi.stocksystem.domain.NewStockIndustry" resultMap="NewStockIndustryResult">
<include refid="selectNewStockIndustryVo" />
<where>
<if test="industryName != null and industryName != ''">
and industry_name like concat('%', #{industryName}, '%')
</if>
<if test="industryCode != null and industryCode != ''">
and industry_code = #{industryCode}
</if>
</where>
order by industry_code
</select>
<insert id="insertNewStockIndustry" parameterType="com.ruoyi.stocksystem.domain.NewStockIndustry">
insert into new_stock_industry(
industry_id, industry_level, industry_code, industry_name, parent_code
) values (
#{industryId}, #{industryLevel}, #{industryCode}, #{industryName}, #{parentCode}
)
</insert>
<insert id="batchInsertNewStockIndustry" parameterType="java.util.List">
insert into new_stock_industry(
industry_id, industry_level, industry_code, industry_name, parent_code
) values
<foreach collection="list" item="item" separator=",">
(
#{item.industryId}, #{item.industryLevel}, #{item.industryCode}, #{item.industryName}, #{item.parentCode}
)
</foreach>
</insert>
<update id="updateNewStockIndustry" parameterType="com.ruoyi.stocksystem.domain.NewStockIndustry">
update new_stock_industry
<set>
<if test="industryLevel != null">industry_level = #{industryLevel},</if>
<if test="industryCode != null and industryCode != ''">industry_code = #{industryCode},</if>
<if test="industryName != null and industryName != ''">industry_name = #{industryName},</if>
<if test="parentCode != null and parentCode != ''">parent_code = #{parentCode},</if>
</set>
where industry_id = #{industryId}
</update>
<delete id="deleteNewStockIndustryById" parameterType="Integer">
delete from new_stock_industry where industry_id = #{industryId}
</delete>
<delete id="deleteNewStockIndustryByIds" parameterType="Integer[]">
delete from new_stock_industry where industry_id in
<foreach item="industryId" collection="array" open="(" separator="," close=")">
#{industryId}
</foreach>
</delete>
</mapper>
Loading…
Cancel
Save