using SJZY.Expand.ElasticSearch.Services; using SJZY.Track.Domain.Dtos.TrackDetails; using SJZY.Track.Domain.Enums; namespace SJZY.Track.Domain.Aggregates.TrackDetailsAggregate; public interface ITrackDetailsEsRepository : IElasticsearchClientService { Task> GetListAsync(int[] orderIds, string trackCode, bool forUpsert = false); // 复杂查询,返回 k:订单id v:轨迹列表 Task>> GetOrderTracksDictAsync(GetOrderTracksDictVO input); // 查询订单的每个轨迹状态的最旧/早轨迹,返回 k:订单id v:[k:轨迹状态id,v:最早轨迹] Task>> GetTrackStatusEarliestDictAsync(HashSet orderIds); // 查询订单的最新/晚轨迹,返回 k:订单id v:最早轨迹,按创建时间 Task> GetLatestDictAsync(HashSet orderIds); Task> GetLatestListAsync(int[] eventOrderIds, List trackCodes); Task> GetListAsync(int subSystemId, int orderType, List orderNos, List? trackCodes = null); Task AnyAsync(int orderId, string originTrackDataHash); Task UpdateAsync(TrackDetailsIndex index); Task UpdateManyAsync(List indexes, int maxRetries = 3); Task BulkUpdateAsync(List indexes, int maxRetries = 3); Task AddManyAsync(List index); Task AddAsync(TrackDetailsIndex track); Task> GetListAsync(int orderId); Task> GetListAsync(int[] orderIds, List? trackCodes = null, TrackSourceEnum? source = null); Task> DeleteTrackAsync(int[] orderIds, List trackCodes); Task DeleteTrackByIdAsync(string id, string indexName); Task DeleteTrackByIdsAsync(HashSet esIds); Task> GetDataByIds(string[] ids); Task GetDetailAsync(string orderNo, string trackCode, int orderType, int subSystemId, DateTime trackTime); Task MigrateAsync(); }