Эх сурвалжийг харах

order PushTypeCode 问题处理

田爽 1 сар өмнө
parent
commit
b4b4399585

+ 3 - 1
src/Hotline.Api/Controllers/OrderController.cs

@@ -4308,7 +4308,9 @@ public class OrderController : BaseController
             var orderPushTypes = _mapper.Map<List<OrderPushType>>(dto.OrderPushTypes);
             await _orderPushTypeRepository.AddRangeAsync(orderPushTypes);
             var pushTypes = dto.OrderPushTypes.Select(x => x.PushType);
-            order.PushType = string.Join(",", pushTypes);
+			var pushTypeCode = dto.OrderPushTypes.Select(x => x.PushTypeCode);
+            order.PushTypeCode = string.Join(",", pushTypeCode);
+			order.PushType = string.Join(",", pushTypes);
         }
 
         if (dto.Tags != null && dto.Tags.Any())

+ 1 - 1
src/Hotline/Orders/Order.cs

@@ -256,7 +256,7 @@ namespace Hotline.Orders
         public List<string>? DuplicateIds { get; set; }
 
         /// <summary>
-        /// 推送分类 -- 弃用 转为表存储
+        /// 推送分类 --  转为表存储
         /// </summary>
         [SugarColumn(ColumnDescription = "推送分类代码")]
         public string? PushTypeCode { get; set; }

+ 1 - 1
src/Hotline/Orders/OrderDomainService.cs

@@ -445,7 +445,7 @@ public class OrderDomainService : IOrderDomainService, IScopeDependency
         if (string.IsNullOrEmpty(orderId))
             throw UserFriendlyException.SameMessage("无效工单编号");
 
-        var query = _orderRepository.Queryable();
+        var query = _orderRepository.Queryable().Includes(d=>d.OrderPushTypes);
         if (withHotspot)
             query = query.Includes(d => d.Hotspot);
         if (withAcceptor)