deving
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user