diff --git a/src/SJZY.Track.Application/Rabbit/TrackRefreshEventHandler.cs b/src/SJZY.Track.Application/Rabbit/TrackRefreshEventHandler.cs index b02d2b14..fd31a601 100644 --- a/src/SJZY.Track.Application/Rabbit/TrackRefreshEventHandler.cs +++ b/src/SJZY.Track.Application/Rabbit/TrackRefreshEventHandler.cs @@ -304,7 +304,7 @@ public class TrackRefreshEventHandler : ITransientDependency, IRabbitHandler // 新增服务商轨迹到es var track = new TrackDetailsIndex { - IndexName = $"{GlobalConst.TrackIndex}-{DateTime.Now:yyyy.MM.dd}", + IndexName = $"{GlobalConst.TrackDetailsIndex}-{DateTime.Now:yyyy.MM.dd}", SubSystemId = context.SubSystemId, OrderId = context.OrderId, OrderType = context.OrderType, diff --git a/src/SJZY.Track.Domain/Aggregates/TrackDetailsAggregate/TrackDetailsIndex.cs b/src/SJZY.Track.Domain/Aggregates/TrackDetailsAggregate/TrackDetailsIndex.cs index 62560ee4..522daf0d 100644 --- a/src/SJZY.Track.Domain/Aggregates/TrackDetailsAggregate/TrackDetailsIndex.cs +++ b/src/SJZY.Track.Domain/Aggregates/TrackDetailsAggregate/TrackDetailsIndex.cs @@ -4,7 +4,7 @@ using SJZY.Track.Domain.Consts; namespace SJZY.Track.Domain.Aggregates.TrackDetailsAggregate; -[ElasticsearchType(RelationName = GlobalConst.TrackIndex)] +[ElasticsearchType(RelationName = GlobalConst.TrackDetailsIndex)] public class TrackDetailsIndex : IdBaseIndex { /// diff --git a/src/SJZY.Track.Domain/Aggregates/TrackPushAggregate/TrackPushRecordIndex.cs b/src/SJZY.Track.Domain/Aggregates/TrackPushAggregate/TrackPushRecordIndex.cs index 41bba894..f983a5a6 100644 --- a/src/SJZY.Track.Domain/Aggregates/TrackPushAggregate/TrackPushRecordIndex.cs +++ b/src/SJZY.Track.Domain/Aggregates/TrackPushAggregate/TrackPushRecordIndex.cs @@ -4,7 +4,7 @@ using SJZY.Track.Domain.Consts; namespace SJZY.Track.Domain.Aggregates.TrackPushAggregate; -[ElasticsearchType(RelationName = GlobalConst.TrackPushRecordsIndex)] +[ElasticsearchType(RelationName = GlobalConst.TrackPushRecordIndex)] public class TrackPushRecordIndex : IdBaseIndex { /// diff --git a/src/SJZY.Track.Domain/Consts/GlobalConst.ES.cs b/src/SJZY.Track.Domain/Consts/GlobalConst.ES.cs index 04d82607..0a0a5d9c 100644 --- a/src/SJZY.Track.Domain/Consts/GlobalConst.ES.cs +++ b/src/SJZY.Track.Domain/Consts/GlobalConst.ES.cs @@ -5,12 +5,12 @@ public partial class GlobalConst /// /// 轨迹明细 es索引名称(模板按天) /// - public const string TrackIndex = "sjzy_track_details"; + public const string TrackDetailsIndex = "sjzy_track_details"; /// /// 轨迹推送记录 es索引名称(模板按天) /// - public const string TrackPushRecordsIndex = "sjzy_track_push_records"; + public const string TrackPushRecordIndex = "sjzy_track_push_records"; /// /// 运输时效预警记录 es索引名称(模板按天) diff --git a/src/SJZY.Track.Repository/Repositories/OrderOperationRecordEsRepository.cs b/src/SJZY.Track.Repository/Repositories/OrderOperationRecordEsRepository.cs index 49babdaa..99d71604 100644 --- a/src/SJZY.Track.Repository/Repositories/OrderOperationRecordEsRepository.cs +++ b/src/SJZY.Track.Repository/Repositories/OrderOperationRecordEsRepository.cs @@ -2,12 +2,11 @@ using Nest; using SJZY.Expand.ABP.Core.Logger; using SJZY.Expand.ElasticSearch.Services; using SJZY.Track.Domain.Aggregates.OrderAggregate; -using SJZY.Track.Domain.Aggregates.TrackDetailsAggregate; using SJZY.Track.Domain.Consts; namespace SJZY.Track.Repository.Repositories; -public class OrderOperationRecordEsRepository : ElasticSearchContextAbstract, +public class OrderOperationRecordEsRepository : ElasticSearchContextAbstract, IOrderOperationRecordEsRepository, ITransientDependency { @@ -33,7 +32,7 @@ public class OrderOperationRecordEsRepository : ElasticSearchContextAbstract> GetOrderOperationsByIdAsync(int orderId) { var data = await Context.SearchAsync(x => x - .Index(GlobalConst.TrackPushRecordsIndex) + .Index(GlobalConst.OrderOperationRecordIndex) .Query(q => q.Term(t => t.OrderId, orderId) ) diff --git a/src/SJZY.Track.Repository/Repositories/TrackDetailsEsRepository.cs b/src/SJZY.Track.Repository/Repositories/TrackDetailsEsRepository.cs index f715843a..37ad9be1 100644 --- a/src/SJZY.Track.Repository/Repositories/TrackDetailsEsRepository.cs +++ b/src/SJZY.Track.Repository/Repositories/TrackDetailsEsRepository.cs @@ -153,7 +153,7 @@ public class TrackDetailsEsRepository : ElasticSearchContextAbstract tracks) { // 按天写入es - var indexName = $"{GlobalConst.TrackIndex}-{DateTime.Now:yyyy.MM.dd}"; + var indexName = $"{GlobalConst.TrackDetailsIndex}-{DateTime.Now:yyyy.MM.dd}"; tracks.ForEach(x => x.IndexName = indexName); var r = await Context.IndexManyAsync(tracks, indexName); @@ -167,7 +167,7 @@ public class TrackDetailsEsRepository : ElasticSearchContextAbstract s.Index(indexName)); diff --git a/src/SJZY.Track.Repository/Repositories/TrackPushRecordEsRepository.cs b/src/SJZY.Track.Repository/Repositories/TrackPushRecordEsRepository.cs index bd555b33..5e448eaa 100644 --- a/src/SJZY.Track.Repository/Repositories/TrackPushRecordEsRepository.cs +++ b/src/SJZY.Track.Repository/Repositories/TrackPushRecordEsRepository.cs @@ -1,13 +1,12 @@ using Nest; using SJZY.Expand.ABP.Core.Logger; using SJZY.Expand.ElasticSearch.Services; -using SJZY.Track.Domain.Aggregates.TrackDetailsAggregate; using SJZY.Track.Domain.Aggregates.TrackPushAggregate; using SJZY.Track.Domain.Consts; namespace SJZY.Track.Repository.Repositories; -public class TrackPushRecordEsRepository : ElasticSearchContextAbstract, +public class TrackPushRecordEsRepository : ElasticSearchContextAbstract, ITrackPushRecordEsRepository, ITransientDependency { @@ -17,7 +16,7 @@ public class TrackPushRecordEsRepository : ElasticSearchContextAbstract request @@ -35,7 +34,7 @@ public class TrackPushRecordEsRepository : ElasticSearchContextAbstract x.IndexName = indexName); var r = await Context.IndexManyAsync(records, indexName); @@ -50,7 +49,7 @@ public class TrackPushRecordEsRepository : ElasticSearchContextAbstract> GetTrackPushRecordsAsync(int orderId) { var data = await Context.SearchAsync(x => x - .Index(GlobalConst.TrackPushRecordsIndex) + .Index(GlobalConst.TrackPushRecordIndex) .Query(q => q.Term(t => t.OrderId, orderId) ) @@ -63,7 +62,7 @@ public class TrackPushRecordEsRepository : ElasticSearchContextAbstract GetLatestTrackPushRecordAsync(int orderId) { var data = await Context.SearchAsync(x => x - .Index(GlobalConst.TrackPushRecordsIndex) + .Index(GlobalConst.TrackPushRecordIndex) .Query(q => q.Term(t => t.OrderId, orderId) ) diff --git a/src/SJZY.Track.Repository/Repositories/WarningRecordEsRepository.cs b/src/SJZY.Track.Repository/Repositories/WarningRecordEsRepository.cs index a3d73b5e..e898ea3f 100644 --- a/src/SJZY.Track.Repository/Repositories/WarningRecordEsRepository.cs +++ b/src/SJZY.Track.Repository/Repositories/WarningRecordEsRepository.cs @@ -33,7 +33,7 @@ public class WarningRecordEsRepository : ElasticSearchContextAbstract x.IndexName = indexName); var r = await Context.IndexManyAsync(warningRecords, indexName);