add lastUpdate to candle and max

This commit is contained in:
zhangkun9038@dingtalk.com 2024-12-18 13:44:35 +08:00
parent bcf0347002
commit 49b7411728
2 changed files with 2 additions and 0 deletions

View File

@ -249,6 +249,7 @@ func (cl *Candle) ToStruct(core *Core) (*Candle, error) {
ncd.Period = cl.Period
ncd.InstID = cl.InstID
ncd.From = cl.From
ncd.LastUpdate = cl.LastUpdate
// 将字符串转换为 int64 类型的时间戳
ts, err := strconv.ParseInt(cl.Data[0].(string), 10, 64)

1
maX.go
View File

@ -99,6 +99,7 @@ func (mx *MaX) PushToWriteLogChan(cr *Core) error {
mx0.Count = mx.Count
mx0.Ts = mx.Ts
mx0.AvgVal = mx.AvgVal
mx0.LastUpdate = mx.LastUpdate
hs := HashString(did)
md, _ := json.Marshal(mx0)
wg := WriteLog{