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

@@ -15,13 +15,13 @@ type StratModel struct {
StratKey string
Ymd int
Code string
UpDateMonth int //上市时间,
UpDateDay int //上市时间,
IndustryScore int // 行业分组
IsSt int
StScore int
GtAmount int // 每日交易额大于设定值
GtPrice int // 最近20日交易日价格大于设定值
GtRoe int // ROE 是否大于设定值
Desc string
}
func init() {
@@ -42,6 +42,10 @@ func NewStratModel(key, code string) *StratModel {
return &obj
}
func (s *StratModel) AddDesc(d string) {
s.Desc = s.Desc + "||" + d
}
func (s *StratModel) Save() error {
var cnt int64
impl.DBService.Model(&StratModel{}).Where("strat_key=? and ymd=? and code=?", s.StratKey, s.Ymd, s.Code).Count(&cnt)