fix:修复批量新增推送记录缺失创建时间
This commit is contained in:
parent
3bbd633259
commit
24a80c7a50
@ -36,7 +36,11 @@ public class TrackPushRecordEsRepository : ElasticSearchContextAbstract<TrackPus
|
||||
if (!records.Any()) return;
|
||||
// 按天写入es
|
||||
var indexName = $"{GlobalConst.TrackPushRecordIndex}-{DateTime.Now:yyyy.MM.dd}";
|
||||
records.ForEach(x => x.IndexName = indexName);
|
||||
records.ForEach(x =>
|
||||
{
|
||||
x.IndexName = indexName;
|
||||
x.CreateTime = DateTime.Now;
|
||||
});
|
||||
|
||||
var r = await Context.IndexManyAsync(records, indexName);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user