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,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,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接口
|
||||||
@ -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>
|
||||||
@ -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…
Reference in new issue