add lastUpdate to candle and max
This commit is contained in:
parent
bcf0347002
commit
49b7411728
@ -249,6 +249,7 @@ func (cl *Candle) ToStruct(core *Core) (*Candle, error) {
|
|||||||
ncd.Period = cl.Period
|
ncd.Period = cl.Period
|
||||||
ncd.InstID = cl.InstID
|
ncd.InstID = cl.InstID
|
||||||
ncd.From = cl.From
|
ncd.From = cl.From
|
||||||
|
ncd.LastUpdate = cl.LastUpdate
|
||||||
|
|
||||||
// 将字符串转换为 int64 类型的时间戳
|
// 将字符串转换为 int64 类型的时间戳
|
||||||
ts, err := strconv.ParseInt(cl.Data[0].(string), 10, 64)
|
ts, err := strconv.ParseInt(cl.Data[0].(string), 10, 64)
|
||||||
|
1
maX.go
1
maX.go
@ -99,6 +99,7 @@ func (mx *MaX) PushToWriteLogChan(cr *Core) error {
|
|||||||
mx0.Count = mx.Count
|
mx0.Count = mx.Count
|
||||||
mx0.Ts = mx.Ts
|
mx0.Ts = mx.Ts
|
||||||
mx0.AvgVal = mx.AvgVal
|
mx0.AvgVal = mx.AvgVal
|
||||||
|
mx0.LastUpdate = mx.LastUpdate
|
||||||
hs := HashString(did)
|
hs := HashString(did)
|
||||||
md, _ := json.Marshal(mx0)
|
md, _ := json.Marshal(mx0)
|
||||||
wg := WriteLog{
|
wg := WriteLog{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user