fix: 修复查询轨迹通过订单号+子系统id查询失败
This commit is contained in:
parent
01c4503158
commit
ac5028587f
@ -127,13 +127,13 @@ public class TrackOrderService : ApplicationService
|
||||
if (whereExpression == default)
|
||||
throw new BusinessException(message: "请求参数异常");
|
||||
|
||||
var subSystemId = await _orderRepository.GetFirstAsync(whereExpression, x => x.SubSystemId);
|
||||
if (subSystemId == default)
|
||||
var order = await _orderRepository.GetFirstAsync(whereExpression);
|
||||
if (order == default)
|
||||
{
|
||||
throw new BusinessException(message: "订单不存在");
|
||||
}
|
||||
|
||||
var trackDetails = await _trackDetailsEsRepository.GetListAsync(orderId ?? 0);
|
||||
var trackDetails = await _trackDetailsEsRepository.GetListAsync(order.Id);
|
||||
if (trackDetails.IsNullOrEmpty())
|
||||
{
|
||||
return new List<TrackOrderDetailDto>();
|
||||
@ -150,7 +150,7 @@ public class TrackOrderService : ApplicationService
|
||||
if (!trackCodes.IsNullOrEmpty())
|
||||
{
|
||||
var trackContents = await _trackContentRepository.GetListAsync(x =>
|
||||
x.SubSystemId == subSystemId && trackCodes.Contains(x.Code), x => new
|
||||
x.SubSystemId == order.SubSystemId && trackCodes.Contains(x.Code), x => new
|
||||
{
|
||||
x.Code,
|
||||
x.IsExternal
|
||||
|
||||
Loading…
Reference in New Issue
Block a user