From b9193005246a240803e197bd5b4e04239f1df07d Mon Sep 17 00:00:00 2001
From: xiaolipro <2357729423@qq.com>
Date: Thu, 5 Sep 2024 17:34:09 +0800
Subject: [PATCH] =?UTF-8?q?=E3=80=90=20=20=20=202.=20=E6=96=B0=E5=A2=9E?=
=?UTF-8?q?=E8=AE=A2=E5=8D=95=E6=8E=A5=E5=8F=A3=E5=A2=9E=E5=8A=A0=E4=B8=80?=
=?UTF-8?q?=E4=B8=AA=E6=95=B0=E7=BB=84=E7=BB=93=E6=9E=84=EF=BC=9ApullInfo?=
=?UTF-8?q?=EF=BC=8C=E5=85=83=E7=B4=A0=E6=9C=89=EF=BC=9Aapi=E6=9C=8D?=
=?UTF-8?q?=E5=8A=A1=E5=95=86code=EF=BC=8C=E5=BC=80=E5=A7=8Bcode=EF=BC=8C?=
=?UTF-8?q?=E7=BB=93=E6=9D=9Fcode=EF=BC=8C=E4=BB=A5=E5=8F=8A=E9=9D=99?=
=?UTF-8?q?=E9=BB=98=E6=97=B6=E9=97=B4=EF=BC=8C=E5=81=9C=E6=AD=A2=E5=88=B7?=
=?UTF-8?q?=E6=96=B0=E6=97=B6=E9=97=B4=E3=80=82=E3=80=91=20https://www.tap?=
=?UTF-8?q?d.cn/60863849/prong/tasks/view/1160863849001027886?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Dtos/ProvideServices/OrderNoInfo.cs | 14 +++++++
.../Dtos/ProvideServices/UpdateOrderInput.cs | 41 +++++++++++++++++++
.../Services/ProvideServices/OrderService.cs | 5 +--
.../ProvideServices/TrackService.Query.cs | 3 +-
4 files changed, 58 insertions(+), 5 deletions(-)
diff --git a/src/SJZY.Track.Application.Contract/Dtos/ProvideServices/OrderNoInfo.cs b/src/SJZY.Track.Application.Contract/Dtos/ProvideServices/OrderNoInfo.cs
index 7418c745..48392a10 100644
--- a/src/SJZY.Track.Application.Contract/Dtos/ProvideServices/OrderNoInfo.cs
+++ b/src/SJZY.Track.Application.Contract/Dtos/ProvideServices/OrderNoInfo.cs
@@ -7,6 +7,13 @@ namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;
///
public class OrderNoInfo
{
+ ///
+ /// 子系统id
+ ///
+ [Required]
+ [Range(1, int.MaxValue)]
+ public int SubSystemId { get; set; }
+
///
/// 订单类型,必填
///
@@ -24,6 +31,13 @@ public class OrderNoInfo
public class OrderNosInfo
{
+ ///
+ /// 子系统id
+ ///
+ [Required]
+ [Range(1, int.MaxValue)]
+ public int SubSystemId { get; set; }
+
///
/// 订单类型
///
diff --git a/src/SJZY.Track.Application.Contract/Dtos/ProvideServices/UpdateOrderInput.cs b/src/SJZY.Track.Application.Contract/Dtos/ProvideServices/UpdateOrderInput.cs
index 17a9a838..3bb10008 100644
--- a/src/SJZY.Track.Application.Contract/Dtos/ProvideServices/UpdateOrderInput.cs
+++ b/src/SJZY.Track.Application.Contract/Dtos/ProvideServices/UpdateOrderInput.cs
@@ -61,4 +61,45 @@ public class UpdateOrderInput : OrderNoInfo
/// 产品编码
///
public string? ProductCode { get; set; }
+
+ ///
+ /// 业务key
+ ///
+ public string Key { get; set; }
+
+ ///
+ /// 拉取配置信息
+ ///
+ public List PullConfigInfos { get; set; }
+}
+
+public class PullConfigInfo
+{
+ ///
+ /// 服务商code
+ ///
+ [Required]
+ public string ServiceCode { get; set; }
+
+ ///
+ /// 开始轨迹code
+ ///
+ public string? StartCode { get; set; }
+
+ ///
+ /// 结束轨迹code
+ ///
+ public string? EndCode { get; set; }
+
+ ///
+ /// 静默多久后拉取(小时)
+ ///
+ [Range(0, 24 * 7)]
+ public int SilenceTime { get; set; }
+
+ ///
+ /// 结束多久后停止拉取(小时)
+ ///
+ [Range(0, 24 * 7)]
+ public int StopTime { get; set; }
}
diff --git a/src/SJZY.Track.Application/Services/ProvideServices/OrderService.cs b/src/SJZY.Track.Application/Services/ProvideServices/OrderService.cs
index 4d25a09a..fe813627 100644
--- a/src/SJZY.Track.Application/Services/ProvideServices/OrderService.cs
+++ b/src/SJZY.Track.Application/Services/ProvideServices/OrderService.cs
@@ -4,7 +4,6 @@ using SJZY.Track.Application.Contract.Services;
using SJZY.Track.Domain.Aggregates.OrderAggregate;
using SJZY.Track.Domain.Aggregates.TrackDetailsAggregate;
using SJZY.Track.Domain.Queries;
-using SJZY.UserCenter.HttpApi.Services;
namespace SJZY.Track.Application.Services.ProvideServices;
@@ -34,7 +33,7 @@ public partial class OrderService : ApplicationService, IOrderService
[HttpPost("Order/Upsert")]
public async Task> UpsertAsync(UpsertOrderInput input)
{
- var subSystemId = CurrentUserRequest.SubSystemId;
+ var subSystemId = input.SubSystemId;
// 校验订单是否已存在,存在则更新
var order = await _orderRepository.GetFirstAsync(x =>
@@ -70,7 +69,7 @@ public partial class OrderService : ApplicationService, IOrderService
[HttpPost("Order/Delete")]
public async Task> DeleteOrderAsync(DeleteOrderInput input)
{
- var susSystemId = CurrentUserRequest.SubSystemId;
+ var susSystemId = input.SubSystemId;
var orderId = await _orderRepository.GetFirstAsync(x =>
x.SubSystemId == susSystemId && x.OrderType == input.OrderType && x.OrderNo == input.OrderNo, x => x.Id);
if (orderId == default)
diff --git a/src/SJZY.Track.Application/Services/ProvideServices/TrackService.Query.cs b/src/SJZY.Track.Application/Services/ProvideServices/TrackService.Query.cs
index 19db347d..9eb371f2 100644
--- a/src/SJZY.Track.Application/Services/ProvideServices/TrackService.Query.cs
+++ b/src/SJZY.Track.Application/Services/ProvideServices/TrackService.Query.cs
@@ -1,7 +1,6 @@
using SJZY.Track.Application.Contract.Dtos.ProvideServices;
using SJZY.Track.Domain.Aggregates.TrackDetailsAggregate;
using SJZY.Track.Domain.Consts;
-using SJZY.UserCenter.HttpApi.Services;
namespace SJZY.Track.Application.Services.ProvideServices;
@@ -26,7 +25,7 @@ public partial class TrackService
throw new BusinessException(message: "最多只能查询500单");
}
- var subSystemId = CurrentUserRequest.SubSystemId;
+ var subSystemId = input.SubSystemId;
var res = new List();
input.OrderNos = input.OrderNos.Where(x => !x.IsNullOrWhiteSpace()).Distinct().ToList(); // 单号去重、去空