This commit is contained in:
yanweidong
2026-01-31 18:22:58 +08:00
parent b4310c22cd
commit 32cbe88964
12 changed files with 104 additions and 155 deletions

View File

@@ -1,27 +1,17 @@
package rule
import (
"log"
"strings"
"git.apinb.com/quant/gostock/internal/logic/types"
)
type ST struct {
Key string
Name string
}
func NewST() *ST {
return &ST{
Key: "ST",
Name: "ST",
}
}
func (r *ST) Run(in string) *types.RuleResult {
func (r *RuleFactory) RunST(in string) {
log.Println("RunST:", r.Model.Code, "Args:", in)
if strings.Contains(in, "ST") {
return &types.RuleResult{Key: r.Key, Name: r.Name, Score: -1, Desc: "有退市风险"}
r.Model.StScore = -1
r.Model.AddDesc("有退市风险")
return
}
return &types.RuleResult{Key: r.Key, Name: r.Name, Score: 1, Desc: "无退市风险"}
r.Model.StScore = 1
}