|
|
@ -146,11 +146,11 @@ func (the *consumerAXYThemeToES) onData(topic string, msg string) bool { |
|
|
|
|
|
|
|
judgeBool := false |
|
|
|
|
|
|
|
esAtime1, esErr := time.Parse("2006-01-02T15:04:05.000+0800", esTimeStr) |
|
|
|
esAtime := esAtime1.Add(8 * time.Hour) |
|
|
|
esAtime1, esErr := time.Parse("2006-01-02T15:04:05.000Z", esTimeStr) |
|
|
|
if esErr != nil { |
|
|
|
log.Printf("安心云 esAtime数据时间 %s 解析错误: %v", esTimeStr, esErr) |
|
|
|
} |
|
|
|
esAtime := esAtime1.Add(8 * time.Hour) // 转为北京时间
|
|
|
|
|
|
|
|
newAtime, newErr := time.Parse("2006-01-02T15:04:05.000+0800", newTimeStr) |
|
|
|
if newErr != nil { |
|
|
@ -189,8 +189,8 @@ func (the *consumerAXYThemeToES) judgeTime(rawMsg string) (string, string) { |
|
|
|
log.Printf("反序列化 异常 dev数据=%s", rawMsg) |
|
|
|
} |
|
|
|
|
|
|
|
queryStr := the.getESTimeQueryStr(theme.Station.Id, theme.Station.Id) |
|
|
|
TimeTheme, err := the.OutEs.SearchThemeData("savoir_last_theme", queryStr) |
|
|
|
queryStr := the.getESTimeQueryStr(theme.Station.Structure.Id, theme.Station.Id) |
|
|
|
TimeTheme, err := the.OutEs.SearchThemeData("anxincloud_last_theme", queryStr) |
|
|
|
log.Printf("判断 esTimeStr:%s,newTimeStr:%s", TimeTheme[0].CollectTime, theme.AcqTime) |
|
|
|
return TimeTheme[0].CollectTime, theme.AcqTime |
|
|
|
} |
|
|
|