tickerInfo setToKey

This commit is contained in:
zhangkun9038@dingtalk.com 2024-12-15 22:23:46 +08:00
parent c64bbcc35e
commit 877cb88bec

View File

@ -1,6 +1,7 @@
package core package core
import ( import (
"encoding/json"
"fmt" "fmt"
"reflect" "reflect"
"strconv" "strconv"
@ -68,3 +69,11 @@ func ToFloat64(val interface{}) float64 {
} }
return valf 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
}