update: 调整查询订单列表反参中第三方单号格式,过滤三方单号为空的条目

This commit is contained in:
云龙 王 2024-11-20 10:01:59 +08:00
parent 9a785d55db
commit 96457adabe

View File

@ -202,7 +202,7 @@ public class OrderRepository : BasicRepository<OrderEntity>, IOrderRepository, I
/// <summary> /// <summary>
/// 拼接多个三方单号,默认使用分隔符默认(、) /// 拼接多个三方单号,默认使用分隔符默认(、)
/// 第三方单号,服务商-轨迹0000000、轨迹服务商-0000000 /// 第三方单号展示: 0000000(服务商)、0000000(服务商)
/// </summary> /// </summary>
/// <param name="orderPlatformNumberEntities"></param> /// <param name="orderPlatformNumberEntities"></param>
/// <returns></returns> /// <returns></returns>
@ -210,7 +210,8 @@ public class OrderRepository : BasicRepository<OrderEntity>, IOrderRepository, I
{ {
const string separator = "、"; const string separator = "、";
var thirdPartyOrderNumbers = orderPlatformNumberEntities var thirdPartyOrderNumbers = orderPlatformNumberEntities
.Select(x => $"{x.Platform}-{x.OrderNumber}").ToList(); .Where(x => !string.IsNullOrWhiteSpace(x.OrderNumber))
.Select(x => $"{x.OrderNumber}({x.Platform})").ToList();
return string.Join(separator, thirdPartyOrderNumbers); return string.Join(separator, thirdPartyOrderNumbers);
} }