fix(log): date is empty
This commit is contained in:
parent
73ffd0d1c7
commit
f8e6cf515e
@ -37,6 +37,11 @@ func (l *FilterTrafficLogDetailsLogic) FilterTrafficLogDetails(req *types.Filter
|
|||||||
}
|
}
|
||||||
start = day
|
start = day
|
||||||
end = day.Add(24*time.Hour - time.Nanosecond)
|
end = day.Add(24*time.Hour - time.Nanosecond)
|
||||||
|
} else {
|
||||||
|
// query today
|
||||||
|
now := time.Now()
|
||||||
|
start = time.Date(now.Year(), now.Month(), now.Day(), 0, 0, 0, 0, now.Location())
|
||||||
|
end = start.Add(24*time.Hour - time.Nanosecond)
|
||||||
}
|
}
|
||||||
var data []*traffic.TrafficLog
|
var data []*traffic.TrafficLog
|
||||||
tx := l.svcCtx.DB.WithContext(l.ctx).Model(&traffic.TrafficLog{})
|
tx := l.svcCtx.DB.WithContext(l.ctx).Model(&traffic.TrafficLog{})
|
||||||
|
|||||||
@ -216,7 +216,7 @@ func (l *SubscribeLogic) getServers(userSub *user.Subscribe) ([]*node.Node, erro
|
|||||||
Page: 1,
|
Page: 1,
|
||||||
Size: 1000,
|
Size: 1000,
|
||||||
ServerId: nodeIds,
|
ServerId: nodeIds,
|
||||||
Tag: tags,
|
Tag: tool.RemoveDuplicateElements(tags...),
|
||||||
Preload: true,
|
Preload: true,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user