feat: 选股器重构 V2 — 概念板块/多行业地域/PS/布林带均线/北向资金#56
Merged
Conversation
Copilot
AI
changed the title
[WIP] Refactor stock selector for enhanced usability and features
feat: 选股器重构 V2 — 概念板块/多行业地域/PS/布林带均线/北向资金
Apr 18, 2026
chenachen
marked this pull request as ready for review
April 18, 2026 14:17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
选股器已有基础多维度筛选,但未利用项目后续接入的概念板块、北向持仓、技术因子等数据源。本次重构扩展筛选维度并增强返回数据。
新增筛选维度
conceptCodes: string[]) — INNER JOINths_index_members按同花顺概念板块多选过滤industries/areas: string[]) — 升级为数组,SQLANY()匹配,向后兼容旧单选字段minPsTtm/maxPsTtm) — 利用已有stock_daily_valuation_metrics.ps_ttmbollSignal: 'above_upper' | 'below_lower' | 'squeeze')maTrend: 'bullish' | 'bearish') — 使用boll_mid近似 MA20 + MACD DIF 方向northboundOnly: boolean) — INNER JOIN LATERALhk_hold_detail最新持仓新增端点
POST /stock/screener/concepts— 返回同花顺概念板块列表(24h Redis 缓存),供前端下拉多选返回字段增强
psTtm: number | null— 市销率 TTMconcepts: string[] | null— 所属概念板块名称列表(批量查询,避免 N+1)新增排序字段 & 内置预设
排序新增
PS_TTM、CLOSE。预设新增 4 个:北向重仓、技术突破、超跌反弹、低PS高成长。概念名称批量查询示例
其他
@ArrayMaxSize()防止过大查询BOLL_SQUEEZE_THRESHOLD常量docs/design/选股器重构-后端设计.mdWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
checkpoint.prisma.io/opt/hostedtoolcache/node/24.14.1/x64/bin/node /opt/hostedtoolcache/node/24.14.1/x64/bin/node /home/REDACTED/work/server-code/server-code/node_modules/prisma/build/child {"product":"prisma","version":"6.19.2","cli_install_type":"local","information":"","local_timestamp":"2026-04-18T03:40:52Z","project_hash":"230dd102","cli_path":"/home/REDACTED/work/server-code/server-code/node_modules/.bin/prisma","cli_path_hash":"5a210d3d(dns block)/opt/hostedtoolcache/node/24.14.1/x64/bin/node /opt/hostedtoolcache/node/24.14.1/x64/bin/node /home/REDACTED/work/server-code/server-code/node_modules/prisma/build/child {"product":"prisma","version":"6.19.2","cli_install_type":"local","information":"","local_timestamp":"2026-04-18T03:41:03Z","project_hash":"230dd102","cli_path":"/home/REDACTED/work/server-code/server-code/node_modules/.bin/prisma","cli_path_hash":"5a210d3d(dns block)scarf.sh/home/REDACTED/work/_temp/ghcca-node/node/bin/node node ./report.js(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt