fix recommend_desc

This commit is contained in:
yanweidong
2026-02-12 22:21:03 +08:00
parent 7091f8d6d1
commit 729301c771
2 changed files with 3 additions and 1 deletions

View File

@@ -30,6 +30,7 @@ func Starter(ctx *gin.Context) {
// 过滤无需AI分析 // 过滤无需AI分析
if model.UpDateDay > 180 && model.StScore > 0 && model.IndustryScore > 1 && model.GtPrice > 0 && model.GtAmount > 0 && model.GtRoe > 0 && model.ScoreRsi > 0 { if model.UpDateDay > 180 && model.StScore > 0 && model.IndustryScore > 1 && model.GtPrice > 0 && model.GtAmount > 0 && model.GtRoe > 0 && model.ScoreRsi > 0 {
model.AiScore = 0 // 待分析 model.AiScore = 0 // 待分析
model.RecommendDesc = "Rule规则"
} else { } else {
model.AiScore = -2 model.AiScore = -2
model.AddDesc("无需AI分析") model.AddDesc("无需AI分析")
@@ -42,7 +43,7 @@ func Starter(ctx *gin.Context) {
// 加入资金流向特大的标地 // 加入资金流向特大的标地
var codes []string var codes []string
impl.DBService.Model(&models.MoneyTotal{}).Where("is_greater_pervious = ? and last3_day_mf_amount>?", true, 100000).Pluck("code", &codes) impl.DBService.Model(&models.MoneyTotal{}).Where("is_greater_pervious = ? and last3_day_mf_amount>?", true, 100000).Pluck("code", &codes)
impl.DBService.Model(&models.StratModel{}).Where("ai_score=-2 and code in ?", codes).Update("ai_score", 0) impl.DBService.Model(&models.StratModel{}).Where("ai_score=-2 and code in ?", codes).Updates(map[string]any{"ai_score": 0, "recommend_desc": "资金流向"})
strategy.BootAiStart("selector", ymd) strategy.BootAiStart("selector", ymd)
log.Println("Strategy END.") log.Println("Strategy END.")

View File

@@ -23,6 +23,7 @@ type StratModel struct {
GtPrice int // 最近20日交易日价格大于设定值 GtPrice int // 最近20日交易日价格大于设定值
GtRoe int // ROE 是否大于设定值 GtRoe int // ROE 是否大于设定值
ScoreRsi int ScoreRsi int
RecommendDesc string // 推荐描述
// 值 // 值
ValRoe float64 ValRoe float64