fix: unsupport convision time

This commit is contained in:
2024-03-26 18:56:00 +08:00
parent 40bf70de17
commit de9eb71c8a

View File

@@ -112,7 +112,7 @@ func (s *BarProcessor) Execute(data any) (any, error) {
for _, ne := range nes {
//log.Debug("ne:", ne)
sql := fmt.Sprintf("select * from ne_state where ne_type='%s' and ne_id='%s'", ne.NeType, ne.NeId) + " order by str_to_date(timestamp, '%Y-%m-%dT%H:%i:%s') desc limit 1"
sql := fmt.Sprintf("select * from ne_state where ne_type='%s' and ne_id='%s' order by `timestamp` desc limit 1", ne.NeType, ne.NeId)
log.Debug("SQL:", sql)
neState, err := dborm.XormGetDataBySQL(sql)
if err != nil {