打分列表增加信号方向快捷筛选

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
fish
2026-05-03 17:01:51 +08:00
parent 7d49aff6c7
commit df28200eb0
5 changed files with 41 additions and 1 deletions

View File

@@ -48,6 +48,7 @@ type ScoreFilter struct {
TsCode string
Start string
End string
Signal string
Limit int
}
@@ -69,6 +70,10 @@ func (s *FuturesStore) ListScores(f ScoreFilter) ([]Score, error) {
q += " AND trade_date <= " + next()
args = append(args, f.End)
}
if f.Signal != "" {
q += " AND signal LIKE " + next()
args = append(args, "%"+f.Signal+"%")
}
q += " ORDER BY trade_date DESC, id DESC"
if f.Limit <= 0 || f.Limit > 500 {
f.Limit = 200