Browse Source

工单更新 推送类型存储错误

田爽 7 months ago
parent
commit
a4966cbeb2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Hotline.Api/Controllers/OrderController.cs

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

@@ -3230,7 +3230,7 @@ public class OrderController : BaseController
             var pushTypeAny = await _orderPushTypeRepository.AnyAsync(x => x.OrderId == order.Id);
             if (pushTypeAny)
                 await _orderPushTypeRepository.RemoveAsync(x => x.OrderId == order.Id);
-            order.OrderPushTypes.ForEach(x => x.OrderId = order.Id);
+            dto.OrderPushTypes.ForEach(x => x.OrderId = order.Id);
             var orderPushTypes = _mapper.Map<List<OrderPushType>>(dto.OrderPushTypes);
             await _orderPushTypeRepository.AddRangeAsync(orderPushTypes);
             var pushTypes = dto.OrderPushTypes.Select(x => x.PushType);