轨迹明细使用订单id查询
This commit is contained in:
parent
adae3501fa
commit
6580831a4a
@ -13,4 +13,5 @@ public interface ITrackDetailsRepository
|
|||||||
Task<List<TrackDetailsIndex>> GetListAsync(int orderType, List<string> orderNos);
|
Task<List<TrackDetailsIndex>> GetListAsync(int orderType, List<string> orderNos);
|
||||||
|
|
||||||
Task<(List<TrackDetailsIndex> list, long total)> GetListAsync(TrackDetailsQueryInput input);
|
Task<(List<TrackDetailsIndex> list, long total)> GetListAsync(TrackDetailsQueryInput input);
|
||||||
|
Task<List<TrackDetailsIndex>> GetListAsync(int orderId);
|
||||||
}
|
}
|
||||||
@ -73,6 +73,21 @@ internal class TrackDetailsRepository : ElasticSearchContextAbstract<TrackDetail
|
|||||||
return data.Documents.ToList();
|
return data.Documents.ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<List<TrackDetailsIndex>> GetListAsync(int orderId)
|
||||||
|
{
|
||||||
|
var data = await Context.SearchAsync<TrackDetailsIndex>(x => x
|
||||||
|
.Source(s => s.Includes(fd => fd
|
||||||
|
.Field(f => f.TrackStatus)
|
||||||
|
.Field(f => f.TrackCode)
|
||||||
|
.Field(f => f.TrackContent)
|
||||||
|
.Field(f => f.TrackPlace)
|
||||||
|
.Field(f => f.TrackTime)
|
||||||
|
.Field(f => f.TraceTimeZone)
|
||||||
|
)).Query(q => q.Terms(t => t.Field(f => f.OrderId).Terms(orderId))));
|
||||||
|
|
||||||
|
return data?.Documents?.ToList();
|
||||||
|
}
|
||||||
|
|
||||||
public async Task<(List<TrackDetailsIndex> list, long total)> GetListAsync(TrackDetailsQueryInput input)
|
public async Task<(List<TrackDetailsIndex> list, long total)> GetListAsync(TrackDetailsQueryInput input)
|
||||||
{
|
{
|
||||||
if (input.OrderNos.Count < 1) return default;
|
if (input.OrderNos.Count < 1) return default;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user