fix: 增加动量数据表等表结构

dev_refactor_0120_qoder
Lxy 4 months ago
parent ef0bc92c61
commit a1623c3c3e

@ -0,0 +1,104 @@
package com.ruoyi.newstocksystem.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
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.newstocksystem.domain.TStockFinancial;
import com.ruoyi.newstocksystem.service.TStockFinancialService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* Controller
*
* @author lxy
* @date 2026-01-21
*/
@RestController
@RequestMapping("/newstocksystem/stockfinancial")
public class TStockFinancialController extends BaseController
{
@Autowired
private TStockFinancialService tStockFinancialService;
/**
*
*/
@PreAuthorize("@ss.hasPermi('newstocksystem:stockfinancial:list')")
@GetMapping("/list")
public TableDataInfo list(TStockFinancial tStockFinancial)
{
startPage();
List<TStockFinancial> list = tStockFinancialService.selectTStockFinancialList(tStockFinancial);
return getDataTable(list);
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('newstocksystem:stockfinancial:export')")
@Log(title = "股票财务数据", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, TStockFinancial tStockFinancial)
{
List<TStockFinancial> list = tStockFinancialService.selectTStockFinancialList(tStockFinancial);
ExcelUtil<TStockFinancial> util = new ExcelUtil<TStockFinancial>(TStockFinancial.class);
util.exportExcel(response, list, "股票财务数据数据");
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('newstocksystem:stockfinancial:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tStockFinancialService.selectTStockFinancialById(id));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('newstocksystem:stockfinancial:add')")
@Log(title = "股票财务数据", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TStockFinancial tStockFinancial)
{
return toAjax(tStockFinancialService.insertTStockFinancial(tStockFinancial));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('newstocksystem:stockfinancial:edit')")
@Log(title = "股票财务数据", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TStockFinancial tStockFinancial)
{
return toAjax(tStockFinancialService.updateTStockFinancial(tStockFinancial));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('newstocksystem:stockfinancial:remove')")
@Log(title = "股票财务数据", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tStockFinancialService.deleteTStockFinancialByIds(ids));
}
}

@ -0,0 +1,104 @@
package com.ruoyi.newstocksystem.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
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.newstocksystem.domain.TStocksInTrend;
import com.ruoyi.newstocksystem.service.TStocksInTrendService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* Controller
*
* @author lxy
* @date 2026-01-21
*/
@RestController
@RequestMapping("/newstocksystem/stocksintrnd")
public class TStocksInTrendController extends BaseController
{
@Autowired
private TStocksInTrendService tStocksInTrendService;
/**
*
*/
@PreAuthorize("@ss.hasPermi('newstocksystem:stocksintrnd:list')")
@GetMapping("/list")
public TableDataInfo list(TStocksInTrend tStocksInTrend)
{
startPage();
List<TStocksInTrend> list = tStocksInTrendService.selectTStocksInTrendList(tStocksInTrend);
return getDataTable(list);
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('newstocksystem:stocksintrnd:export')")
@Log(title = "趋势中的股票", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, TStocksInTrend tStocksInTrend)
{
List<TStocksInTrend> list = tStocksInTrendService.selectTStocksInTrendList(tStocksInTrend);
ExcelUtil<TStocksInTrend> util = new ExcelUtil<TStocksInTrend>(TStocksInTrend.class);
util.exportExcel(response, list, "趋势中的股票数据");
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('newstocksystem:stocksintrnd:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tStocksInTrendService.selectTStocksInTrendById(id));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('newstocksystem:stocksintrnd:add')")
@Log(title = "趋势中的股票", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TStocksInTrend tStocksInTrend)
{
return toAjax(tStocksInTrendService.insertTStocksInTrend(tStocksInTrend));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('newstocksystem:stocksintrnd:edit')")
@Log(title = "趋势中的股票", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TStocksInTrend tStocksInTrend)
{
return toAjax(tStocksInTrendService.updateTStocksInTrend(tStocksInTrend));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('newstocksystem:stocksintrnd:remove')")
@Log(title = "趋势中的股票", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tStocksInTrendService.deleteTStocksInTrendByIds(ids));
}
}

@ -0,0 +1,104 @@
package com.ruoyi.newstocksystem.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
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.newstocksystem.domain.TTrends;
import com.ruoyi.newstocksystem.service.TTrendsService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* Controller
*
* @author lxy
* @date 2026-01-21
*/
@RestController
@RequestMapping("/newstocksystem/trends")
public class TTrendsController extends BaseController
{
@Autowired
private TTrendsService tTrendsService;
/**
*
*/
@PreAuthorize("@ss.hasPermi('newstocksystem:trends:list')")
@GetMapping("/list")
public TableDataInfo list(TTrends tTrends)
{
startPage();
List<TTrends> list = tTrendsService.selectTTrendsList(tTrends);
return getDataTable(list);
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('newstocksystem:trends:export')")
@Log(title = "趋势", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, TTrends tTrends)
{
List<TTrends> list = tTrendsService.selectTTrendsList(tTrends);
ExcelUtil<TTrends> util = new ExcelUtil<TTrends>(TTrends.class);
util.exportExcel(response, list, "趋势数据");
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('newstocksystem:trends:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tTrendsService.selectTTrendsById(id));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('newstocksystem:trends:add')")
@Log(title = "趋势", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TTrends tTrends)
{
return toAjax(tTrendsService.insertTTrends(tTrends));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('newstocksystem:trends:edit')")
@Log(title = "趋势", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TTrends tTrends)
{
return toAjax(tTrendsService.updateTTrends(tTrends));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('newstocksystem:trends:remove')")
@Log(title = "趋势", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tTrendsService.deleteTTrendsByIds(ids));
}
}

@ -0,0 +1,204 @@
package com.ruoyi.newstocksystem.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import java.util.Date;
/**
* t_stock_financial
* stock_codet_stock_basic
*
* @author lxy
* @date 2026-01-21
*/
public class TStockFinancial extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键ID */
private Long id;
/** 股票代码 */
@Excel(name = "股票代码")
private String stockCode;
/** 报告期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "报告期", dateFormat = "yyyy-MM-dd")
private Date reportPeriod;
/** 净利润同比增长率 */
@Excel(name = "净利润同比增长率")
private Double netProfitGrowthRateYoy;
/** 净利润环比增长率 */
@Excel(name = "净利润环比增长率")
private Double netProfitGrowthRateQoq;
/** 净资产收益率ROE */
@Excel(name = "净资产收益率ROE")
private Double roe;
/** 每股收益EPS */
@Excel(name = "每股收益EPS")
private Double epsBasic;
/** 净利润 */
@Excel(name = "净利润")
private Double netProfit;
/** 基本每股收益 */
@Excel(name = "基本每股收益")
private Double basicEps;
/** 每股净资产BPS */
@Excel(name = "每股净资产BPS")
private Double bps;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
/** 更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
public Long getId()
{
return id;
}
public void setId(Long id)
{
this.id = id;
}
public String getStockCode()
{
return stockCode;
}
public void setStockCode(String stockCode)
{
this.stockCode = stockCode;
}
public Date getReportPeriod()
{
return reportPeriod;
}
public void setReportPeriod(Date reportPeriod)
{
this.reportPeriod = reportPeriod;
}
public Double getNetProfitGrowthRateYoy()
{
return netProfitGrowthRateYoy;
}
public void setNetProfitGrowthRateYoy(Double netProfitGrowthRateYoy)
{
this.netProfitGrowthRateYoy = netProfitGrowthRateYoy;
}
public Double getNetProfitGrowthRateQoq()
{
return netProfitGrowthRateQoq;
}
public void setNetProfitGrowthRateQoq(Double netProfitGrowthRateQoq)
{
this.netProfitGrowthRateQoq = netProfitGrowthRateQoq;
}
public Double getRoe()
{
return roe;
}
public void setRoe(Double roe)
{
this.roe = roe;
}
public Double getEpsBasic()
{
return epsBasic;
}
public void setEpsBasic(Double epsBasic)
{
this.epsBasic = epsBasic;
}
public Double getNetProfit()
{
return netProfit;
}
public void setNetProfit(Double netProfit)
{
this.netProfit = netProfit;
}
public Double getBasicEps()
{
return basicEps;
}
public void setBasicEps(Double basicEps)
{
this.basicEps = basicEps;
}
public Double getBps()
{
return bps;
}
public void setBps(Double bps)
{
this.bps = bps;
}
public Date getCreateTime()
{
return createTime;
}
public void setCreateTime(Date createTime)
{
this.createTime = createTime;
}
public Date getUpdateTime()
{
return updateTime;
}
public void setUpdateTime(Date updateTime)
{
this.updateTime = updateTime;
}
@Override
public String toString() {
return "TStockFinancial{" +
"id=" + id +
", stockCode='" + stockCode + '\'' +
", reportPeriod=" + reportPeriod +
", netProfitGrowthRateYoy=" + netProfitGrowthRateYoy +
", netProfitGrowthRateQoq=" + netProfitGrowthRateQoq +
", roe=" + roe +
", epsBasic=" + epsBasic +
", netProfit=" + netProfit +
", basicEps=" + basicEps +
", bps=" + bps +
", createTime=" + createTime +
", updateTime=" + updateTime +
'}';
}
}

@ -0,0 +1,129 @@
package com.ruoyi.newstocksystem.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import java.util.Date;
/**
* t_stocks_in_trend
* stock_codet_stock_basic
*
* @author lxy
* @date 2026-01-21
*/
public class TStocksInTrend extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键ID */
private Long id;
/** 股票代码 */
@Excel(name = "股票代码")
private String stockCode;
/** 交易日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "交易日期", dateFormat = "yyyy-MM-dd")
private Date tradeDate;
/** 排名 */
@Excel(name = "排名")
private Integer rank;
/** 动量数据类型10日、20日 */
@Excel(name = "动量数据类型")
private String momentumType;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
/** 更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
public Long getId()
{
return id;
}
public void setId(Long id)
{
this.id = id;
}
public String getStockCode()
{
return stockCode;
}
public void setStockCode(String stockCode)
{
this.stockCode = stockCode;
}
public Date getTradeDate()
{
return tradeDate;
}
public void setTradeDate(Date tradeDate)
{
this.tradeDate = tradeDate;
}
public Integer getRank()
{
return rank;
}
public void setRank(Integer rank)
{
this.rank = rank;
}
public String getMomentumType()
{
return momentumType;
}
public void setMomentumType(String momentumType)
{
this.momentumType = momentumType;
}
public Date getCreateTime()
{
return createTime;
}
public void setCreateTime(Date createTime)
{
this.createTime = createTime;
}
public Date getUpdateTime()
{
return updateTime;
}
public void setUpdateTime(Date updateTime)
{
this.updateTime = updateTime;
}
@Override
public String toString() {
return "TStocksInTrend{" +
"id=" + id +
", stockCode='" + stockCode + '\'' +
", tradeDate=" + tradeDate +
", rank=" + rank +
", momentumType='" + momentumType + '\'' +
", createTime=" + createTime +
", updateTime=" + updateTime +
'}';
}
}

@ -0,0 +1,204 @@
package com.ruoyi.newstocksystem.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import java.util.Date;
/**
* t_trends
* eastmoney_industry_codet_industry_index_basic
*
* @author lxy
* @date 2026-01-21
*/
public class TTrends extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键ID */
private Long id;
/** 交易日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "交易日期", dateFormat = "yyyy-MM-dd")
private Date tradeDate;
/** 所属东财行业代码 */
@Excel(name = "东财行业代码")
private String eastmoneyIndustryCode;
/** 所属东财行业名称 */
@Excel(name = "东财行业名称")
private String eastmoneyIndustryName;
/** 动量个股数量 */
@Excel(name = "动量个股数量")
private Double stocksCount;
/** 动量值 */
@Excel(name = "动量值")
private Double trendValue;
/** 动量值变化 */
@Excel(name = "动量值变化")
private Double trendValueChange;
/** 板块排名 */
@Excel(name = "板块排名")
private Integer rank;
/** 板块排名变化 */
@Excel(name = "板块排名变化")
private Integer rankChange;
/** 动量数据类型10日、20日 */
@Excel(name = "动量数据类型")
private String momentumType;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
/** 更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
public Long getId()
{
return id;
}
public void setId(Long id)
{
this.id = id;
}
public Date getTradeDate()
{
return tradeDate;
}
public void setTradeDate(Date tradeDate)
{
this.tradeDate = tradeDate;
}
public String getEastmoneyIndustryCode()
{
return eastmoneyIndustryCode;
}
public void setEastmoneyIndustryCode(String eastmoneyIndustryCode)
{
this.eastmoneyIndustryCode = eastmoneyIndustryCode;
}
public String getEastmoneyIndustryName()
{
return eastmoneyIndustryName;
}
public void setEastmoneyIndustryName(String eastmoneyIndustryName)
{
this.eastmoneyIndustryName = eastmoneyIndustryName;
}
public Double getStocksCount()
{
return stocksCount;
}
public void setStocksCount(Double stocksCount)
{
this.stocksCount = stocksCount;
}
public Double getTrendValue()
{
return trendValue;
}
public void setTrendValue(Double trendValue)
{
this.trendValue = trendValue;
}
public Double getTrendValueChange()
{
return trendValueChange;
}
public void setTrendValueChange(Double trendValueChange)
{
this.trendValueChange = trendValueChange;
}
public Integer getRank()
{
return rank;
}
public void setRank(Integer rank)
{
this.rank = rank;
}
public Integer getRankChange()
{
return rankChange;
}
public void setRankChange(Integer rankChange)
{
this.rankChange = rankChange;
}
public String getMomentumType()
{
return momentumType;
}
public void setMomentumType(String momentumType)
{
this.momentumType = momentumType;
}
public Date getCreateTime()
{
return createTime;
}
public void setCreateTime(Date createTime)
{
this.createTime = createTime;
}
public Date getUpdateTime()
{
return updateTime;
}
public void setUpdateTime(Date updateTime)
{
this.updateTime = updateTime;
}
@Override
public String toString() {
return "TTrends{" +
"id=" + id +
", tradeDate=" + tradeDate +
", eastmoneyIndustryCode='" + eastmoneyIndustryCode + '\'' +
", eastmoneyIndustryName='" + eastmoneyIndustryName + '\'' +
", stocksCount=" + stocksCount +
", trendValue=" + trendValue +
", trendValueChange=" + trendValueChange +
", rank=" + rank +
", rankChange=" + rankChange +
", momentumType='" + momentumType + '\'' +
", createTime=" + createTime +
", updateTime=" + updateTime +
'}';
}
}

@ -0,0 +1,77 @@
package com.ruoyi.newstocksystem.mapper;
import java.util.List;
import com.ruoyi.newstocksystem.domain.TStockFinancial;
/**
* Mapper
*
* @author lxy
* @date 2026-01-21
*/
public interface TStockFinancialMapper
{
/**
*
*
* @param id
* @return
*/
public TStockFinancial selectTStockFinancialById(Long id);
/**
*
*
* @param tStockFinancial
* @return
*/
public List<TStockFinancial> selectTStockFinancialList(TStockFinancial tStockFinancial);
/**
*
*
* @param tStockFinancial
* @return
*/
public int insertTStockFinancial(TStockFinancial tStockFinancial);
/**
*
*
* @param tStockFinancial
* @return
*/
public int updateTStockFinancial(TStockFinancial tStockFinancial);
/**
*
*
* @param id
* @return
*/
public int deleteTStockFinancialById(Long id);
/**
*
*
* @param ids
* @return
*/
public int deleteTStockFinancialByIds(Long[] ids);
/**
*
*
* @param tStockFinancials
* @return
*/
public int batchInsertTStockFinancial(List<TStockFinancial> tStockFinancials);
/**
*
*
* @param tStockFinancialList
* @return
*/
public int batchUpsert(List<TStockFinancial> tStockFinancialList);
}

@ -0,0 +1,77 @@
package com.ruoyi.newstocksystem.mapper;
import java.util.List;
import com.ruoyi.newstocksystem.domain.TStocksInTrend;
/**
* Mapper
*
* @author lxy
* @date 2026-01-21
*/
public interface TStocksInTrendMapper
{
/**
*
*
* @param id
* @return
*/
public TStocksInTrend selectTStocksInTrendById(Long id);
/**
*
*
* @param tStocksInTrend
* @return
*/
public List<TStocksInTrend> selectTStocksInTrendList(TStocksInTrend tStocksInTrend);
/**
*
*
* @param tStocksInTrend
* @return
*/
public int insertTStocksInTrend(TStocksInTrend tStocksInTrend);
/**
*
*
* @param tStocksInTrend
* @return
*/
public int updateTStocksInTrend(TStocksInTrend tStocksInTrend);
/**
*
*
* @param id
* @return
*/
public int deleteTStocksInTrendById(Long id);
/**
*
*
* @param ids
* @return
*/
public int deleteTStocksInTrendByIds(Long[] ids);
/**
*
*
* @param tStocksInTrends
* @return
*/
public int batchInsertTStocksInTrend(List<TStocksInTrend> tStocksInTrends);
/**
*
*
* @param tStocksInTrendList
* @return
*/
public int batchUpsert(List<TStocksInTrend> tStocksInTrendList);
}

@ -0,0 +1,73 @@
package com.ruoyi.newstocksystem.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import com.ruoyi.newstocksystem.domain.TTrends;
/**
* Mapper
*
* @author lxy
* @date 2026-01-21
*/
@Repository
@Mapper
public interface TTrendsMapper
{
/**
*
*
* @param id
* @return
*/
public TTrends selectTTrendsById(Long id);
/**
*
*
* @param tTrends
* @return
*/
public List<TTrends> selectTTrendsList(TTrends tTrends);
/**
*
*
* @param tTrends
* @return
*/
public int insertTTrends(TTrends tTrends);
/**
*
*
* @param tTrends
* @return
*/
public int updateTTrends(TTrends tTrends);
/**
*
*
* @param id
* @return
*/
public int deleteTTrendsById(Long id);
/**
*
*
* @param ids
* @return
*/
public int deleteTTrendsByIds(Long[] ids);
/**
*
*
* @param tTrendsList
* @return
*/
public int batchUpsert(List<TTrends> tTrendsList);
}

@ -0,0 +1,77 @@
package com.ruoyi.newstocksystem.service;
import java.util.List;
import com.ruoyi.newstocksystem.domain.TStockFinancial;
/**
* Service
*
* @author lxy
* @date 2026-01-21
*/
public interface TStockFinancialService
{
/**
*
*
* @param id
* @return
*/
public TStockFinancial selectTStockFinancialById(Long id);
/**
*
*
* @param tStockFinancial
* @return
*/
public List<TStockFinancial> selectTStockFinancialList(TStockFinancial tStockFinancial);
/**
*
*
* @param tStockFinancial
* @return
*/
public int insertTStockFinancial(TStockFinancial tStockFinancial);
/**
*
*
* @param tStockFinancial
* @return
*/
public int updateTStockFinancial(TStockFinancial tStockFinancial);
/**
*
*
* @param ids
* @return
*/
public int deleteTStockFinancialByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
public int deleteTStockFinancialById(Long id);
/**
*
*
* @param tStockFinancialList
* @return
*/
public int batchUpsert(List<TStockFinancial> tStockFinancialList);
/**
*
*
* @param stockCode
* @return
*/
public boolean validateStockCodeExists(String stockCode);
}

@ -0,0 +1,77 @@
package com.ruoyi.newstocksystem.service;
import java.util.List;
import com.ruoyi.newstocksystem.domain.TStocksInTrend;
/**
* Service
*
* @author lxy
* @date 2026-01-21
*/
public interface TStocksInTrendService
{
/**
*
*
* @param id
* @return
*/
public TStocksInTrend selectTStocksInTrendById(Long id);
/**
*
*
* @param tStocksInTrend
* @return
*/
public List<TStocksInTrend> selectTStocksInTrendList(TStocksInTrend tStocksInTrend);
/**
*
*
* @param tStocksInTrend
* @return
*/
public int insertTStocksInTrend(TStocksInTrend tStocksInTrend);
/**
*
*
* @param tStocksInTrend
* @return
*/
public int updateTStocksInTrend(TStocksInTrend tStocksInTrend);
/**
*
*
* @param ids
* @return
*/
public int deleteTStocksInTrendByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
public int deleteTStocksInTrendById(Long id);
/**
*
*
* @param tStocksInTrendList
* @return
*/
public int batchUpsert(List<TStocksInTrend> tStocksInTrendList);
/**
*
*
* @param stockCode
* @return
*/
public boolean validateStockCodeExists(String stockCode);
}

@ -0,0 +1,77 @@
package com.ruoyi.newstocksystem.service;
import java.util.List;
import com.ruoyi.newstocksystem.domain.TTrends;
/**
* Service
*
* @author lxy
* @date 2026-01-21
*/
public interface TTrendsService
{
/**
*
*
* @param id
* @return
*/
public TTrends selectTTrendsById(Long id);
/**
*
*
* @param tTrends
* @return
*/
public List<TTrends> selectTTrendsList(TTrends tTrends);
/**
*
*
* @param tTrends
* @return
*/
public int insertTTrends(TTrends tTrends);
/**
*
*
* @param tTrends
* @return
*/
public int updateTTrends(TTrends tTrends);
/**
*
*
* @param ids
* @return
*/
public int deleteTTrendsByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
public int deleteTTrendsById(Long id);
/**
*
*
* @param tTrendsList
* @return
*/
public int batchUpsert(List<TTrends> tTrendsList);
/**
*
*
* @param industryCode
* @return
*/
public boolean validateIndustryCodeExists(String industryCode);
}

@ -0,0 +1,115 @@
package com.ruoyi.newstocksystem.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.newstocksystem.mapper.TStockFinancialMapper;
import com.ruoyi.newstocksystem.domain.TStockFinancial;
import com.ruoyi.newstocksystem.service.TStockFinancialService;
import com.ruoyi.newstocksystem.mapper.TStockBasicMapper;
/**
* Service
*
* @author lxy
* @date 2026-01-21
*/
@Service
public class TStockFinancialServiceImpl implements TStockFinancialService
{
@Autowired
private TStockFinancialMapper tStockFinancialMapper;
@Autowired
private TStockBasicMapper tStockBasicMapper;
/**
*
*
* @param id
* @return
*/
@Override
public TStockFinancial selectTStockFinancialById(Long id)
{
return tStockFinancialMapper.selectTStockFinancialById(id);
}
/**
*
*
* @param tStockFinancial
* @return
*/
@Override
public List<TStockFinancial> selectTStockFinancialList(TStockFinancial tStockFinancial)
{
return tStockFinancialMapper.selectTStockFinancialList(tStockFinancial);
}
/**
*
*
* @param tStockFinancial
* @return
*/
@Override
public int insertTStockFinancial(TStockFinancial tStockFinancial)
{
return tStockFinancialMapper.insertTStockFinancial(tStockFinancial);
}
/**
*
*
* @param tStockFinancial
* @return
*/
@Override
public int updateTStockFinancial(TStockFinancial tStockFinancial)
{
return tStockFinancialMapper.updateTStockFinancial(tStockFinancial);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteTStockFinancialByIds(Long[] ids)
{
return tStockFinancialMapper.deleteTStockFinancialByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteTStockFinancialById(Long id)
{
return tStockFinancialMapper.deleteTStockFinancialById(id);
}
/**
*
*
* @param tStockFinancialList
* @return
*/
@Override
public int batchUpsert(List<TStockFinancial> tStockFinancialList)
{
return tStockFinancialMapper.batchUpsert(tStockFinancialList);
}
@Override
public boolean validateStockCodeExists(String stockCode)
{
return tStockBasicMapper.selectStockBasicByCode(stockCode) != null;
}
}

@ -0,0 +1,115 @@
package com.ruoyi.newstocksystem.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.newstocksystem.mapper.TStocksInTrendMapper;
import com.ruoyi.newstocksystem.domain.TStocksInTrend;
import com.ruoyi.newstocksystem.service.TStocksInTrendService;
import com.ruoyi.newstocksystem.mapper.TStockBasicMapper;
/**
* Service
*
* @author lxy
* @date 2026-01-21
*/
@Service
public class TStocksInTrendServiceImpl implements TStocksInTrendService
{
@Autowired
private TStocksInTrendMapper tStocksInTrendMapper;
@Autowired
private TStockBasicMapper tStockBasicMapper;
/**
*
*
* @param id
* @return
*/
@Override
public TStocksInTrend selectTStocksInTrendById(Long id)
{
return tStocksInTrendMapper.selectTStocksInTrendById(id);
}
/**
*
*
* @param tStocksInTrend
* @return
*/
@Override
public List<TStocksInTrend> selectTStocksInTrendList(TStocksInTrend tStocksInTrend)
{
return tStocksInTrendMapper.selectTStocksInTrendList(tStocksInTrend);
}
/**
*
*
* @param tStocksInTrend
* @return
*/
@Override
public int insertTStocksInTrend(TStocksInTrend tStocksInTrend)
{
return tStocksInTrendMapper.insertTStocksInTrend(tStocksInTrend);
}
/**
*
*
* @param tStocksInTrend
* @return
*/
@Override
public int updateTStocksInTrend(TStocksInTrend tStocksInTrend)
{
return tStocksInTrendMapper.updateTStocksInTrend(tStocksInTrend);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteTStocksInTrendByIds(Long[] ids)
{
return tStocksInTrendMapper.deleteTStocksInTrendByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteTStocksInTrendById(Long id)
{
return tStocksInTrendMapper.deleteTStocksInTrendById(id);
}
/**
*
*
* @param tStocksInTrendList
* @return
*/
@Override
public int batchUpsert(List<TStocksInTrend> tStocksInTrendList)
{
return tStocksInTrendMapper.batchUpsert(tStocksInTrendList);
}
@Override
public boolean validateStockCodeExists(String stockCode)
{
return tStockBasicMapper.selectStockBasicByCode(stockCode) != null;
}
}

@ -0,0 +1,115 @@
package com.ruoyi.newstocksystem.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.newstocksystem.mapper.TTrendsMapper;
import com.ruoyi.newstocksystem.domain.TTrends;
import com.ruoyi.newstocksystem.service.TTrendsService;
import com.ruoyi.newstocksystem.mapper.TIndustryBasicMapper;
/**
* Service
*
* @author lxy
* @date 2026-01-21
*/
@Service
public class TTrendsServiceImpl implements TTrendsService
{
@Autowired
private TTrendsMapper tTrendsMapper;
@Autowired
private TIndustryBasicMapper tIndustryBasicMapper;
/**
*
*
* @param id
* @return
*/
@Override
public TTrends selectTTrendsById(Long id)
{
return tTrendsMapper.selectTTrendsById(id);
}
/**
*
*
* @param tTrends
* @return
*/
@Override
public List<TTrends> selectTTrendsList(TTrends tTrends)
{
return tTrendsMapper.selectTTrendsList(tTrends);
}
/**
*
*
* @param tTrends
* @return
*/
@Override
public int insertTTrends(TTrends tTrends)
{
return tTrendsMapper.insertTTrends(tTrends);
}
/**
*
*
* @param tTrends
* @return
*/
@Override
public int updateTTrends(TTrends tTrends)
{
return tTrendsMapper.updateTTrends(tTrends);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteTTrendsByIds(Long[] ids)
{
return tTrendsMapper.deleteTTrendsByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteTTrendsById(Long id)
{
return tTrendsMapper.deleteTTrendsById(id);
}
/**
*
*
* @param tTrendsList
* @return
*/
@Override
public int batchUpsert(List<TTrends> tTrendsList)
{
return tTrendsMapper.batchUpsert(tTrendsList);
}
@Override
public boolean validateIndustryCodeExists(String industryCode)
{
return tIndustryBasicMapper.selectTIndustryBasicByCode(industryCode) != null;
}
}

@ -0,0 +1,143 @@
<?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.TStockFinancialMapper">
<resultMap type="TStockFinancial" id="TStockFinancialResult">
<id property="id" column="id" />
<result property="stockCode" column="stock_code" />
<result property="reportPeriod" column="report_period" />
<result property="netProfitGrowthRateYoy" column="net_profit_growth_rate_yoy" />
<result property="netProfitGrowthRateQoq" column="net_profit_growth_rate_qoq" />
<result property="roe" column="roe" />
<result property="epsBasic" column="eps_basic" />
<result property="netProfit" column="net_profit" />
<result property="basicEps" column="basic_eps" />
<result property="bps" column="bps" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectTStockFinancialVo">
select id, stock_code, report_period, net_profit_growth_rate_yoy, net_profit_growth_rate_qoq, roe, eps_basic, net_profit, basic_eps, bps, create_time, update_time from t_stock_financial
</sql>
<select id="selectTStockFinancialById" parameterType="Long" resultMap="TStockFinancialResult">
<include refid="selectTStockFinancialVo"/>
where id = #{id}
</select>
<select id="selectTStockFinancialList" parameterType="TStockFinancial" resultMap="TStockFinancialResult">
<include refid="selectTStockFinancialVo"/>
<where>
<if test="stockCode != null and stockCode != ''">and stock_code = #{stockCode}</if>
<if test="reportPeriod != null ">and report_period = #{reportPeriod}</if>
<if test="netProfitGrowthRateYoy != null ">and net_profit_growth_rate_yoy = #{netProfitGrowthRateYoy}</if>
<if test="netProfitGrowthRateQoq != null ">and net_profit_growth_rate_qoq = #{netProfitGrowthRateQoq}</if>
<if test="roe != null ">and roe = #{roe}</if>
<if test="epsBasic != null ">and eps_basic = #{epsBasic}</if>
<if test="netProfit != null ">and net_profit = #{netProfit}</if>
<if test="basicEps != null ">and basic_eps = #{basicEps}</if>
<if test="bps != null ">and bps = #{bps}</if>
</where>
</select>
<insert id="insertTStockFinancial" parameterType="TStockFinancial" useGeneratedKeys="true" keyProperty="id">
insert into t_stock_financial
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="stockCode != null and stockCode != ''">stock_code,</if>
<if test="reportPeriod != null">report_period,</if>
<if test="netProfitGrowthRateYoy != null">net_profit_growth_rate_yoy,</if>
<if test="netProfitGrowthRateQoq != null">net_profit_growth_rate_qoq,</if>
<if test="roe != null">roe,</if>
<if test="epsBasic != null">eps_basic,</if>
<if test="netProfit != null">net_profit,</if>
<if test="basicEps != null">basic_eps,</if>
<if test="bps != null">bps,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="stockCode != null and stockCode != ''">#{stockCode},</if>
<if test="reportPeriod != null">#{reportPeriod},</if>
<if test="netProfitGrowthRateYoy != null">#{netProfitGrowthRateYoy},</if>
<if test="netProfitGrowthRateQoq != null">#{netProfitGrowthRateQoq},</if>
<if test="roe != null">#{roe},</if>
<if test="epsBasic != null">#{epsBasic},</if>
<if test="netProfit != null">#{netProfit},</if>
<if test="basicEps != null">#{basicEps},</if>
<if test="bps != null">#{bps},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateTStockFinancial" parameterType="TStockFinancial">
update t_stock_financial
<trim prefix="SET" suffixOverrides=",">
<if test="stockCode != null and stockCode != ''">stock_code = #{stockCode},</if>
<if test="reportPeriod != null">report_period = #{reportPeriod},</if>
<if test="netProfitGrowthRateYoy != null">net_profit_growth_rate_yoy = #{netProfitGrowthRateYoy},</if>
<if test="netProfitGrowthRateQoq != null">net_profit_growth_rate_qoq = #{netProfitGrowthRateQoq},</if>
<if test="roe != null">roe = #{roe},</if>
<if test="epsBasic != null">eps_basic = #{epsBasic},</if>
<if test="netProfit != null">net_profit = #{netProfit},</if>
<if test="basicEps != null">basic_eps = #{basicEps},</if>
<if test="bps != null">bps = #{bps},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteTStockFinancialById" parameterType="Long">
delete from t_stock_financial where id = #{id}
</delete>
<delete id="deleteTStockFinancialByIds" parameterType="String">
delete from t_stock_financial where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<insert id="batchUpsert" parameterType="java.util.List">
INSERT INTO t_stock_financial (
stock_code,
report_period,
net_profit_growth_rate_yoy,
net_profit_growth_rate_qoq,
roe,
eps_basic,
net_profit,
basic_eps,
bps,
create_time,
update_time
) VALUES
<foreach collection="list" item="item" separator=",">
(
#{item.stockCode},
#{item.reportPeriod},
#{item.netProfitGrowthRateYoy},
#{item.netProfitGrowthRateQoq},
#{item.roe},
#{item.epsBasic},
#{item.netProfit},
#{item.basicEps},
#{item.bps},
#{item.createTime},
#{item.updateTime}
)
</foreach>
ON DUPLICATE KEY UPDATE
net_profit_growth_rate_yoy = VALUES(net_profit_growth_rate_yoy),
net_profit_growth_rate_qoq = VALUES(net_profit_growth_rate_qoq),
roe = VALUES(roe),
eps_basic = VALUES(eps_basic),
net_profit = VALUES(net_profit),
basic_eps = VALUES(basic_eps),
bps = VALUES(bps),
update_time = VALUES(update_time)
</insert>
</mapper>

@ -0,0 +1,103 @@
<?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.TStocksInTrendMapper">
<resultMap type="TStocksInTrend" id="TStocksInTrendResult">
<id property="id" column="id" />
<result property="stockCode" column="stock_code" />
<result property="tradeDate" column="trade_date" />
<result property="rank" column="rank" />
<result property="momentumType" column="momentum_type" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectTStocksInTrendVo">
select id, stock_code, trade_date, rank, momentum_type, create_time, update_time from t_stocks_in_trend
</sql>
<select id="selectTStocksInTrendById" parameterType="Long" resultMap="TStocksInTrendResult">
<include refid="selectTStocksInTrendVo"/>
where id = #{id}
</select>
<select id="selectTStocksInTrendList" parameterType="TStocksInTrend" resultMap="TStocksInTrendResult">
<include refid="selectTStocksInTrendVo"/>
<where>
<if test="stockCode != null and stockCode != ''">and stock_code = #{stockCode}</if>
<if test="tradeDate != null ">and trade_date = #{tradeDate}</if>
<if test="rank != null ">and rank = #{rank}</if>
<if test="momentumType != null and momentumType != ''">and momentum_type = #{momentumType}</if>
</where>
</select>
<insert id="insertTStocksInTrend" parameterType="TStocksInTrend" useGeneratedKeys="true" keyProperty="id">
insert into t_stocks_in_trend
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="stockCode != null and stockCode != ''">stock_code,</if>
<if test="tradeDate != null">trade_date,</if>
<if test="rank != null">rank,</if>
<if test="momentumType != null and momentumType != ''">momentum_type,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="stockCode != null and stockCode != ''">#{stockCode},</if>
<if test="tradeDate != null">#{tradeDate},</if>
<if test="rank != null">#{rank},</if>
<if test="momentumType != null and momentumType != ''">#{momentumType},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateTStocksInTrend" parameterType="TStocksInTrend">
update t_stocks_in_trend
<trim prefix="SET" suffixOverrides=",">
<if test="stockCode != null and stockCode != ''">stock_code = #{stockCode},</if>
<if test="tradeDate != null">trade_date = #{tradeDate},</if>
<if test="rank != null">rank = #{rank},</if>
<if test="momentumType != null and momentumType != ''">momentum_type = #{momentumType},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteTStocksInTrendById" parameterType="Long">
delete from t_stocks_in_trend where id = #{id}
</delete>
<delete id="deleteTStocksInTrendByIds" parameterType="String">
delete from t_stocks_in_trend where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<insert id="batchUpsert" parameterType="java.util.List">
INSERT INTO t_stocks_in_trend (
stock_code,
trade_date,
rank,
momentum_type,
create_time,
update_time
) VALUES
<foreach collection="list" item="item" separator=",">
(
#{item.stockCode},
#{item.tradeDate},
#{item.rank},
#{item.momentumType},
#{item.createTime},
#{item.updateTime}
)
</foreach>
ON DUPLICATE KEY UPDATE
rank = VALUES(rank),
momentum_type = VALUES(momentum_type),
update_time = VALUES(update_time)
</insert>
</mapper>

@ -0,0 +1,141 @@
<?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.TTrendsMapper">
<resultMap type="TTrends" id="TTrendsResult">
<id property="id" column="id" />
<result property="tradeDate" column="trade_date" />
<result property="eastmoneyIndustryCode" column="eastmoney_industry_code" />
<result property="eastmoneyIndustryName" column="eastmoney_industry_name" />
<result property="stocksCount" column="stocks_count" />
<result property="trendValue" column="trend_value" />
<result property="trendValueChange" column="trend_value_change" />
<result property="rank" column="rank" />
<result property="rankChange" column="rank_change" />
<result property="momentumType" column="momentum_type" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectTTrendsVo">
select id, trade_date, eastmoney_industry_code, eastmoney_industry_name, stocks_count, trend_value, trend_value_change, rank, rank_change, momentum_type, create_time, update_time from t_trends
</sql>
<select id="selectTTrendsById" parameterType="Long" resultMap="TTrendsResult">
<include refid="selectTTrendsVo"/>
where id = #{id}
</select>
<select id="selectTTrendsList" parameterType="TTrends" resultMap="TTrendsResult">
<include refid="selectTTrendsVo"/>
<where>
<if test="tradeDate != null ">and trade_date = #{tradeDate}</if>
<if test="eastmoneyIndustryCode != null and eastmoneyIndustryCode != ''">and eastmoney_industry_code = #{eastmoneyIndustryCode}</if>
<if test="eastmoneyIndustryName != null and eastmoneyIndustryName != ''">and eastmoney_industry_name = #{eastmoneyIndustryName}</if>
<if test="stocksCount != null ">and stocks_count = #{stocksCount}</if>
<if test="trendValue != null ">and trend_value = #{trendValue}</if>
<if test="trendValueChange != null ">and trend_value_change = #{trendValueChange}</if>
<if test="rank != null ">and rank = #{rank}</if>
<if test="rankChange != null ">and rank_change = #{rankChange}</if>
<if test="momentumType != null and momentumType != ''">and momentum_type = #{momentumType}</if>
</where>
</select>
<insert id="insertTTrends" parameterType="TTrends" useGeneratedKeys="true" keyProperty="id">
insert into t_trends
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="tradeDate != null">trade_date,</if>
<if test="eastmoneyIndustryCode != null and eastmoneyIndustryCode != ''">eastmoney_industry_code,</if>
<if test="eastmoneyIndustryName != null and eastmoneyIndustryName != ''">eastmoney_industry_name,</if>
<if test="stocksCount != null">stocks_count,</if>
<if test="trendValue != null">trend_value,</if>
<if test="trendValueChange != null">trend_value_change,</if>
<if test="rank != null">rank,</if>
<if test="rankChange != null">rank_change,</if>
<if test="momentumType != null and momentumType != ''">momentum_type,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="tradeDate != null">#{tradeDate},</if>
<if test="eastmoneyIndustryCode != null and eastmoneyIndustryCode != ''">#{eastmoneyIndustryCode},</if>
<if test="eastmoneyIndustryName != null and eastmoneyIndustryName != ''">#{eastmoneyIndustryName},</if>
<if test="stocksCount != null">#{stocksCount},</if>
<if test="trendValue != null">#{trendValue},</if>
<if test="trendValueChange != null">#{trendValueChange},</if>
<if test="rank != null">#{rank},</if>
<if test="rankChange != null">#{rankChange},</if>
<if test="momentumType != null and momentumType != ''">#{momentumType},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateTTrends" parameterType="TTrends">
update t_trends
<trim prefix="SET" suffixOverrides=",">
<if test="tradeDate != null">trade_date = #{tradeDate},</if>
<if test="eastmoneyIndustryCode != null and eastmoneyIndustryCode != ''">eastmoney_industry_code = #{eastmoneyIndustryCode},</if>
<if test="eastmoneyIndustryName != null and eastmoneyIndustryName != ''">eastmoney_industry_name = #{eastmoneyIndustryName},</if>
<if test="stocksCount != null">stocks_count = #{stocksCount},</if>
<if test="trendValue != null">trend_value = #{trendValue},</if>
<if test="trendValueChange != null">trend_value_change = #{trendValueChange},</if>
<if test="rank != null">rank = #{rank},</if>
<if test="rankChange != null">rank_change = #{rankChange},</if>
<if test="momentumType != null and momentumType != ''">momentum_type = #{momentumType},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteTTrendsById" parameterType="Long">
delete from t_trends where id = #{id}
</delete>
<delete id="deleteTTrendsByIds" parameterType="String">
delete from t_trends where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<insert id="batchUpsert" parameterType="java.util.List">
INSERT INTO t_trends (
trade_date,
eastmoney_industry_code,
eastmoney_industry_name,
stocks_count,
trend_value,
trend_value_change,
rank,
rank_change,
momentum_type,
create_time,
update_time
) VALUES
<foreach collection="list" item="item" separator=",">
(
#{item.tradeDate},
#{item.eastmoneyIndustryCode},
#{item.eastmoneyIndustryName},
#{item.stocksCount},
#{item.trendValue},
#{item.trendValueChange},
#{item.rank},
#{item.rankChange},
#{item.momentumType},
#{item.createTime},
#{item.updateTime}
)
</foreach>
ON DUPLICATE KEY UPDATE
stocks_count = VALUES(stocks_count),
trend_value = VALUES(trend_value),
trend_value_change = VALUES(trend_value_change),
rank = VALUES(rank),
rank_change = VALUES(rank_change),
update_time = VALUES(update_time)
</insert>
</mapper>

@ -0,0 +1,108 @@
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 80022
Source Host : localhost:3306
Source Database : ry_refactor0120
Target Server Type : MYSQL
Target Server Version : 80022
File Encoding : 65001
Date: 2026-01-21 10:00:00
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for t_stock_financial (股票财务数据表 - 按月分区)
-- ----------------------------
DROP TABLE IF EXISTS `t_stock_financial`;
CREATE TABLE `t_stock_financial` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`stock_code` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '股票代码',
`report_period` date NOT NULL COMMENT '报告期',
`net_profit_growth_rate_yoy` decimal(50, 4) NULL DEFAULT NULL COMMENT '净利润同比增长率',
`net_profit_growth_rate_qoq` decimal(50, 4) NULL DEFAULT NULL COMMENT '净利润环比增长率',
`roe` decimal(50, 4) NULL DEFAULT NULL COMMENT '净资产收益率ROE',
`eps_basic` decimal(50, 4) NULL DEFAULT NULL COMMENT '每股收益EPS',
`net_profit` decimal(50, 4) NULL DEFAULT NULL COMMENT '净利润',
`basic_eps` decimal(50, 4) NULL DEFAULT NULL COMMENT '基本每股收益',
`bps` decimal(50, 4) NULL DEFAULT NULL COMMENT '每股净资产BPS',
`create_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` datetime NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
UNIQUE KEY `uk_stock_period` (`stock_code`, `report_period`),
PRIMARY KEY (`id`, `report_period`),
INDEX `idx_stock_code` (`stock_code`),
INDEX `idx_report_period` (`report_period`),
INDEX `idx_create_time` (`create_time`)
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '股票财务数据表' ROW_FORMAT = Dynamic
PARTITION BY RANGE (YEAR(report_period)*100 + MONTH(report_period)) (
PARTITION p202210 VALUES LESS THAN (202211),
PARTITION p202211 VALUES LESS THAN (202212),
PARTITION p202212 VALUES LESS THAN (202301),
PARTITION p202301 VALUES LESS THAN (202302),
PARTITION p202302 VALUES LESS THAN (202303),
PARTITION p202303 VALUES LESS THAN (202304),
PARTITION p202304 VALUES LESS THAN (202305),
PARTITION p202305 VALUES LESS THAN (202306),
PARTITION p202306 VALUES LESS THAN (202307),
PARTITION p202307 VALUES LESS THAN (202308),
PARTITION p202308 VALUES LESS THAN (202309),
PARTITION p202309 VALUES LESS THAN (202310),
PARTITION p202310 VALUES LESS THAN (202311),
PARTITION p202311 VALUES LESS THAN (202312),
PARTITION p202312 VALUES LESS THAN (202401),
PARTITION p202401 VALUES LESS THAN (202402),
PARTITION p202402 VALUES LESS THAN (202403),
PARTITION p202403 VALUES LESS THAN (202404),
PARTITION p202404 VALUES LESS THAN (202405),
PARTITION p202405 VALUES LESS THAN (202406),
PARTITION p202406 VALUES LESS THAN (202407),
PARTITION p202407 VALUES LESS THAN (202408),
PARTITION p202408 VALUES LESS THAN (202409),
PARTITION p202409 VALUES LESS THAN (202410),
PARTITION p202410 VALUES LESS THAN (202411),
PARTITION p202411 VALUES LESS THAN (202412),
PARTITION p202412 VALUES LESS THAN (202501),
PARTITION p202501 VALUES LESS THAN (202502),
PARTITION p202502 VALUES LESS THAN (202503),
PARTITION p202503 VALUES LESS THAN (202504),
PARTITION p202504 VALUES LESS THAN (202505),
PARTITION p202505 VALUES LESS THAN (202506),
PARTITION p202506 VALUES LESS THAN (202507),
PARTITION p202507 VALUES LESS THAN (202508),
PARTITION p202508 VALUES LESS THAN (202509),
PARTITION p202509 VALUES LESS THAN (202510),
PARTITION p202510 VALUES LESS THAN (202511),
PARTITION p202511 VALUES LESS THAN (202512),
PARTITION p202512 VALUES LESS THAN (202601),
PARTITION p202601 VALUES LESS THAN (202602),
PARTITION p202602 VALUES LESS THAN (202603),
PARTITION p202603 VALUES LESS THAN (202604),
PARTITION p202604 VALUES LESS THAN (202605),
PARTITION p202605 VALUES LESS THAN (202606),
PARTITION p202606 VALUES LESS THAN (202607),
PARTITION p202607 VALUES LESS THAN (202608),
PARTITION p202608 VALUES LESS THAN (202609),
PARTITION p202609 VALUES LESS THAN (202610),
PARTITION p202610 VALUES LESS THAN (202611),
PARTITION p202611 VALUES LESS THAN (202612),
PARTITION p202612 VALUES LESS THAN (202701),
PARTITION p202701 VALUES LESS THAN (202702),
PARTITION p202702 VALUES LESS THAN (202703),
PARTITION p202703 VALUES LESS THAN (202704),
PARTITION p202704 VALUES LESS THAN (202705),
PARTITION p202705 VALUES LESS THAN (202706),
PARTITION p202706 VALUES LESS THAN (202707),
PARTITION p202707 VALUES LESS THAN (202708),
PARTITION p202708 VALUES LESS THAN (202709),
PARTITION p202709 VALUES LESS THAN (202710),
PARTITION p202710 VALUES LESS THAN (202711),
PARTITION p202711 VALUES LESS THAN (202712),
PARTITION p202712 VALUES LESS THAN MAXVALUE
);
SET FOREIGN_KEY_CHECKS = 1;

@ -0,0 +1,116 @@
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 80022
Source Host : localhost:3306
Source Database : ry_refactor0120
Target Server Type : MYSQL
Target Server Version : 80022
File Encoding : 65001
Date: 2026-01-21 10:00:00
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for t_stocks_in_trend (趋势中的股票表 - 按月分区)
-- ----------------------------
DROP TABLE IF EXISTS `t_stocks_in_trend`;
CREATE TABLE `t_stocks_in_trend` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`stock_code` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '股票代码',
`trade_date` date NOT NULL COMMENT '交易日期',
`rank` int NULL DEFAULT -1 COMMENT '排名',
`momentum_type` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '动量数据类型10日、20日',
`create_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` datetime NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
UNIQUE KEY `uk_stock_date_type` (`stock_code`, `trade_date`, `momentum_type`),
PRIMARY KEY (`id`, `trade_date`),
INDEX `idx_stock_code` (`stock_code`),
INDEX `idx_trade_date` (`trade_date`),
INDEX `idx_momentum_type` (`momentum_type`),
INDEX `idx_rank` (`rank`),
INDEX `idx_create_time` (`create_time`)
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '趋势中的股票表' ROW_FORMAT = Dynamic
PARTITION BY RANGE (YEAR(trade_date)*100 + MONTH(trade_date)) (
PARTITION p202111 VALUES LESS THAN (202112),
PARTITION p202112 VALUES LESS THAN (202201),
PARTITION p202201 VALUES LESS THAN (202202),
PARTITION p202202 VALUES LESS THAN (202203),
PARTITION p202203 VALUES LESS THAN (202204),
PARTITION p202204 VALUES LESS THAN (202205),
PARTITION p202205 VALUES LESS THAN (202206),
PARTITION p202206 VALUES LESS THAN (202207),
PARTITION p202207 VALUES LESS THAN (202208),
PARTITION p202208 VALUES LESS THAN (202209),
PARTITION p202209 VALUES LESS THAN (202210),
PARTITION p202210 VALUES LESS THAN (202211),
PARTITION p202211 VALUES LESS THAN (202212),
PARTITION p202212 VALUES LESS THAN (202301),
PARTITION p202301 VALUES LESS THAN (202302),
PARTITION p202302 VALUES LESS THAN (202303),
PARTITION p202303 VALUES LESS THAN (202304),
PARTITION p202304 VALUES LESS THAN (202305),
PARTITION p202305 VALUES LESS THAN (202306),
PARTITION p202306 VALUES LESS THAN (202307),
PARTITION p202307 VALUES LESS THAN (202308),
PARTITION p202308 VALUES LESS THAN (202309),
PARTITION p202309 VALUES LESS THAN (202310),
PARTITION p202310 VALUES LESS THAN (202311),
PARTITION p202311 VALUES LESS THAN (202312),
PARTITION p202312 VALUES LESS THAN (202401),
PARTITION p202401 VALUES LESS THAN (202402),
PARTITION p202402 VALUES LESS THAN (202403),
PARTITION p202403 VALUES LESS THAN (202404),
PARTITION p202404 VALUES LESS THAN (202405),
PARTITION p202405 VALUES LESS THAN (202406),
PARTITION p202406 VALUES LESS THAN (202407),
PARTITION p202407 VALUES LESS THAN (202408),
PARTITION p202408 VALUES LESS THAN (202409),
PARTITION p202409 VALUES LESS THAN (202410),
PARTITION p202410 VALUES LESS THAN (202411),
PARTITION p202411 VALUES LESS THAN (202412),
PARTITION p202412 VALUES LESS THAN (202501),
PARTITION p202501 VALUES LESS THAN (202502),
PARTITION p202502 VALUES LESS THAN (202503),
PARTITION p202503 VALUES LESS THAN (202504),
PARTITION p202504 VALUES LESS THAN (202505),
PARTITION p202505 VALUES LESS THAN (202506),
PARTITION p202506 VALUES LESS THAN (202507),
PARTITION p202507 VALUES LESS THAN (202508),
PARTITION p202508 VALUES LESS THAN (202509),
PARTITION p202509 VALUES LESS THAN (202510),
PARTITION p202510 VALUES LESS THAN (202511),
PARTITION p202511 VALUES LESS THAN (202512),
PARTITION p202512 VALUES LESS THAN (202601),
PARTITION p202601 VALUES LESS THAN (202602),
PARTITION p202602 VALUES LESS THAN (202603),
PARTITION p202603 VALUES LESS THAN (202604),
PARTITION p202604 VALUES LESS THAN (202605),
PARTITION p202605 VALUES LESS THAN (202606),
PARTITION p202606 VALUES LESS THAN (202607),
PARTITION p202607 VALUES LESS THAN (202608),
PARTITION p202608 VALUES LESS THAN (202609),
PARTITION p202609 VALUES LESS THAN (202610),
PARTITION p202610 VALUES LESS THAN (202611),
PARTITION p202611 VALUES LESS THAN (202612),
PARTITION p202612 VALUES LESS THAN (202701),
PARTITION p202701 VALUES LESS THAN (202702),
PARTITION p202702 VALUES LESS THAN (202703),
PARTITION p202703 VALUES LESS THAN (202704),
PARTITION p202704 VALUES LESS THAN (202705),
PARTITION p202705 VALUES LESS THAN (202706),
PARTITION p202706 VALUES LESS THAN (202707),
PARTITION p202707 VALUES LESS THAN (202708),
PARTITION p202708 VALUES LESS THAN (202709),
PARTITION p202709 VALUES LESS THAN (202710),
PARTITION p202710 VALUES LESS THAN (202711),
PARTITION p202711 VALUES LESS THAN (202712),
PARTITION p202712 VALUES LESS THAN MAXVALUE
);
SET FOREIGN_KEY_CHECKS = 1;

@ -0,0 +1,121 @@
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 80022
Source Host : localhost:3306
Source Database : ry_refactor0120
Target Server Type : MYSQL
Target Server Version : 80022
File Encoding : 65001
Date: 2026-01-21 10:00:00
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for t_trends (趋势表 - 按月分区)
-- ----------------------------
DROP TABLE IF EXISTS `t_trends`;
CREATE TABLE `t_trends` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`trade_date` date NOT NULL COMMENT '交易日期',
`eastmoney_industry_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '所属东财行业代码',
`eastmoney_industry_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '所属东财行业名称',
`stocks_count` decimal(50, 4) NULL DEFAULT -1.0000 COMMENT '动量个股数量',
`trend_value` decimal(50, 4) NULL DEFAULT -1.0000 COMMENT '动量值',
`trend_value_change` decimal(50, 4) NULL DEFAULT -1.0000 COMMENT '动量值变化',
`rank` int NULL DEFAULT -1 COMMENT '板块排名',
`rank_change` int NULL DEFAULT -1 COMMENT '板块排名变化',
`momentum_type` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '动量数据类型10日、20日',
`create_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` datetime NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
UNIQUE KEY `uk_date_industry_type` (`trade_date`, `eastmoney_industry_code`, `momentum_type`),
PRIMARY KEY (`id`, `trade_date`),
INDEX `idx_trade_date` (`trade_date`),
INDEX `idx_eastmoney_industry_code` (`eastmoney_industry_code`),
INDEX `idx_momentum_type` (`momentum_type`),
INDEX `idx_rank` (`rank`),
INDEX `idx_create_time` (`create_time`)
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '趋势表' ROW_FORMAT = Dynamic
PARTITION BY RANGE (YEAR(trade_date)*100 + MONTH(trade_date)) (
PARTITION p202111 VALUES LESS THAN (202112),
PARTITION p202112 VALUES LESS THAN (202201),
PARTITION p202201 VALUES LESS THAN (202202),
PARTITION p202202 VALUES LESS THAN (202203),
PARTITION p202203 VALUES LESS THAN (202204),
PARTITION p202204 VALUES LESS THAN (202205),
PARTITION p202205 VALUES LESS THAN (202206),
PARTITION p202206 VALUES LESS THAN (202207),
PARTITION p202207 VALUES LESS THAN (202208),
PARTITION p202208 VALUES LESS THAN (202209),
PARTITION p202209 VALUES LESS THAN (202210),
PARTITION p202210 VALUES LESS THAN (202211),
PARTITION p202211 VALUES LESS THAN (202212),
PARTITION p202212 VALUES LESS THAN (202301),
PARTITION p202301 VALUES LESS THAN (202302),
PARTITION p202302 VALUES LESS THAN (202303),
PARTITION p202303 VALUES LESS THAN (202304),
PARTITION p202304 VALUES LESS THAN (202305),
PARTITION p202305 VALUES LESS THAN (202306),
PARTITION p202306 VALUES LESS THAN (202307),
PARTITION p202307 VALUES LESS THAN (202308),
PARTITION p202308 VALUES LESS THAN (202309),
PARTITION p202309 VALUES LESS THAN (202310),
PARTITION p202310 VALUES LESS THAN (202311),
PARTITION p202311 VALUES LESS THAN (202312),
PARTITION p202312 VALUES LESS THAN (202401),
PARTITION p202401 VALUES LESS THAN (202402),
PARTITION p202402 VALUES LESS THAN (202403),
PARTITION p202403 VALUES LESS THAN (202404),
PARTITION p202404 VALUES LESS THAN (202405),
PARTITION p202405 VALUES LESS THAN (202406),
PARTITION p202406 VALUES LESS THAN (202407),
PARTITION p202407 VALUES LESS THAN (202408),
PARTITION p202408 VALUES LESS THAN (202409),
PARTITION p202409 VALUES LESS THAN (202410),
PARTITION p202410 VALUES LESS THAN (202411),
PARTITION p202411 VALUES LESS THAN (202412),
PARTITION p202412 VALUES LESS THAN (202501),
PARTITION p202501 VALUES LESS THAN (202502),
PARTITION p202502 VALUES LESS THAN (202503),
PARTITION p202503 VALUES LESS THAN (202504),
PARTITION p202504 VALUES LESS THAN (202505),
PARTITION p202505 VALUES LESS THAN (202506),
PARTITION p202506 VALUES LESS THAN (202507),
PARTITION p202507 VALUES LESS THAN (202508),
PARTITION p202508 VALUES LESS THAN (202509),
PARTITION p202509 VALUES LESS THAN (202510),
PARTITION p202510 VALUES LESS THAN (202511),
PARTITION p202511 VALUES LESS THAN (202512),
PARTITION p202512 VALUES LESS THAN (202601),
PARTITION p202601 VALUES LESS THAN (202602),
PARTITION p202602 VALUES LESS THAN (202603),
PARTITION p202603 VALUES LESS THAN (202604),
PARTITION p202604 VALUES LESS THAN (202605),
PARTITION p202605 VALUES LESS THAN (202606),
PARTITION p202606 VALUES LESS THAN (202607),
PARTITION p202607 VALUES LESS THAN (202608),
PARTITION p202608 VALUES LESS THAN (202609),
PARTITION p202609 VALUES LESS THAN (202610),
PARTITION p202610 VALUES LESS THAN (202611),
PARTITION p202611 VALUES LESS THAN (202612),
PARTITION p202612 VALUES LESS THAN (202701),
PARTITION p202701 VALUES LESS THAN (202702),
PARTITION p202702 VALUES LESS THAN (202703),
PARTITION p202703 VALUES LESS THAN (202704),
PARTITION p202704 VALUES LESS THAN (202705),
PARTITION p202705 VALUES LESS THAN (202706),
PARTITION p202706 VALUES LESS THAN (202707),
PARTITION p202707 VALUES LESS THAN (202708),
PARTITION p202708 VALUES LESS THAN (202709),
PARTITION p202709 VALUES LESS THAN (202710),
PARTITION p202710 VALUES LESS THAN (202711),
PARTITION p202711 VALUES LESS THAN (202712),
PARTITION p202712 VALUES LESS THAN MAXVALUE
);
SET FOREIGN_KEY_CHECKS = 1;

@ -0,0 +1,38 @@
/*
Navicat Premium Dump SQL
Source Server : 192.168.0.222
Source Server Type : MySQL
Source Server Version : 80031 (8.0.31)
Source Host : 192.168.0.222:3306
Source Schema : ry_refactor0120
Target Server Type : MySQL
Target Server Version : 80031 (8.0.31)
File Encoding : 65001
Date: 24/01/2026 14:48:04
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for stock_financial
-- ----------------------------
DROP TABLE IF EXISTS `stock_financial`;
CREATE TABLE `stock_financial` (
`id` double NOT NULL AUTO_INCREMENT COMMENT 'idstock_basis',
`code` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '股票代码',
`period` date NULL DEFAULT NULL COMMENT '报告期',
`jlrtbzzl` decimal(50, 4) NULL DEFAULT NULL COMMENT '净利润同比增长率',
`jlrhbzzl` decimal(50, 4) NULL DEFAULT NULL COMMENT '净利润环比增长率',
`jzcsylroe` decimal(50, 4) NULL DEFAULT NULL COMMENT '净资产收益率ROE',
`epsbasic` decimal(50, 4) NULL DEFAULT NULL COMMENT '每股收益EPS',
`jlr` decimal(50, 4) NULL DEFAULT NULL COMMENT '净利润',
`jbmgsy` decimal(50, 4) NULL DEFAULT NULL COMMENT '基本每股收益',
`mgjzc` decimal(50, 4) NULL DEFAULT NULL COMMENT '每股净资产BPS',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 172707 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'A股财务数据' ROW_FORMAT = DYNAMIC;
SET FOREIGN_KEY_CHECKS = 1;

@ -0,0 +1,33 @@
/*
Navicat Premium Dump SQL
Source Server : 192.168.0.222
Source Server Type : MySQL
Source Server Version : 80031 (8.0.31)
Source Host : 192.168.0.222:3306
Source Schema : ry_refactor0120
Target Server Type : MySQL
Target Server Version : 80031 (8.0.31)
File Encoding : 65001
Date: 24/01/2026 14:48:23
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for stocks_in_trend
-- ----------------------------
DROP TABLE IF EXISTS `stocks_in_trend`;
CREATE TABLE `stocks_in_trend` (
`id` double NOT NULL AUTO_INCREMENT,
`code` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
`trade_day` date NULL DEFAULT NULL COMMENT '交易日期',
`sort` int NULL DEFAULT -1 COMMENT '排名',
`type` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '动量数据类型10日、20日',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2692129 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '动量个股' ROW_FORMAT = DYNAMIC;
SET FOREIGN_KEY_CHECKS = 1;

@ -0,0 +1,37 @@
/*
Navicat Premium Dump SQL
Source Server : 192.168.0.222
Source Server Type : MySQL
Source Server Version : 80031 (8.0.31)
Source Host : 192.168.0.222:3306
Source Schema : ry_refactor0120
Target Server Type : MySQL
Target Server Version : 80031 (8.0.31)
File Encoding : 65001
Date: 24/01/2026 14:49:00
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for trends
-- ----------------------------
DROP TABLE IF EXISTS `trends`;
CREATE TABLE `trends` (
`id` double NOT NULL AUTO_INCREMENT,
`trade_day` date NULL DEFAULT NULL COMMENT '交易日期',
`blemind2` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '所属东财行业指数2级',
`stocks_count` decimal(50, 2) NULL DEFAULT -1.00 COMMENT '动量个股数量',
`trend_value` decimal(50, 2) NULL DEFAULT -1.00 COMMENT '动量值',
`trend_value_change` decimal(50, 2) NULL DEFAULT -1.00 COMMENT '动量值变化',
`sort` int NULL DEFAULT -1 COMMENT '板块排名',
`sort_change` int NULL DEFAULT -1 COMMENT '板块排名变化',
`type` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '动量数据类型',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 449078 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '动量结果' ROW_FORMAT = DYNAMIC;
SET FOREIGN_KEY_CHECKS = 1;
Loading…
Cancel
Save