diff --git a/newstock-system/pom.xml b/newstock-system/pom.xml new file mode 100644 index 0000000..37b1bde --- /dev/null +++ b/newstock-system/pom.xml @@ -0,0 +1,38 @@ + + + + ruoyi + com.ruoyi + 3.8.0 + + 4.0.0 + + newstock-system + + + 8 + 8 + + + + + + org.springframework.boot + spring-boot-starter + + + + + com.ruoyi + ruoyi-system + + + + com.ruoyi + ruoyi-common + + + + \ No newline at end of file diff --git a/stock-system/src/main/java/com/ruoyi/stocksystem/controller/NewStocksController.java b/newstock-system/src/main/java/com/ruoyi/newstocksystem/controller/NewStocksController.java similarity index 94% rename from stock-system/src/main/java/com/ruoyi/stocksystem/controller/NewStocksController.java rename to newstock-system/src/main/java/com/ruoyi/newstocksystem/controller/NewStocksController.java index a382d1b..c321884 100644 --- a/stock-system/src/main/java/com/ruoyi/stocksystem/controller/NewStocksController.java +++ b/newstock-system/src/main/java/com/ruoyi/newstocksystem/controller/NewStocksController.java @@ -1,12 +1,12 @@ -package com.ruoyi.stocksystem.controller; +package com.ruoyi.newstocksystem.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.stocksystem.domain.NewStockBasic; -import com.ruoyi.stocksystem.domain.NewStocks; -import com.ruoyi.stocksystem.domain.service.INewStockBasicService; +import com.ruoyi.newstocksystem.domain.NewStockBasic; +import com.ruoyi.newstocksystem.domain.NewStocks; +import com.ruoyi.newstocksystem.service.INewStockBasicService; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; 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.domain.AjaxResult; 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.core.page.TableDataInfo; import org.springframework.web.multipart.MultipartFile; @@ -33,7 +33,7 @@ import org.springframework.web.multipart.MultipartFile; * @date 2026-01-18 */ @RestController -@RequestMapping("/stocksystem/newstocks") +@RequestMapping("/newstocksystem/newstocks") public class NewStocksController extends BaseController { @Autowired @@ -191,4 +191,4 @@ public class NewStocksController extends BaseController List list = newStockBasicService.selectNewStockBasicList(newStockBasic); return AjaxResult.success(list); } -} +} \ No newline at end of file diff --git a/stock-system/src/main/java/com/ruoyi/stocksystem/domain/NewStockBasic.java b/newstock-system/src/main/java/com/ruoyi/newstocksystem/domain/NewStockBasic.java similarity index 97% rename from stock-system/src/main/java/com/ruoyi/stocksystem/domain/NewStockBasic.java rename to newstock-system/src/main/java/com/ruoyi/newstocksystem/domain/NewStockBasic.java index 2aa523e..c5b6542 100644 --- a/stock-system/src/main/java/com/ruoyi/stocksystem/domain/NewStockBasic.java +++ b/newstock-system/src/main/java/com/ruoyi/newstocksystem/domain/NewStockBasic.java @@ -1,4 +1,4 @@ -package com.ruoyi.stocksystem.domain; +package com.ruoyi.newstocksystem.domain; import com.fasterxml.jackson.annotation.JsonFormat; import com.ruoyi.common.core.domain.BaseEntity; diff --git a/stock-system/src/main/java/com/ruoyi/stocksystem/domain/NewStockIndustry.java b/newstock-system/src/main/java/com/ruoyi/newstocksystem/domain/NewStockIndustry.java similarity index 97% rename from stock-system/src/main/java/com/ruoyi/stocksystem/domain/NewStockIndustry.java rename to newstock-system/src/main/java/com/ruoyi/newstocksystem/domain/NewStockIndustry.java index 54d59a3..3085f8f 100644 --- a/stock-system/src/main/java/com/ruoyi/stocksystem/domain/NewStockIndustry.java +++ b/newstock-system/src/main/java/com/ruoyi/newstocksystem/domain/NewStockIndustry.java @@ -1,4 +1,4 @@ -package com.ruoyi.stocksystem.domain; +package com.ruoyi.newstocksystem.domain; import com.ruoyi.common.core.domain.BaseEntity; diff --git a/stock-system/src/main/java/com/ruoyi/stocksystem/domain/NewStocks.java b/newstock-system/src/main/java/com/ruoyi/newstocksystem/domain/NewStocks.java similarity index 97% rename from stock-system/src/main/java/com/ruoyi/stocksystem/domain/NewStocks.java rename to newstock-system/src/main/java/com/ruoyi/newstocksystem/domain/NewStocks.java index bacff2f..6d40f29 100644 --- a/stock-system/src/main/java/com/ruoyi/stocksystem/domain/NewStocks.java +++ b/newstock-system/src/main/java/com/ruoyi/newstocksystem/domain/NewStocks.java @@ -1,4 +1,4 @@ -package com.ruoyi.stocksystem.domain; +package com.ruoyi.newstocksystem.domain; import com.fasterxml.jackson.annotation.JsonFormat; import com.ruoyi.common.annotation.Excel; @@ -90,8 +90,8 @@ public class NewStocks extends BaseEntity private String industryName; @Excel(name = "行业级别", sort = 19, type = Excel.Type.ALL) private Integer industryLevel; - @Excel(name = "所属东财行业指数代码\\n\" +\n" + - " \"[行业类别]2级\"", sort = 20, type = Excel.Type.ALL) + @Excel(name = "所属东财行业指数代码\n" + + "[行业类别]2级", sort = 20, type = Excel.Type.ALL) private String industryCode; @Excel(name = "父行业代码", sort = 21, type = Excel.Type.ALL) private String parentCode; diff --git a/stock-system/src/main/java/com/ruoyi/stocksystem/mapper/NewStockBasicMapper.java b/newstock-system/src/main/java/com/ruoyi/newstocksystem/mapper/NewStockBasicMapper.java similarity index 94% rename from stock-system/src/main/java/com/ruoyi/stocksystem/mapper/NewStockBasicMapper.java rename to newstock-system/src/main/java/com/ruoyi/newstocksystem/mapper/NewStockBasicMapper.java index 08f587c..6ccc4a8 100644 --- a/stock-system/src/main/java/com/ruoyi/stocksystem/mapper/NewStockBasicMapper.java +++ b/newstock-system/src/main/java/com/ruoyi/newstocksystem/mapper/NewStockBasicMapper.java @@ -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; diff --git a/stock-system/src/main/java/com/ruoyi/stocksystem/mapper/NewStockIndustryMapper.java b/newstock-system/src/main/java/com/ruoyi/newstocksystem/mapper/NewStockIndustryMapper.java similarity index 94% rename from stock-system/src/main/java/com/ruoyi/stocksystem/mapper/NewStockIndustryMapper.java rename to newstock-system/src/main/java/com/ruoyi/newstocksystem/mapper/NewStockIndustryMapper.java index 31505fe..8b6f83e 100644 --- a/stock-system/src/main/java/com/ruoyi/stocksystem/mapper/NewStockIndustryMapper.java +++ b/newstock-system/src/main/java/com/ruoyi/newstocksystem/mapper/NewStockIndustryMapper.java @@ -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; diff --git a/stock-system/src/main/java/com/ruoyi/stocksystem/mapper/NewStocksMapper.java b/newstock-system/src/main/java/com/ruoyi/newstocksystem/mapper/NewStocksMapper.java similarity index 96% rename from stock-system/src/main/java/com/ruoyi/stocksystem/mapper/NewStocksMapper.java rename to newstock-system/src/main/java/com/ruoyi/newstocksystem/mapper/NewStocksMapper.java index 30e6a2d..ed57329 100644 --- a/stock-system/src/main/java/com/ruoyi/stocksystem/mapper/NewStocksMapper.java +++ b/newstock-system/src/main/java/com/ruoyi/newstocksystem/mapper/NewStocksMapper.java @@ -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; diff --git a/stock-system/src/main/java/com/ruoyi/stocksystem/domain/service/INewStockBasicService.java b/newstock-system/src/main/java/com/ruoyi/newstocksystem/service/INewStockBasicService.java similarity index 94% rename from stock-system/src/main/java/com/ruoyi/stocksystem/domain/service/INewStockBasicService.java rename to newstock-system/src/main/java/com/ruoyi/newstocksystem/service/INewStockBasicService.java index fc2c85b..28d8025 100644 --- a/stock-system/src/main/java/com/ruoyi/stocksystem/domain/service/INewStockBasicService.java +++ b/newstock-system/src/main/java/com/ruoyi/newstocksystem/service/INewStockBasicService.java @@ -1,8 +1,8 @@ -package com.ruoyi.stocksystem.domain.service; +package com.ruoyi.newstocksystem.service; import java.util.List; -import com.ruoyi.stocksystem.domain.NewStockBasic; +import com.ruoyi.newstocksystem.domain.NewStockBasic; /** * 股票基础信息Service接口 diff --git a/stock-system/src/main/java/com/ruoyi/stocksystem/domain/service/INewStockIndustryService.java b/newstock-system/src/main/java/com/ruoyi/newstocksystem/service/INewStockIndustryService.java similarity index 94% rename from stock-system/src/main/java/com/ruoyi/stocksystem/domain/service/INewStockIndustryService.java rename to newstock-system/src/main/java/com/ruoyi/newstocksystem/service/INewStockIndustryService.java index 69552aa..aa68c39 100644 --- a/stock-system/src/main/java/com/ruoyi/stocksystem/domain/service/INewStockIndustryService.java +++ b/newstock-system/src/main/java/com/ruoyi/newstocksystem/service/INewStockIndustryService.java @@ -1,8 +1,8 @@ -package com.ruoyi.stocksystem.domain.service; +package com.ruoyi.newstocksystem.service; import java.util.List; -import com.ruoyi.stocksystem.domain.NewStockIndustry; +import com.ruoyi.newstocksystem.domain.NewStockIndustry; /** * 行业分类Service接口 diff --git a/stock-system/src/main/java/com/ruoyi/stocksystem/domain/service/INewStocksService.java b/newstock-system/src/main/java/com/ruoyi/newstocksystem/service/INewStocksService.java similarity index 96% rename from stock-system/src/main/java/com/ruoyi/stocksystem/domain/service/INewStocksService.java rename to newstock-system/src/main/java/com/ruoyi/newstocksystem/service/INewStocksService.java index 643312f..4b2f8f7 100644 --- a/stock-system/src/main/java/com/ruoyi/stocksystem/domain/service/INewStocksService.java +++ b/newstock-system/src/main/java/com/ruoyi/newstocksystem/service/INewStocksService.java @@ -1,8 +1,8 @@ -package com.ruoyi.stocksystem.domain.service; +package com.ruoyi.newstocksystem.service; import java.util.List; -import com.ruoyi.stocksystem.domain.NewStocks; +import com.ruoyi.newstocksystem.domain.NewStocks; /** * 行情数据Service接口 diff --git a/stock-system/src/main/java/com/ruoyi/stocksystem/domain/service/impl/NewStockBasicServiceImpl.java b/newstock-system/src/main/java/com/ruoyi/newstocksystem/service/impl/NewStockBasicServiceImpl.java similarity index 93% rename from stock-system/src/main/java/com/ruoyi/stocksystem/domain/service/impl/NewStockBasicServiceImpl.java rename to newstock-system/src/main/java/com/ruoyi/newstocksystem/service/impl/NewStockBasicServiceImpl.java index fad81ce..2b46404 100644 --- a/stock-system/src/main/java/com/ruoyi/stocksystem/domain/service/impl/NewStockBasicServiceImpl.java +++ b/newstock-system/src/main/java/com/ruoyi/newstocksystem/service/impl/NewStockBasicServiceImpl.java @@ -1,4 +1,4 @@ -package com.ruoyi.stocksystem.domain.service.impl; +package com.ruoyi.newstocksystem.service.impl; import java.util.ArrayList; import java.util.List; @@ -7,9 +7,9 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import com.ruoyi.stocksystem.domain.NewStockBasic; -import com.ruoyi.stocksystem.domain.service.INewStockBasicService; -import com.ruoyi.stocksystem.mapper.NewStockBasicMapper; +import com.ruoyi.newstocksystem.domain.NewStockBasic; +import com.ruoyi.newstocksystem.service.INewStockBasicService; +import com.ruoyi.newstocksystem.mapper.NewStockBasicMapper; /** * 股票基础信息Service实现类 diff --git a/stock-system/src/main/java/com/ruoyi/stocksystem/domain/service/impl/NewStockIndustryServiceImpl.java b/newstock-system/src/main/java/com/ruoyi/newstocksystem/service/impl/NewStockIndustryServiceImpl.java similarity index 94% rename from stock-system/src/main/java/com/ruoyi/stocksystem/domain/service/impl/NewStockIndustryServiceImpl.java rename to newstock-system/src/main/java/com/ruoyi/newstocksystem/service/impl/NewStockIndustryServiceImpl.java index 2a68ed0..b57877c 100644 --- a/stock-system/src/main/java/com/ruoyi/stocksystem/domain/service/impl/NewStockIndustryServiceImpl.java +++ b/newstock-system/src/main/java/com/ruoyi/newstocksystem/service/impl/NewStockIndustryServiceImpl.java @@ -1,4 +1,4 @@ -package com.ruoyi.stocksystem.domain.service.impl; +package com.ruoyi.newstocksystem.service.impl; import java.util.ArrayList; import java.util.List; @@ -7,9 +7,9 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import com.ruoyi.stocksystem.domain.NewStockIndustry; -import com.ruoyi.stocksystem.domain.service.INewStockIndustryService; -import com.ruoyi.stocksystem.mapper.NewStockIndustryMapper; +import com.ruoyi.newstocksystem.domain.NewStockIndustry; +import com.ruoyi.newstocksystem.service.INewStockIndustryService; +import com.ruoyi.newstocksystem.mapper.NewStockIndustryMapper; /** * 行业分类Service实现类 diff --git a/stock-system/src/main/java/com/ruoyi/stocksystem/domain/service/impl/NewStocksServiceImpl.java b/newstock-system/src/main/java/com/ruoyi/newstocksystem/service/impl/NewStocksServiceImpl.java similarity index 96% rename from stock-system/src/main/java/com/ruoyi/stocksystem/domain/service/impl/NewStocksServiceImpl.java rename to newstock-system/src/main/java/com/ruoyi/newstocksystem/service/impl/NewStocksServiceImpl.java index a6014b6..2eb9e1c 100644 --- a/stock-system/src/main/java/com/ruoyi/stocksystem/domain/service/impl/NewStocksServiceImpl.java +++ b/newstock-system/src/main/java/com/ruoyi/newstocksystem/service/impl/NewStocksServiceImpl.java @@ -1,4 +1,4 @@ -package com.ruoyi.stocksystem.domain.service.impl; +package com.ruoyi.newstocksystem.service.impl; import java.util.ArrayList; 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.DateUtils; -import com.ruoyi.stocksystem.domain.NewStockBasic; -import com.ruoyi.stocksystem.domain.NewStockIndustry; -import com.ruoyi.stocksystem.domain.NewStocks; -import com.ruoyi.stocksystem.domain.service.INewStockBasicService; -import com.ruoyi.stocksystem.domain.service.INewStockIndustryService; -import com.ruoyi.stocksystem.domain.service.INewStocksService; -import com.ruoyi.stocksystem.mapper.NewStocksMapper; +import com.ruoyi.newstocksystem.domain.NewStockBasic; +import com.ruoyi.newstocksystem.domain.NewStockIndustry; +import com.ruoyi.newstocksystem.domain.NewStocks; +import com.ruoyi.newstocksystem.service.INewStockBasicService; +import com.ruoyi.newstocksystem.service.INewStockIndustryService; +import com.ruoyi.newstocksystem.service.INewStocksService; +import com.ruoyi.newstocksystem.mapper.NewStocksMapper; /** * 行情数据Service实现类 diff --git a/newstock-system/src/main/resources/mapper/newstocksystem/NewStockBasicMapper.xml b/newstock-system/src/main/resources/mapper/newstocksystem/NewStockBasicMapper.xml new file mode 100644 index 0000000..5f86810 --- /dev/null +++ b/newstock-system/src/main/resources/mapper/newstocksystem/NewStockBasicMapper.xml @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + + + insert into new_stock_basic + + code, + name, + industry_id, + industry_name, + market, + list_date, + status, + create_by, + create_time, + update_by, + update_time, + remark, + + + #{code}, + #{name}, + #{industryId}, + #{industryName}, + #{market}, + #{listDate}, + #{status}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + + + + + update new_stock_basic + + code = #{code}, + name = #{name}, + industry_id = #{industryId}, + industry_name = #{industryName}, + market = #{market}, + list_date = #{listDate}, + status = #{status}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + + where id = #{id} + + + + delete from new_stock_basic where id = #{id} + + + + delete from new_stock_basic where id in + + #{id} + + + + + 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 + + (#{item.code}, #{item.name}, #{item.industryId}, #{item.industryName}, #{item.market}, #{item.listDate}, #{item.status}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.remark}) + + + \ No newline at end of file diff --git a/newstock-system/src/main/resources/mapper/newstocksystem/NewStockIndustryMapper.xml b/newstock-system/src/main/resources/mapper/newstocksystem/NewStockIndustryMapper.xml new file mode 100644 index 0000000..62eed7f --- /dev/null +++ b/newstock-system/src/main/resources/mapper/newstocksystem/NewStockIndustryMapper.xml @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + select industry_id, industry_code, industry_name, level, parent_id, create_by, create_time, update_by, update_time, remark from new_stock_industry + + + + + + + + + + insert into new_stock_industry + + industry_code, + industry_name, + level, + parent_id, + create_by, + create_time, + update_by, + update_time, + remark, + + + #{industryCode}, + #{industryName}, + #{level}, + #{parentId}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + + + + + update new_stock_industry + + industry_code = #{industryCode}, + industry_name = #{industryName}, + level = #{level}, + parent_id = #{parentId}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + + where industry_id = #{industryId} + + + + delete from new_stock_industry where industry_id = #{industryId} + + + + delete from new_stock_industry where industry_id in + + #{industryId} + + + + + insert into new_stock_industry(industry_code, industry_name, level, parent_id, create_by, create_time, update_by, update_time, remark) + values + + (#{item.industryCode}, #{item.industryName}, #{item.level}, #{item.parentId}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.remark}) + + + \ No newline at end of file diff --git a/stock-system/src/main/resources/mapper/stocksystem/NewStocksMapper.xml b/newstock-system/src/main/resources/mapper/newstocksystem/NewStocksMapper.xml similarity index 51% rename from stock-system/src/main/resources/mapper/stocksystem/NewStocksMapper.xml rename to newstock-system/src/main/resources/mapper/newstocksystem/NewStocksMapper.xml index 6f8ddb7..2e45278 100644 --- a/stock-system/src/main/resources/mapper/stocksystem/NewStocksMapper.xml +++ b/newstock-system/src/main/resources/mapper/newstocksystem/NewStocksMapper.xml @@ -2,9 +2,8 @@ - - - + + @@ -27,8 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - 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 + 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 - and code = #{code} - + and trade_date = #{tradeDate} + + and change_rate = #{changeRate} + order by trade_date desc, code - 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 left join new_stock_basic b on s.code = b.code @@ -58,41 +59,92 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and s.code = #{code} - - and b.name like concat('%', #{name}, '%') - - + and s.trade_date = #{tradeDate} and s.change_rate = #{changeRate} - - and b.industry_id = #{industryId} + + and b.name like concat('%', #{name}, '%') + + + and i.industry_name like concat('%', #{industryName}, '%') order by s.trade_date desc, s.code - + 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 + left join new_stock_basic b on s.code = b.code + left join new_stock_industry i on b.industry_id = i.industry_id + + + and s.trade_date = #{tradeDate} + + + and i.industry_name like concat('%', #{industryName}, '%') + + + order by s.change_rate_20 desc, s.change_rate_10 desc + limit 100 - + 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 + left join new_stock_basic b on s.code = b.code + left join new_stock_industry i on b.industry_id = i.industry_id + + + and s.trade_date = #{tradeDate} + + + and i.industry_name like concat('%', #{industryName}, '%') + + and s.change_rate >= 9.8 + + order by s.change_rate desc - - 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 - ) values ( - #{code}, #{tradeDate}, #{open}, #{close}, #{changeRate}, #{tradeDays}, #{volume}, #{amount}, #{changeRate10}, #{changeRate20}, #{changeRate60}, #{avgVolume20}, #{freeFloatMarketValue}, #{totalMarketValue}, #{agenciesHold} - ) + + 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, + + + #{code}, + #{tradeDate}, + #{open}, + #{close}, + #{changeRate}, + #{tradeDays}, + #{volume}, + #{amount}, + #{changeRate10}, + #{changeRate20}, + #{changeRate60}, + #{avgVolume20}, + #{freeFloatMarketValue}, + #{totalMarketValue}, + #{agenciesHold}, + @@ -106,11 +158,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + update new_stocks - + code = #{code}, - trade_date = #{tradeDate}, + trade_date = #{tradeDate}, open = #{open}, close = #{close}, change_rate = #{changeRate}, @@ -124,7 +176,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" free_float_market_value = #{freeFloatMarketValue}, total_market_value = #{totalMarketValue}, agencies_hold = #{agenciesHold}, - + where id = #{id} @@ -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 in #{id} @@ -143,5 +195,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where code = #{code} and trade_date = #{tradeDate} - \ No newline at end of file diff --git a/pom.xml b/pom.xml index ef126d9..a16b39b 100644 --- a/pom.xml +++ b/pom.xml @@ -218,6 +218,12 @@ ${ruoyi.version} + + com.ruoyi + newstock-system + ${ruoyi.version} + + @@ -229,6 +235,7 @@ ruoyi-generator ruoyi-common stock-system + newstock-system book-system pom diff --git a/ruoyi-admin/pom.xml b/ruoyi-admin/pom.xml index 6e15b49..25d1299 100644 --- a/ruoyi-admin/pom.xml +++ b/ruoyi-admin/pom.xml @@ -67,6 +67,11 @@ stock-system + + com.ruoyi + newstock-system + + com.ruoyi book-system diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index ac23a28..c847e92 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -37,7 +37,11 @@ server: logging: level: 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: diff --git a/ruoyi-ui/src/api/stocksystem/newstocks.js b/ruoyi-ui/src/api/newstocksystem/newstocks.js similarity index 73% rename from ruoyi-ui/src/api/stocksystem/newstocks.js rename to ruoyi-ui/src/api/newstocksystem/newstocks.js index 9da4d84..87dd97f 100644 --- a/ruoyi-ui/src/api/stocksystem/newstocks.js +++ b/ruoyi-ui/src/api/newstocksystem/newstocks.js @@ -5,7 +5,7 @@ export default { // 查询行情数据列表 listNewStocks(query) { return request({ - url: '/stocksystem/newstocks/list', + url: '/newstocksystem/newstocks/list', method: 'get', params: query }) @@ -14,7 +14,7 @@ export default { // 查询行情数据列表含基础数据 listNewStocksB(query) { return request({ - url: '/stocksystem/newstocks/listB', + url: '/newstocksystem/newstocks/listB', method: 'get', params: query }) @@ -23,7 +23,7 @@ export default { // 查询强势股列表 listNewStrongStocks(query) { return request({ - url: '/stocksystem/newstocks/listStrongStocks', + url: '/newstocksystem/newstocks/listStrongStocks', method: 'get', params: query }) @@ -32,7 +32,7 @@ export default { // 查询涨停股列表 listNewLimitStocks(query) { return request({ - url: '/stocksystem/newstocks/listLimitStocks', + url: '/newstocksystem/newstocks/listLimitStocks', method: 'get', params: query }) @@ -41,7 +41,7 @@ export default { // 获取行情数据详细信息 getNewStocks(id) { return request({ - url: `/stocksystem/newstocks/${id}`, + url: `/newstocksystem/newstocks/${id}`, method: 'get' }) }, @@ -49,7 +49,7 @@ export default { // 新增行情数据 addNewStocks(data) { return request({ - url: '/stocksystem/newstocks', + url: '/newstocksystem/newstocks', method: 'post', data: data }) @@ -58,7 +58,7 @@ export default { // 修改行情数据 updateNewStocks(data) { return request({ - url: '/stocksystem/newstocks', + url: '/newstocksystem/newstocks', method: 'put', data: data }) @@ -67,7 +67,7 @@ export default { // 删除行情数据 deleteNewStocks(ids) { return request({ - url: `/stocksystem/newstocks/${ids}`, + url: `/newstocksystem/newstocks/${ids}`, method: 'delete' }) }, @@ -75,7 +75,7 @@ export default { // 导出行情数据 exportNewStocks(query) { return request({ - url: '/stocksystem/newstocks/export', + url: '/newstocksystem/newstocks/export', method: 'post', params: query, responseType: 'blob' @@ -85,7 +85,7 @@ export default { // 导入行情数据 importNewStocks(data) { return request({ - url: '/stocksystem/newstocks/importData', + url: '/newstocksystem/newstocks/importData', method: 'post', data: data }) @@ -94,7 +94,7 @@ export default { // 分析行情数据 analyzeNewStocks(data) { return request({ - url: '/stocksystem/newstocks/analyze', + url: '/newstocksystem/newstocks/analyze', method: 'post', data: data }) @@ -103,7 +103,7 @@ export default { // 获取联想的数据(股票代码) stockQueryData(query) { return request({ - url: '/stocksystem/newstocks/stockQueryData', + url: '/newstocksystem/newstocks/stockQueryData', method: 'get', params: { query } }) @@ -112,7 +112,7 @@ export default { // 获取联想的数据(股票名称) stockNameQueryData(query) { return request({ - url: '/stocksystem/newstocks/stockNameQueryData', + url: '/newstocksystem/newstocks/stockNameQueryData', method: 'get', params: { query } }) diff --git a/ruoyi-ui/src/views/stocksystem/newstocks.vue b/ruoyi-ui/src/views/newstocksystem/newstocks.vue similarity index 97% rename from ruoyi-ui/src/views/stocksystem/newstocks.vue rename to ruoyi-ui/src/views/newstocksystem/newstocks.vue index 1758494..cd258ee 100644 --- a/ruoyi-ui/src/views/stocksystem/newstocks.vue +++ b/ruoyi-ui/src/views/newstocksystem/newstocks.vue @@ -52,7 +52,7 @@ icon="el-icon-plus" size="mini" @click="handleAdd" - v-hasPermi="['stocksystem:newstocks:add']" + v-hasPermi="['newstocksystem:newstocks:add']" >新增 @@ -63,7 +63,7 @@ size="mini" :disabled="single" @click="handleUpdate" - v-hasPermi="['stocksystem:newstocks:edit']" + v-hasPermi="['newstocksystem:newstocks:edit']" >修改 @@ -74,7 +74,7 @@ size="mini" :disabled="multiple" @click="handleDelete" - v-hasPermi="['stocksystem:newstocks:remove']" + v-hasPermi="['newstocksystem:newstocks:remove']" >删除 @@ -84,7 +84,7 @@ icon="el-icon-download" size="mini" @click="handleExport" - v-hasPermi="['stocksystem:newstocks:export']" + v-hasPermi="['newstocksystem:newstocks:export']" >导出 @@ -116,14 +116,14 @@ type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" - v-hasPermi="['stocksystem:newstocks:edit']" + v-hasPermi="['newstocksystem:newstocks:edit']" >修改 删除 @@ -254,7 +254,7 @@ import { getToken } from '@/utils/auth' import { parseTime } from '@/utils/ruoyi' import request from '@/utils/request' -import newstocksApi from '@/api/stocksystem/newstocks' +import newstocksApi from '@/api/newstocksystem/newstocks' export default { name: 'NewStocks', @@ -319,7 +319,7 @@ export default { // 交易日期 tradeDate: new Date().toISOString().split('T')[0], // 查询参数 - url: '/stocksystem/newstocks/importData' + url: '/newstocksystem/newstocks/importData' }, // 文件上传 fileList: [] @@ -529,4 +529,4 @@ export default { .fixed-width { width: 150px; } - + \ No newline at end of file diff --git a/stock-system/src/main/resources/mapper/stocksystem/NewStockBasicMapper.xml b/stock-system/src/main/resources/mapper/stocksystem/NewStockBasicMapper.xml deleted file mode 100644 index 14013f9..0000000 --- a/stock-system/src/main/resources/mapper/stocksystem/NewStockBasicMapper.xml +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - - - - - - - - - select id, code, name, industry_id, list_date, market_type, status - from new_stock_basic - - - - - - - - - - insert into new_stock_basic( - code, name, industry_id, list_date, market_type, status - ) values ( - #{code}, #{name}, #{industryId}, #{listDate}, #{marketType}, #{status} - ) - - - - insert into new_stock_basic( - code, name, industry_id, list_date, market_type, status - ) values - - ( - #{item.code}, #{item.name}, #{item.industryId}, #{item.listDate}, #{item.marketType}, #{item.status} - ) - - - - - update new_stock_basic - - name = #{name}, - industry_id = #{industryId}, - list_date = #{listDate}, - market_type = #{marketType}, - status = #{status}, - - where code = #{code} - - - - delete from new_stock_basic where id = #{id} - - - - delete from new_stock_basic where code = #{code} - - - - delete from new_stock_basic where id in - - #{id} - - - - \ No newline at end of file diff --git a/stock-system/src/main/resources/mapper/stocksystem/NewStockIndustryMapper.xml b/stock-system/src/main/resources/mapper/stocksystem/NewStockIndustryMapper.xml deleted file mode 100644 index 8ff688a..0000000 --- a/stock-system/src/main/resources/mapper/stocksystem/NewStockIndustryMapper.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - select industry_id, industry_level, industry_code, industry_name, parent_code - from new_stock_industry - - - - - - - - insert into new_stock_industry( - industry_id, industry_level, industry_code, industry_name, parent_code - ) values ( - #{industryId}, #{industryLevel}, #{industryCode}, #{industryName}, #{parentCode} - ) - - - - insert into new_stock_industry( - industry_id, industry_level, industry_code, industry_name, parent_code - ) values - - ( - #{item.industryId}, #{item.industryLevel}, #{item.industryCode}, #{item.industryName}, #{item.parentCode} - ) - - - - - update new_stock_industry - - industry_level = #{industryLevel}, - industry_code = #{industryCode}, - industry_name = #{industryName}, - parent_code = #{parentCode}, - - where industry_id = #{industryId} - - - - delete from new_stock_industry where industry_id = #{industryId} - - - - delete from new_stock_industry where industry_id in - - #{industryId} - - - - \ No newline at end of file