parent
8977d0ff84
commit
f2e36a3ecb
@ -0,0 +1,147 @@
|
||||
erDiagram
|
||||
stock_industry {
|
||||
INT industry_id PK
|
||||
TINYINT industry_level
|
||||
VARCHAR(20) industry_code UK
|
||||
VARCHAR(50) industry_name
|
||||
VARCHAR(20) parent_code
|
||||
}
|
||||
|
||||
stock_basic {
|
||||
INT id PK
|
||||
VARCHAR(10) code UK
|
||||
VARCHAR(20) name
|
||||
INT industry_id FK
|
||||
DATE list_date
|
||||
VARCHAR(10) market_type
|
||||
TINYINT status
|
||||
}
|
||||
|
||||
stock_financial {
|
||||
INT id PK
|
||||
VARCHAR(10) code FK
|
||||
DATE period
|
||||
DECIMAL net_profit_yoy
|
||||
DECIMAL net_profit_qoq
|
||||
DECIMAL roe
|
||||
DECIMAL eps
|
||||
DECIMAL net_profit
|
||||
DECIMAL basic_eps
|
||||
DECIMAL bps
|
||||
DECIMAL total_assets
|
||||
DECIMAL total_liabilities
|
||||
DECIMAL operating_income
|
||||
DATETIME create_time
|
||||
}
|
||||
|
||||
stock_index {
|
||||
INT id PK
|
||||
VARCHAR(10) code
|
||||
VARCHAR(20) name
|
||||
DATE trade_date
|
||||
DECIMAL open
|
||||
DECIMAL close
|
||||
DECIMAL high
|
||||
DECIMAL low
|
||||
DECIMAL change_rate
|
||||
BIGINT volume
|
||||
DECIMAL amount
|
||||
DATETIME create_time
|
||||
}
|
||||
|
||||
stocks {
|
||||
INT id PK
|
||||
VARCHAR(10) code FK
|
||||
DATE trade_date
|
||||
DECIMAL open
|
||||
DECIMAL close
|
||||
DECIMAL change_rate
|
||||
INT trade_days
|
||||
BIGINT volume
|
||||
DECIMAL amount
|
||||
DECIMAL change_rate_10
|
||||
DECIMAL change_rate_20
|
||||
DECIMAL change_rate_60
|
||||
DECIMAL avg_volume_20
|
||||
DECIMAL free_float_market_value
|
||||
DECIMAL total_market_value
|
||||
DECIMAL agencies_hold
|
||||
DATETIME create_time
|
||||
}
|
||||
|
||||
stock_trend {
|
||||
INT id PK
|
||||
VARCHAR(10) code FK
|
||||
DATE trade_date
|
||||
DECIMAL ma5
|
||||
DECIMAL ma10
|
||||
DECIMAL ma20
|
||||
DECIMAL ma60
|
||||
DECIMAL macd
|
||||
DECIMAL kdj_k
|
||||
DECIMAL kdj_d
|
||||
DECIMAL kdj_j
|
||||
DECIMAL rsi
|
||||
DECIMAL volume_ratio
|
||||
DECIMAL turnover_rate
|
||||
DATETIME create_time
|
||||
}
|
||||
|
||||
stock_limit {
|
||||
INT id PK
|
||||
VARCHAR(10) code FK
|
||||
DATE trade_date
|
||||
TINYINT limit_type
|
||||
DECIMAL limit_price
|
||||
DECIMAL open_price
|
||||
DECIMAL close_price
|
||||
BIGINT volume
|
||||
DECIMAL amount
|
||||
DATETIME create_time
|
||||
}
|
||||
|
||||
stock_new_record {
|
||||
INT id PK
|
||||
VARCHAR(10) code FK
|
||||
DATE trade_date
|
||||
TINYINT record_type
|
||||
DECIMAL price
|
||||
INT days
|
||||
DATETIME create_time
|
||||
}
|
||||
|
||||
trade_dates {
|
||||
INT id PK
|
||||
DATE trade_date UK
|
||||
TINYINT is_trading
|
||||
SMALLINT year
|
||||
TINYINT month
|
||||
TINYINT day
|
||||
TINYINT weekday
|
||||
TINYINT is_weekend
|
||||
TINYINT is_holiday
|
||||
DATETIME create_time
|
||||
}
|
||||
|
||||
industry_trend {
|
||||
INT id PK
|
||||
INT industry_id FK
|
||||
DATE trade_date
|
||||
DECIMAL avg_change_rate
|
||||
INT up_stocks_count
|
||||
INT down_stocks_count
|
||||
INT flat_stocks_count
|
||||
INT limit_up_count
|
||||
INT limit_down_count
|
||||
DECIMAL total_market_value
|
||||
DECIMAL avg_turnover_rate
|
||||
DATETIME create_time
|
||||
}
|
||||
|
||||
stock_basic ||--o{ stock_industry : belongs_to
|
||||
stock_financial ||--o{ stock_basic : belongs_to
|
||||
stocks ||--o{ stock_basic : belongs_to
|
||||
stock_trend ||--o{ stock_basic : belongs_to
|
||||
stock_limit ||--o{ stock_basic : belongs_to
|
||||
stock_new_record ||--o{ stock_basic : belongs_to
|
||||
industry_trend ||--o{ stock_industry : belongs_to
|
||||
@ -0,0 +1,6 @@
|
||||
股票代码,股票名称,行业ID,行业名称,行业级别,行业代码,父行业代码,首发上市日期,市场类型,状态,交易日期,开盘价,收盘价,涨跌停类型,涨跌停价格,当日涨跌幅,可交易日数,成交量,成交额,10日区间涨跌幅,20日区间涨跌幅,60日区间涨跌幅,20日区间平均成交量,自由流通市值,总市值,机构持仓合计
|
||||
600000,浦发银行,1,银行,1,BK0475,0,1999-11-10,SH,1,2026-01-18,8.50,8.65,0,0,1.76,240,12500000,108125000,5.20,8.75,15.30,11000000,280000000000,320000000000,25.50
|
||||
600519,贵州茅台,2,白酒,1,BK0477,0,2001-08-27,SH,1,2026-01-18,1850.00,1880.50,1,1880.50,1.65,240,25000,47012500,4.80,7.20,12.50,22000,2400000000000,2600000000000,45.80
|
||||
000001,平安银行,1,银行,1,BK0475,0,1991-04-03,SZ,1,2026-01-18,12.80,13.05,0,0,1.92,240,8500000,110925000,6.10,9.30,18.70,7800000,350000000000,380000000000,30.20
|
||||
000858,五粮液,2,白酒,1,BK0477,0,1998-04-27,SZ,1,2026-01-18,168.50,172.20,1,172.20,2.20,240,1500000,258300000,5.50,8.10,14.20,1350000,850000000000,920000000000,38.50
|
||||
601318,中国平安,3,保险,1,BK0474,0,2007-03-01,SH,1,2026-01-18,48.20,49.50,-1,49.50,2.71,240,3200000,158400000,7.30,10.50,20.10,2900000,420000000000,480000000000,32.80
|
||||
Binary file not shown.
@ -0,0 +1,120 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 导出API
|
||||
export default {
|
||||
// 查询行情数据列表
|
||||
listNewStocks(query) {
|
||||
return request({
|
||||
url: '/stocksystem/newstocks/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
},
|
||||
|
||||
// 查询行情数据列表含基础数据
|
||||
listNewStocksB(query) {
|
||||
return request({
|
||||
url: '/stocksystem/newstocks/listB',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
},
|
||||
|
||||
// 查询强势股列表
|
||||
listNewStrongStocks(query) {
|
||||
return request({
|
||||
url: '/stocksystem/newstocks/listStrongStocks',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
},
|
||||
|
||||
// 查询涨停股列表
|
||||
listNewLimitStocks(query) {
|
||||
return request({
|
||||
url: '/stocksystem/newstocks/listLimitStocks',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
},
|
||||
|
||||
// 获取行情数据详细信息
|
||||
getNewStocks(id) {
|
||||
return request({
|
||||
url: `/stocksystem/newstocks/${id}`,
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
|
||||
// 新增行情数据
|
||||
addNewStocks(data) {
|
||||
return request({
|
||||
url: '/stocksystem/newstocks',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
},
|
||||
|
||||
// 修改行情数据
|
||||
updateNewStocks(data) {
|
||||
return request({
|
||||
url: '/stocksystem/newstocks',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
},
|
||||
|
||||
// 删除行情数据
|
||||
deleteNewStocks(ids) {
|
||||
return request({
|
||||
url: `/stocksystem/newstocks/${ids}`,
|
||||
method: 'delete'
|
||||
})
|
||||
},
|
||||
|
||||
// 导出行情数据
|
||||
exportNewStocks(query) {
|
||||
return request({
|
||||
url: '/stocksystem/newstocks/export',
|
||||
method: 'post',
|
||||
params: query,
|
||||
responseType: 'blob'
|
||||
})
|
||||
},
|
||||
|
||||
// 导入行情数据
|
||||
importNewStocks(data) {
|
||||
return request({
|
||||
url: '/stocksystem/newstocks/importData',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
},
|
||||
|
||||
// 分析行情数据
|
||||
analyzeNewStocks(data) {
|
||||
return request({
|
||||
url: '/stocksystem/newstocks/analyze',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
},
|
||||
|
||||
// 获取联想的数据(股票代码)
|
||||
stockQueryData(query) {
|
||||
return request({
|
||||
url: '/stocksystem/newstocks/stockQueryData',
|
||||
method: 'get',
|
||||
params: { query }
|
||||
})
|
||||
},
|
||||
|
||||
// 获取联想的数据(股票名称)
|
||||
stockNameQueryData(query) {
|
||||
return request({
|
||||
url: '/stocksystem/newstocks/stockNameQueryData',
|
||||
method: 'get',
|
||||
params: { query }
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,194 @@
|
||||
package com.ruoyi.stocksystem.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 org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
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.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
* 行情数据Controller
|
||||
*
|
||||
* @author lxy
|
||||
* @date 2026-01-18
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/stocksystem/newstocks")
|
||||
public class NewStocksController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private INewStocksService newStocksService;
|
||||
|
||||
@Autowired
|
||||
private INewStockBasicService newStockBasicService;
|
||||
|
||||
/**
|
||||
* 查询行情数据列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(NewStocks newStocks)
|
||||
{
|
||||
startPage();
|
||||
List<NewStocks> list = newStocksService.selectNewStocksList(newStocks);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询行情数据列表含基础数据
|
||||
*/
|
||||
@GetMapping("/listB")
|
||||
public TableDataInfo listB(NewStocks newStocks)
|
||||
{
|
||||
startPage();
|
||||
List<NewStocks> list = newStocksService.selectNewStocksListB(newStocks);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询强势股列表
|
||||
*/
|
||||
@GetMapping("/listStrongStocks")
|
||||
public TableDataInfo listStrongStocks(NewStocks newStocks)
|
||||
{
|
||||
startPage();
|
||||
List<NewStocks> list = newStocksService.selectNewStrongStocksList(newStocks);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询涨停股列表
|
||||
*/
|
||||
@GetMapping("/listLimitStocks")
|
||||
public TableDataInfo listLimitStocks(NewStocks newStocks)
|
||||
{
|
||||
startPage();
|
||||
List<NewStocks> list = newStocksService.selectNewLimitStocksList(newStocks);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出行情数据列表
|
||||
*/
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, NewStocks newStocks)
|
||||
{
|
||||
List<NewStocks> list = newStocksService.selectNewStocksList(newStocks);
|
||||
ExcelUtil<NewStocks> util = new ExcelUtil<NewStocks>(NewStocks.class);
|
||||
util.exportExcel(response, list, "行情数据数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取行情数据详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Integer id)
|
||||
{
|
||||
return AjaxResult.success(newStocksService.selectNewStocksById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增行情数据
|
||||
*/
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody NewStocks newStocks)
|
||||
{
|
||||
return toAjax(newStocksService.insertNewStocks(newStocks));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改行情数据
|
||||
*/
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody NewStocks newStocks)
|
||||
{
|
||||
return toAjax(newStocksService.updateNewStocks(newStocks));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除行情数据
|
||||
*/
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Integer[] ids)
|
||||
{
|
||||
return toAjax(newStocksService.deleteNewStocksByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入行情数据
|
||||
*/
|
||||
@PostMapping("/importData")
|
||||
public AjaxResult importData(MultipartFile file, boolean updateSupport, String tradeDate)
|
||||
{
|
||||
ExcelUtil<NewStocks> util = new ExcelUtil<NewStocks>(NewStocks.class);
|
||||
try
|
||||
{
|
||||
List<NewStocks> newStocksList = util.importExcel(file.getInputStream());
|
||||
int successNum = newStocksService.importNewStocks(newStocksList, tradeDate);
|
||||
return AjaxResult.success("导入成功 " + successNum + " 条数据");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return AjaxResult.error("导入失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 分析行情数据
|
||||
*/
|
||||
@PostMapping("/analyze")
|
||||
public AjaxResult analyze(@RequestBody NewStocks newStocks)
|
||||
{
|
||||
Object result = newStocksService.analyzeNewStocks(newStocks);
|
||||
return AjaxResult.success(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取联想的数据(股票代码)
|
||||
*/
|
||||
@GetMapping("/stockQueryData")
|
||||
public AjaxResult stockQueryData(String query)
|
||||
{
|
||||
NewStockBasic newStockBasic = new NewStockBasic();
|
||||
if (StringUtils.isNotEmpty(query))
|
||||
{
|
||||
newStockBasic.setCode(query);
|
||||
}
|
||||
List<NewStockBasic> list = newStockBasicService.selectNewStockBasicList(newStockBasic);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取联想的数据(股票名称)
|
||||
*/
|
||||
@GetMapping("/stockNameQueryData")
|
||||
public AjaxResult stockNameQueryData(String query)
|
||||
{
|
||||
NewStockBasic newStockBasic = new NewStockBasic();
|
||||
if (StringUtils.isNotEmpty(query))
|
||||
{
|
||||
newStockBasic.setName(query);
|
||||
}
|
||||
List<NewStockBasic> list = newStockBasicService.selectNewStockBasicList(newStockBasic);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,379 @@
|
||||
package com.ruoyi.stocksystem.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 行情数据实体类
|
||||
*
|
||||
* @author lxy
|
||||
* @date 2026-01-18
|
||||
*/
|
||||
public class NewStocks extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Integer id;
|
||||
|
||||
/** 股票代码 */
|
||||
@Excel(name = "证券代码", sort = 1, type = Excel.Type.ALL)
|
||||
private String code;
|
||||
|
||||
/** 交易日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "交易日期", sort = 2, type = Excel.Type.ALL, dateFormat = "yyyy-MM-dd")
|
||||
private Date tradeDate;
|
||||
|
||||
/** 开盘价 */
|
||||
@Excel(name = "开盘价", sort = 3, type = Excel.Type.ALL)
|
||||
private BigDecimal open;
|
||||
|
||||
/** 收盘价 */
|
||||
@Excel(name = "收盘价", sort = 4, type = Excel.Type.ALL)
|
||||
private BigDecimal close;
|
||||
|
||||
/** 当日涨跌幅 */
|
||||
@Excel(name = "当日涨跌幅", sort = 5, type = Excel.Type.ALL)
|
||||
private BigDecimal changeRate;
|
||||
|
||||
/** 可交易日数 */
|
||||
@Excel(name = "可交易日数", sort = 6, type = Excel.Type.ALL)
|
||||
private Integer tradeDays;
|
||||
|
||||
/** 成交量 */
|
||||
@Excel(name = "成交量", sort = 7, type = Excel.Type.ALL)
|
||||
private Long volume;
|
||||
|
||||
/** 成交额 */
|
||||
@Excel(name = "成交额", sort = 8, type = Excel.Type.ALL)
|
||||
private BigDecimal amount;
|
||||
|
||||
/** 10日区间涨跌幅 */
|
||||
@Excel(name = "10日区间涨跌幅", sort = 9, type = Excel.Type.ALL)
|
||||
private BigDecimal changeRate10;
|
||||
|
||||
/** 20日区间涨跌幅 */
|
||||
@Excel(name = "20日区间涨跌幅", sort = 10, type = Excel.Type.ALL)
|
||||
private BigDecimal changeRate20;
|
||||
|
||||
/** 60日区间涨跌幅 */
|
||||
@Excel(name = "60日区间涨跌幅", sort = 11, type = Excel.Type.ALL)
|
||||
private BigDecimal changeRate60;
|
||||
|
||||
/** 20日区间平均成交量 */
|
||||
@Excel(name = "20日区间平均成交量", sort = 12, type = Excel.Type.ALL)
|
||||
private BigDecimal avgVolume20;
|
||||
|
||||
/** 自由流通市值 */
|
||||
@Excel(name = "自由流通市值", sort = 13, type = Excel.Type.ALL)
|
||||
private BigDecimal freeFloatMarketValue;
|
||||
|
||||
/** 总市值 */
|
||||
@Excel(name = "总市值", sort = 14, type = Excel.Type.ALL)
|
||||
private BigDecimal totalMarketValue;
|
||||
|
||||
/** 机构持仓合计 */
|
||||
@Excel(name = "机构持仓合计", sort = 15, type = Excel.Type.ALL)
|
||||
private BigDecimal agenciesHold;
|
||||
|
||||
// 关联字段,非数据库字段
|
||||
@Excel(name = "证券名称", sort = 16, type = Excel.Type.ALL)
|
||||
private String name;
|
||||
@Excel(name = "行业ID", sort = 17, type = Excel.Type.ALL)
|
||||
private Integer industryId;
|
||||
@Excel(name = "所属东财行业指数2级", sort = 18, type = Excel.Type.ALL)
|
||||
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)
|
||||
private String industryCode;
|
||||
@Excel(name = "父行业代码", sort = 21, type = Excel.Type.ALL)
|
||||
private String parentCode;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "上市日期", sort = 22, type = Excel.Type.ALL, dateFormat = "yyyy-MM-dd")
|
||||
private Date listDate;
|
||||
@Excel(name = "市场类型", sort = 23, type = Excel.Type.ALL)
|
||||
private String marketType;
|
||||
@Excel(name = "状态", sort = 24, type = Excel.Type.ALL)
|
||||
private Integer status;
|
||||
@Excel(name = "涨跌停类型", sort = 25, type = Excel.Type.ALL)
|
||||
private Integer limitType;
|
||||
@Excel(name = "涨跌停价格", sort = 26, type = Excel.Type.ALL)
|
||||
private BigDecimal limitPrice;
|
||||
|
||||
public void setId(Integer id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setCode(String code)
|
||||
{
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getCode()
|
||||
{
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setTradeDate(Date tradeDate)
|
||||
{
|
||||
this.tradeDate = tradeDate;
|
||||
}
|
||||
|
||||
public Date getTradeDate()
|
||||
{
|
||||
return tradeDate;
|
||||
}
|
||||
|
||||
public void setOpen(BigDecimal open)
|
||||
{
|
||||
this.open = open;
|
||||
}
|
||||
|
||||
public BigDecimal getOpen()
|
||||
{
|
||||
return open;
|
||||
}
|
||||
|
||||
public void setClose(BigDecimal close)
|
||||
{
|
||||
this.close = close;
|
||||
}
|
||||
|
||||
public BigDecimal getClose()
|
||||
{
|
||||
return close;
|
||||
}
|
||||
|
||||
public void setChangeRate(BigDecimal changeRate)
|
||||
{
|
||||
this.changeRate = changeRate;
|
||||
}
|
||||
|
||||
public BigDecimal getChangeRate()
|
||||
{
|
||||
return changeRate;
|
||||
}
|
||||
|
||||
public void setTradeDays(Integer tradeDays)
|
||||
{
|
||||
this.tradeDays = tradeDays;
|
||||
}
|
||||
|
||||
public Integer getTradeDays()
|
||||
{
|
||||
return tradeDays;
|
||||
}
|
||||
|
||||
public void setVolume(Long volume)
|
||||
{
|
||||
this.volume = volume;
|
||||
}
|
||||
|
||||
public Long getVolume()
|
||||
{
|
||||
return volume;
|
||||
}
|
||||
|
||||
public void setAmount(BigDecimal amount)
|
||||
{
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public BigDecimal getAmount()
|
||||
{
|
||||
return amount;
|
||||
}
|
||||
|
||||
public void setChangeRate10(BigDecimal changeRate10)
|
||||
{
|
||||
this.changeRate10 = changeRate10;
|
||||
}
|
||||
|
||||
public BigDecimal getChangeRate10()
|
||||
{
|
||||
return changeRate10;
|
||||
}
|
||||
|
||||
public void setChangeRate20(BigDecimal changeRate20)
|
||||
{
|
||||
this.changeRate20 = changeRate20;
|
||||
}
|
||||
|
||||
public BigDecimal getChangeRate20()
|
||||
{
|
||||
return changeRate20;
|
||||
}
|
||||
|
||||
public void setChangeRate60(BigDecimal changeRate60)
|
||||
{
|
||||
this.changeRate60 = changeRate60;
|
||||
}
|
||||
|
||||
public BigDecimal getChangeRate60()
|
||||
{
|
||||
return changeRate60;
|
||||
}
|
||||
|
||||
public void setAvgVolume20(BigDecimal avgVolume20)
|
||||
{
|
||||
this.avgVolume20 = avgVolume20;
|
||||
}
|
||||
|
||||
public BigDecimal getAvgVolume20()
|
||||
{
|
||||
return avgVolume20;
|
||||
}
|
||||
|
||||
public void setFreeFloatMarketValue(BigDecimal freeFloatMarketValue)
|
||||
{
|
||||
this.freeFloatMarketValue = freeFloatMarketValue;
|
||||
}
|
||||
|
||||
public BigDecimal getFreeFloatMarketValue()
|
||||
{
|
||||
return freeFloatMarketValue;
|
||||
}
|
||||
|
||||
public void setTotalMarketValue(BigDecimal totalMarketValue)
|
||||
{
|
||||
this.totalMarketValue = totalMarketValue;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalMarketValue()
|
||||
{
|
||||
return totalMarketValue;
|
||||
}
|
||||
|
||||
public void setAgenciesHold(BigDecimal agenciesHold)
|
||||
{
|
||||
this.agenciesHold = agenciesHold;
|
||||
}
|
||||
|
||||
public BigDecimal getAgenciesHold()
|
||||
{
|
||||
return agenciesHold;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Integer getIndustryId()
|
||||
{
|
||||
return industryId;
|
||||
}
|
||||
|
||||
public void setIndustryId(Integer industryId)
|
||||
{
|
||||
this.industryId = industryId;
|
||||
}
|
||||
|
||||
public String getIndustryName()
|
||||
{
|
||||
return industryName;
|
||||
}
|
||||
|
||||
public void setIndustryName(String industryName)
|
||||
{
|
||||
this.industryName = industryName;
|
||||
}
|
||||
|
||||
public Integer getIndustryLevel()
|
||||
{
|
||||
return industryLevel;
|
||||
}
|
||||
|
||||
public void setIndustryLevel(Integer industryLevel)
|
||||
{
|
||||
this.industryLevel = industryLevel;
|
||||
}
|
||||
|
||||
public String getIndustryCode()
|
||||
{
|
||||
return industryCode;
|
||||
}
|
||||
|
||||
public void setIndustryCode(String industryCode)
|
||||
{
|
||||
this.industryCode = industryCode;
|
||||
}
|
||||
|
||||
public String getParentCode()
|
||||
{
|
||||
return parentCode;
|
||||
}
|
||||
|
||||
public void setParentCode(String parentCode)
|
||||
{
|
||||
this.parentCode = parentCode;
|
||||
}
|
||||
|
||||
public Date getListDate()
|
||||
{
|
||||
return listDate;
|
||||
}
|
||||
|
||||
public void setListDate(Date listDate)
|
||||
{
|
||||
this.listDate = listDate;
|
||||
}
|
||||
|
||||
public String getMarketType()
|
||||
{
|
||||
return marketType;
|
||||
}
|
||||
|
||||
public void setMarketType(String marketType)
|
||||
{
|
||||
this.marketType = marketType;
|
||||
}
|
||||
|
||||
public Integer getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getLimitType()
|
||||
{
|
||||
return limitType;
|
||||
}
|
||||
|
||||
public void setLimitType(Integer limitType)
|
||||
{
|
||||
this.limitType = limitType;
|
||||
}
|
||||
|
||||
public BigDecimal getLimitPrice()
|
||||
{
|
||||
return limitPrice;
|
||||
}
|
||||
|
||||
public void setLimitPrice(BigDecimal limitPrice)
|
||||
{
|
||||
this.limitPrice = limitPrice;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,78 @@
|
||||
package com.ruoyi.stocksystem.domain.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.stocksystem.domain.NewStockBasic;
|
||||
|
||||
/**
|
||||
* 股票基础信息Service接口
|
||||
*
|
||||
* @author lxy
|
||||
* @date 2026-01-18
|
||||
*/
|
||||
public interface INewStockBasicService
|
||||
{
|
||||
/**
|
||||
* 查询股票基础信息
|
||||
*
|
||||
* @param id 股票基础信息主键
|
||||
* @return 股票基础信息
|
||||
*/
|
||||
public NewStockBasic selectNewStockBasicById(Integer id);
|
||||
|
||||
/**
|
||||
* 根据股票代码查询股票基础信息
|
||||
*
|
||||
* @param code 股票代码
|
||||
* @return 股票基础信息
|
||||
*/
|
||||
public NewStockBasic selectNewStockBasicByCode(String code);
|
||||
|
||||
/**
|
||||
* 查询股票基础信息列表
|
||||
*
|
||||
* @param newStockBasic 股票基础信息
|
||||
* @return 股票基础信息集合
|
||||
*/
|
||||
public List<NewStockBasic> selectNewStockBasicList(NewStockBasic newStockBasic);
|
||||
|
||||
/**
|
||||
* 新增股票基础信息
|
||||
*
|
||||
* @param newStockBasic 股票基础信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertNewStockBasic(NewStockBasic newStockBasic);
|
||||
|
||||
/**
|
||||
* 修改股票基础信息
|
||||
*
|
||||
* @param newStockBasic 股票基础信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateNewStockBasic(NewStockBasic newStockBasic);
|
||||
|
||||
/**
|
||||
* 删除股票基础信息
|
||||
*
|
||||
* @param id 股票基础信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNewStockBasicById(Integer id);
|
||||
|
||||
/**
|
||||
* 批量删除股票基础信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNewStockBasicByIds(Integer[] ids);
|
||||
|
||||
/**
|
||||
* 批量新增股票基础信息
|
||||
*
|
||||
* @param newStockBasicList 股票基础信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchInsertNewStockBasic(List<NewStockBasic> newStockBasicList);
|
||||
}
|
||||
@ -0,0 +1,78 @@
|
||||
package com.ruoyi.stocksystem.domain.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.stocksystem.domain.NewStockIndustry;
|
||||
|
||||
/**
|
||||
* 行业分类Service接口
|
||||
*
|
||||
* @author lxy
|
||||
* @date 2026-01-18
|
||||
*/
|
||||
public interface INewStockIndustryService
|
||||
{
|
||||
/**
|
||||
* 查询行业分类
|
||||
*
|
||||
* @param industryId 行业分类主键
|
||||
* @return 行业分类
|
||||
*/
|
||||
public NewStockIndustry selectNewStockIndustryById(Integer industryId);
|
||||
|
||||
/**
|
||||
* 根据行业代码查询行业分类
|
||||
*
|
||||
* @param industryCode 行业代码
|
||||
* @return 行业分类
|
||||
*/
|
||||
public NewStockIndustry selectNewStockIndustryByCode(String industryCode);
|
||||
|
||||
/**
|
||||
* 查询行业分类列表
|
||||
*
|
||||
* @param newStockIndustry 行业分类
|
||||
* @return 行业分类集合
|
||||
*/
|
||||
public List<NewStockIndustry> selectNewStockIndustryList(NewStockIndustry newStockIndustry);
|
||||
|
||||
/**
|
||||
* 新增行业分类
|
||||
*
|
||||
* @param newStockIndustry 行业分类
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertNewStockIndustry(NewStockIndustry newStockIndustry);
|
||||
|
||||
/**
|
||||
* 修改行业分类
|
||||
*
|
||||
* @param newStockIndustry 行业分类
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateNewStockIndustry(NewStockIndustry newStockIndustry);
|
||||
|
||||
/**
|
||||
* 删除行业分类
|
||||
*
|
||||
* @param industryId 行业分类主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNewStockIndustryById(Integer industryId);
|
||||
|
||||
/**
|
||||
* 批量删除行业分类
|
||||
*
|
||||
* @param industryIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNewStockIndustryByIds(Integer[] industryIds);
|
||||
|
||||
/**
|
||||
* 批量新增行业分类
|
||||
*
|
||||
* @param newStockIndustryList 行业分类集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchInsertNewStockIndustry(List<NewStockIndustry> newStockIndustryList);
|
||||
}
|
||||
@ -0,0 +1,111 @@
|
||||
package com.ruoyi.stocksystem.domain.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.stocksystem.domain.NewStocks;
|
||||
|
||||
/**
|
||||
* 行情数据Service接口
|
||||
*
|
||||
* @author lxy
|
||||
* @date 2026-01-18
|
||||
*/
|
||||
public interface INewStocksService
|
||||
{
|
||||
/**
|
||||
* 查询行情数据
|
||||
*
|
||||
* @param id 行情数据主键
|
||||
* @return 行情数据
|
||||
*/
|
||||
public NewStocks selectNewStocksById(Integer id);
|
||||
|
||||
/**
|
||||
* 查询行情数据列表
|
||||
*
|
||||
* @param newStocks 行情数据
|
||||
* @return 行情数据集合
|
||||
*/
|
||||
public List<NewStocks> selectNewStocksList(NewStocks newStocks);
|
||||
|
||||
/**
|
||||
* 查询行情数据列表含基础数据
|
||||
*
|
||||
* @param newStocks 行情数据
|
||||
* @return 行情数据集合
|
||||
*/
|
||||
public List<NewStocks> selectNewStocksListB(NewStocks newStocks);
|
||||
|
||||
/**
|
||||
* 查询强势股列表
|
||||
*
|
||||
* @param newStocks 行情数据
|
||||
* @return 行情数据集合
|
||||
*/
|
||||
public List<NewStocks> selectNewStrongStocksList(NewStocks newStocks);
|
||||
|
||||
/**
|
||||
* 查询涨停股列表
|
||||
*
|
||||
* @param newStocks 行情数据
|
||||
* @return 行情数据集合
|
||||
*/
|
||||
public List<NewStocks> selectNewLimitStocksList(NewStocks newStocks);
|
||||
|
||||
/**
|
||||
* 新增行情数据
|
||||
*
|
||||
* @param newStocks 行情数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertNewStocks(NewStocks newStocks);
|
||||
|
||||
/**
|
||||
* 批量新增行情数据
|
||||
*
|
||||
* @param newStocksList 行情数据集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchInsertNewStocks(List<NewStocks> newStocksList);
|
||||
|
||||
/**
|
||||
* 修改行情数据
|
||||
*
|
||||
* @param newStocks 行情数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateNewStocks(NewStocks newStocks);
|
||||
|
||||
/**
|
||||
* 删除行情数据
|
||||
*
|
||||
* @param id 行情数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNewStocksById(Integer id);
|
||||
|
||||
/**
|
||||
* 批量删除行情数据
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNewStocksByIds(Integer[] ids);
|
||||
|
||||
/**
|
||||
* 导入行情数据
|
||||
*
|
||||
* @param newStocksList 行情数据集合
|
||||
* @param tradeDate 交易日期
|
||||
* @return 结果
|
||||
*/
|
||||
public int importNewStocks(List<NewStocks> newStocksList, String tradeDate);
|
||||
|
||||
/**
|
||||
* 分析行情数据
|
||||
*
|
||||
* @param newStocks 行情数据
|
||||
* @return 分析结果
|
||||
*/
|
||||
public Object analyzeNewStocks(NewStocks newStocks);
|
||||
}
|
||||
@ -0,0 +1,78 @@
|
||||
package com.ruoyi.stocksystem.mapper;
|
||||
|
||||
import com.ruoyi.stocksystem.domain.NewStockBasic;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 股票基础信息Mapper接口
|
||||
*
|
||||
* @author lxy
|
||||
* @date 2026-01-18
|
||||
*/
|
||||
public interface NewStockBasicMapper
|
||||
{
|
||||
/**
|
||||
* 查询股票基础信息
|
||||
*
|
||||
* @param id 股票基础信息主键
|
||||
* @return 股票基础信息
|
||||
*/
|
||||
public NewStockBasic selectNewStockBasicById(Integer id);
|
||||
|
||||
/**
|
||||
* 根据股票代码查询股票基础信息
|
||||
*
|
||||
* @param code 股票代码
|
||||
* @return 股票基础信息
|
||||
*/
|
||||
public NewStockBasic selectNewStockBasicByCode(String code);
|
||||
|
||||
/**
|
||||
* 查询股票基础信息列表
|
||||
*
|
||||
* @param newStockBasic 股票基础信息
|
||||
* @return 股票基础信息集合
|
||||
*/
|
||||
public List<NewStockBasic> selectNewStockBasicList(NewStockBasic newStockBasic);
|
||||
|
||||
/**
|
||||
* 新增股票基础信息
|
||||
*
|
||||
* @param newStockBasic 股票基础信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertNewStockBasic(NewStockBasic newStockBasic);
|
||||
|
||||
/**
|
||||
* 修改股票基础信息
|
||||
*
|
||||
* @param newStockBasic 股票基础信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateNewStockBasic(NewStockBasic newStockBasic);
|
||||
|
||||
/**
|
||||
* 删除股票基础信息
|
||||
*
|
||||
* @param id 股票基础信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNewStockBasicById(Integer id);
|
||||
|
||||
/**
|
||||
* 批量删除股票基础信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNewStockBasicByIds(Integer[] ids);
|
||||
|
||||
/**
|
||||
* 批量新增股票基础信息
|
||||
*
|
||||
* @param newStockBasicList 股票基础信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchInsertNewStockBasic(List<NewStockBasic> newStockBasicList);
|
||||
}
|
||||
@ -0,0 +1,78 @@
|
||||
package com.ruoyi.stocksystem.mapper;
|
||||
|
||||
import com.ruoyi.stocksystem.domain.NewStockIndustry;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 行业分类Mapper接口
|
||||
*
|
||||
* @author lxy
|
||||
* @date 2026-01-18
|
||||
*/
|
||||
public interface NewStockIndustryMapper
|
||||
{
|
||||
/**
|
||||
* 查询行业分类
|
||||
*
|
||||
* @param industryId 行业分类主键
|
||||
* @return 行业分类
|
||||
*/
|
||||
public NewStockIndustry selectNewStockIndustryById(Integer industryId);
|
||||
|
||||
/**
|
||||
* 根据行业代码查询行业分类
|
||||
*
|
||||
* @param industryCode 行业代码
|
||||
* @return 行业分类
|
||||
*/
|
||||
public NewStockIndustry selectNewStockIndustryByCode(String industryCode);
|
||||
|
||||
/**
|
||||
* 查询行业分类列表
|
||||
*
|
||||
* @param newStockIndustry 行业分类
|
||||
* @return 行业分类集合
|
||||
*/
|
||||
public List<NewStockIndustry> selectNewStockIndustryList(NewStockIndustry newStockIndustry);
|
||||
|
||||
/**
|
||||
* 新增行业分类
|
||||
*
|
||||
* @param newStockIndustry 行业分类
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertNewStockIndustry(NewStockIndustry newStockIndustry);
|
||||
|
||||
/**
|
||||
* 修改行业分类
|
||||
*
|
||||
* @param newStockIndustry 行业分类
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateNewStockIndustry(NewStockIndustry newStockIndustry);
|
||||
|
||||
/**
|
||||
* 删除行业分类
|
||||
*
|
||||
* @param industryId 行业分类主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNewStockIndustryById(Integer industryId);
|
||||
|
||||
/**
|
||||
* 批量删除行业分类
|
||||
*
|
||||
* @param industryIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNewStockIndustryByIds(Integer[] industryIds);
|
||||
|
||||
/**
|
||||
* 批量新增行业分类
|
||||
*
|
||||
* @param newStockIndustryList 行业分类集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchInsertNewStockIndustry(List<NewStockIndustry> newStockIndustryList);
|
||||
}
|
||||
@ -0,0 +1,103 @@
|
||||
package com.ruoyi.stocksystem.mapper;
|
||||
|
||||
import com.ruoyi.stocksystem.domain.NewStocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 行情数据Mapper接口
|
||||
*
|
||||
* @author lxy
|
||||
* @date 2026-01-18
|
||||
*/
|
||||
public interface NewStocksMapper
|
||||
{
|
||||
/**
|
||||
* 查询行情数据
|
||||
*
|
||||
* @param id 行情数据主键
|
||||
* @return 行情数据
|
||||
*/
|
||||
public NewStocks selectNewStocksById(Integer id);
|
||||
|
||||
/**
|
||||
* 查询行情数据列表
|
||||
*
|
||||
* @param newStocks 行情数据
|
||||
* @return 行情数据集合
|
||||
*/
|
||||
public List<NewStocks> selectNewStocksList(NewStocks newStocks);
|
||||
|
||||
/**
|
||||
* 查询行情数据列表含基础数据
|
||||
*
|
||||
* @param newStocks 行情数据
|
||||
* @return 行情数据集合
|
||||
*/
|
||||
public List<NewStocks> selectNewStocksListB(NewStocks newStocks);
|
||||
|
||||
/**
|
||||
* 查询强势股列表
|
||||
*
|
||||
* @param newStocks 行情数据
|
||||
* @return 行情数据集合
|
||||
*/
|
||||
public List<NewStocks> selectNewStrongStocksList(NewStocks newStocks);
|
||||
|
||||
/**
|
||||
* 查询涨停股列表
|
||||
*
|
||||
* @param newStocks 行情数据
|
||||
* @return 行情数据集合
|
||||
*/
|
||||
public List<NewStocks> selectNewLimitStocksList(NewStocks newStocks);
|
||||
|
||||
/**
|
||||
* 新增行情数据
|
||||
*
|
||||
* @param newStocks 行情数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertNewStocks(NewStocks newStocks);
|
||||
|
||||
/**
|
||||
* 批量新增行情数据
|
||||
*
|
||||
* @param newStocksList 行情数据集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchInsertNewStocks(List<NewStocks> newStocksList);
|
||||
|
||||
/**
|
||||
* 修改行情数据
|
||||
*
|
||||
* @param newStocks 行情数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateNewStocks(NewStocks newStocks);
|
||||
|
||||
/**
|
||||
* 删除行情数据
|
||||
*
|
||||
* @param id 行情数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNewStocksById(Integer id);
|
||||
|
||||
/**
|
||||
* 批量删除行情数据
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNewStocksByIds(Integer[] ids);
|
||||
|
||||
/**
|
||||
* 根据股票代码和交易日期查询行情数据
|
||||
*
|
||||
* @param code 股票代码
|
||||
* @param tradeDate 交易日期
|
||||
* @return 行情数据
|
||||
*/
|
||||
public NewStocks selectNewStocksByCodeAndDate(String code, String tradeDate);
|
||||
}
|
||||
@ -0,0 +1,97 @@
|
||||
<?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>
|
||||
@ -0,0 +1,79 @@
|
||||
<?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>
|
||||
@ -0,0 +1,147 @@
|
||||
<?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.NewStocksMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.stocksystem.domain.NewStocks" id="NewStocksResult">
|
||||
<id property="id" column="id" />
|
||||
<result property="code" column="code" />
|
||||
<result property="tradeDate" column="trade_date" />
|
||||
<result property="open" column="open" />
|
||||
<result property="close" column="close" />
|
||||
<result property="changeRate" column="change_rate" />
|
||||
<result property="tradeDays" column="trade_days" />
|
||||
<result property="volume" column="volume" />
|
||||
<result property="amount" column="amount" />
|
||||
<result property="changeRate10" column="change_rate_10" />
|
||||
<result property="changeRate20" column="change_rate_20" />
|
||||
<result property="changeRate60" column="change_rate_60" />
|
||||
<result property="avgVolume20" column="avg_volume_20" />
|
||||
<result property="freeFloatMarketValue" column="free_float_market_value" />
|
||||
<result property="totalMarketValue" column="total_market_value" />
|
||||
<result property="agenciesHold" column="agencies_hold" />
|
||||
<result property="name" column="name" />
|
||||
<result property="industryId" column="industry_id" />
|
||||
<result property="industryName" column="industry_name" />
|
||||
</resultMap>
|
||||
|
||||
<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
|
||||
from new_stocks
|
||||
</sql>
|
||||
|
||||
<select id="selectNewStocksById" parameterType="Integer" resultMap="NewStocksResult">
|
||||
<include refid="selectNewStocksVo" />
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectNewStocksList" parameterType="com.ruoyi.stocksystem.domain.NewStocks" resultMap="NewStocksResult">
|
||||
<include refid="selectNewStocksVo" />
|
||||
<where>
|
||||
<if test="code != null and code != ''">
|
||||
and code = #{code}
|
||||
</if>
|
||||
<if test="tradeDate != null">
|
||||
and trade_date = #{tradeDate}
|
||||
</if>
|
||||
</where>
|
||||
order by trade_date desc, code
|
||||
</select>
|
||||
|
||||
<select id="selectNewStocksListB" parameterType="com.ruoyi.stocksystem.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
|
||||
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
|
||||
<where>
|
||||
<if test="code != null and code != ''">
|
||||
and s.code = #{code}
|
||||
</if>
|
||||
<if test="name != null and name != ''">
|
||||
and b.name like concat('%', #{name}, '%')
|
||||
</if>
|
||||
<if test="tradeDate != null">
|
||||
and s.trade_date = #{tradeDate}
|
||||
</if>
|
||||
<if test="changeRate != null">
|
||||
and s.change_rate = #{changeRate}
|
||||
</if>
|
||||
<if test="industryId != null">
|
||||
and b.industry_id = #{industryId}
|
||||
</if>
|
||||
</where>
|
||||
order by s.trade_date desc, s.code
|
||||
</select>
|
||||
|
||||
<select id="selectNewStrongStocksList" parameterType="com.ruoyi.stocksystem.domain.NewStocks" resultMap="NewStocksResult">
|
||||
<include refid="selectNewStocksVo" />
|
||||
where change_rate > 0
|
||||
order by change_rate desc, volume desc
|
||||
limit 10
|
||||
</select>
|
||||
|
||||
<select id="selectNewLimitStocksList" parameterType="com.ruoyi.stocksystem.domain.NewStocks" resultMap="NewStocksResult">
|
||||
<include refid="selectNewStocksVo" />
|
||||
where change_rate >= 9.9
|
||||
order by change_rate desc, volume desc
|
||||
</select>
|
||||
|
||||
<insert id="insertNewStocks" parameterType="com.ruoyi.stocksystem.domain.NewStocks">
|
||||
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>
|
||||
|
||||
<insert id="batchInsertNewStocks" parameterType="java.util.List">
|
||||
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
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.code}, #{item.tradeDate}, #{item.open}, #{item.close}, #{item.changeRate}, #{item.tradeDays}, #{item.volume}, #{item.amount}, #{item.changeRate10}, #{item.changeRate20}, #{item.changeRate60}, #{item.avgVolume20}, #{item.freeFloatMarketValue}, #{item.totalMarketValue}, #{item.agenciesHold}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="updateNewStocks" parameterType="com.ruoyi.stocksystem.domain.NewStocks">
|
||||
update new_stocks
|
||||
<set>
|
||||
<if test="code != null and code != ''">code = #{code},</if>
|
||||
<if test="tradeDate != null">trade_date = #{tradeDate},</if>
|
||||
<if test="open != null">open = #{open},</if>
|
||||
<if test="close != null">close = #{close},</if>
|
||||
<if test="changeRate != null">change_rate = #{changeRate},</if>
|
||||
<if test="tradeDays != null">trade_days = #{tradeDays},</if>
|
||||
<if test="volume != null">volume = #{volume},</if>
|
||||
<if test="amount != null">amount = #{amount},</if>
|
||||
<if test="changeRate10 != null">change_rate_10 = #{changeRate10},</if>
|
||||
<if test="changeRate20 != null">change_rate_20 = #{changeRate20},</if>
|
||||
<if test="changeRate60 != null">change_rate_60 = #{changeRate60},</if>
|
||||
<if test="avgVolume20 != null">avg_volume_20 = #{avgVolume20},</if>
|
||||
<if test="freeFloatMarketValue != null">free_float_market_value = #{freeFloatMarketValue},</if>
|
||||
<if test="totalMarketValue != null">total_market_value = #{totalMarketValue},</if>
|
||||
<if test="agenciesHold != null">agencies_hold = #{agenciesHold},</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteNewStocksById" parameterType="Integer">
|
||||
delete from new_stocks where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteNewStocksByIds" parameterType="Integer[]">
|
||||
delete from new_stocks where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectNewStocksByCodeAndDate" resultMap="NewStocksResult">
|
||||
<include refid="selectNewStocksVo" />
|
||||
where code = #{code} and trade_date = #{tradeDate}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in new issue