@@ -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
|
||||
|
||||
Reference in New Issue
Block a user