diff --git a/ticker.go b/ticker.go index 650b26d..2a7d672 100644 --- a/ticker.go +++ b/ticker.go @@ -1,6 +1,7 @@ package core import ( + "encoding/json" "fmt" "reflect" "strconv" @@ -68,3 +69,11 @@ func ToFloat64(val interface{}) float64 { } return valf } + +// TODO 有待实现 +func (ti *TickerInfo) SetToKey(cr *Core) error { + js, _ := json.Marshal(*ti) + plateName := ti.InstId + "|tickerInfo" + _, err := cr.RedisLocalCli.Set(plateName, string(js), 0).Result() + return err +}