From f1a48cc9a60c269add9c2f459c5988559fc4d12f Mon Sep 17 00:00:00 2001
From: moyongzhen <2534173414@qq.com>
Date: Wed, 10 Apr 2024 15:04:30 +0800
Subject: [PATCH 1/4] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E8=BD=A8=E8=BF=B9=20?=
=?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=8F=82=E6=95=B0=E8=B0=83=E6=95=B4=E6=88=90?=
=?UTF-8?q?UnifyResultDto?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/SJZY.Track.Application.Contract/Services/ITrackService.cs | 2 +-
.../Services/ProvideServices/TrackService.Query.cs | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/SJZY.Track.Application.Contract/Services/ITrackService.cs b/src/SJZY.Track.Application.Contract/Services/ITrackService.cs
index 31dae617..904f834d 100644
--- a/src/SJZY.Track.Application.Contract/Services/ITrackService.cs
+++ b/src/SJZY.Track.Application.Contract/Services/ITrackService.cs
@@ -31,5 +31,5 @@ public interface ITrackService : IRemoteService
///
///
///
- Task> QueryAsync(GetTrackInput input);
+ Task QueryAsync(GetTrackInput input);
}
\ No newline at end of file
diff --git a/src/SJZY.Track.Application/Services/ProvideServices/TrackService.Query.cs b/src/SJZY.Track.Application/Services/ProvideServices/TrackService.Query.cs
index 3864b604..74f4e52f 100644
--- a/src/SJZY.Track.Application/Services/ProvideServices/TrackService.Query.cs
+++ b/src/SJZY.Track.Application/Services/ProvideServices/TrackService.Query.cs
@@ -17,7 +17,7 @@ public partial class TrackService
///
///
[HttpPost("Track/Query")]
- public async Task> QueryAsync(GetTrackInput input)
+ public async Task QueryAsync(GetTrackInput input)
{
if (input.OrderNos.Count > 500)
{
@@ -50,7 +50,7 @@ public partial class TrackService
await TrackDetailSort(res, input);
- return res;
+ return new UnifyResultDto(true, res, "操作成功");
}
private async Task TrackDetailSort(List list, GetTrackInput input)
From 636f189e50de0c4207efc88309c473182dda1598 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=86=9B?= <2357729423@qq.com>
Date: Wed, 10 Apr 2024 15:22:17 +0800
Subject: [PATCH 2/4] =?UTF-8?q?version=EF=BC=9A7.0.1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../SJZY.Track.Application.Contract.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/SJZY.Track.Application.Contract/SJZY.Track.Application.Contract.csproj b/src/SJZY.Track.Application.Contract/SJZY.Track.Application.Contract.csproj
index 1b129506..7f1f52a3 100644
--- a/src/SJZY.Track.Application.Contract/SJZY.Track.Application.Contract.csproj
+++ b/src/SJZY.Track.Application.Contract/SJZY.Track.Application.Contract.csproj
@@ -5,7 +5,7 @@
net7.0
True
- 7.0.0
+ 7.0.1
True
From 8e9f5931e4916d3751a8ed0703090a6b362deabc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=86=9B?= <2357729423@qq.com>
Date: Wed, 10 Apr 2024 15:27:52 +0800
Subject: [PATCH 3/4] =?UTF-8?q?opt=EF=BC=9A=E8=BD=A8=E8=BF=B9=E6=8E=A8?=
=?UTF-8?q?=E9=80=81=E5=90=8E=E6=9B=B4=E6=96=B0=E8=AE=A2=E5=8D=95=E5=90=88?=
=?UTF-8?q?=E5=B9=B6=E5=88=B0=E6=8E=A8=E9=80=81=E5=A4=84=E7=90=86=E9=80=BB?=
=?UTF-8?q?=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../TrackPushAfterUpdateOrderEventHandler.cs | 50 -------------------
1 file changed, 50 deletions(-)
delete mode 100644 src/SJZY.Track.Application/EventHandlers/TrackPushAfterUpdateOrderEventHandler.cs
diff --git a/src/SJZY.Track.Application/EventHandlers/TrackPushAfterUpdateOrderEventHandler.cs b/src/SJZY.Track.Application/EventHandlers/TrackPushAfterUpdateOrderEventHandler.cs
deleted file mode 100644
index a6c65fdd..00000000
--- a/src/SJZY.Track.Application/EventHandlers/TrackPushAfterUpdateOrderEventHandler.cs
+++ /dev/null
@@ -1,50 +0,0 @@
-using DotNetCore.CAP;
-using SJZY.Track.Application.Contract.Dtos.TrackPush;
-using SJZY.Track.Domain.Aggregates.OrderAggregate;
-using SJZY.Track.Domain.Consts;
-using SJZY.Track.Domain.Enums;
-using Volo.Abp.DependencyInjection;
-
-namespace SJZY.Track.Application.EventHandlers;
-
-public class TrackPushAfterUpdateOrderEventHandler : ITransientDependency, ICapSubscribe
-{
- private readonly IOrderRepository _orderRepository;
-
- public TrackPushAfterUpdateOrderEventHandler(IOrderRepository orderRepository)
- {
- _orderRepository = orderRepository;
- }
-
- [CapSubscribe(GlobalConst.TrackPushAfterUpdateOrderSubscribe)]
- public async Task ConsumerAsync(TrackPushAfterUpdateOrderDto dto)
- {
- var order = await _orderRepository.GetFirstAsync(x => x.Id == dto.OrderId);
- if (order == default) return;
-
- /*
- * 异常:最近一条推送是失败
- */
- if (!dto.IsSuccess)
- {
- order.QuestionType = (int)TrackProblemType.Error;
- order.LatestPushError = dto.Message;
- }
- else
- {
- order.QuestionType = (int)TrackProblemType.None;
- order.LatestPushError = null;
- if (dto.OptionType == OptionType.新增)
- {
- // tips:只有新增会影响推送进度
- order.LatestPushTrackCode = dto.TrackCode;
- order.LatestPushTime = DateTime.Now;
- }
- }
-
- await _orderRepository.UpdateColumnAsync(order, x => new
- {
- x.LatestPushTrackCode, x.QuestionType, x.LatestPushError, x.LatestPushTime
- });
- }
-}
\ No newline at end of file
From 6ef5ba86cf9f0e6cdc34807bb1910d8dd9a679b5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=86=9B?= <2357729423@qq.com>
Date: Wed, 10 Apr 2024 19:18:18 +0800
Subject: [PATCH 4/4] =?UTF-8?q?opt=EF=BC=9A=E5=BC=80=E5=90=AFcap=E5=A4=9A?=
=?UTF-8?q?=E7=BA=BF=E7=A8=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/SJZY.Track.Application/SjzyTrackApplicationModule.cs | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/SJZY.Track.Application/SjzyTrackApplicationModule.cs b/src/SJZY.Track.Application/SjzyTrackApplicationModule.cs
index f9f5633a..26725fbd 100644
--- a/src/SJZY.Track.Application/SjzyTrackApplicationModule.cs
+++ b/src/SJZY.Track.Application/SjzyTrackApplicationModule.cs
@@ -84,7 +84,13 @@ namespace SJZY.Track.Application
configure.UserName = configuration["RabbitMQ:UserName"]!;
configure.Password = configuration["RabbitMQ:Password"]!;
configure.Port = configuration.GetValue("RabbitMQ:Port");
+ configure.BasicQosOptions =
+ new RabbitMQOptions.BasicQos(configuration.GetValue("CAP:PrefetchCount"));
});
+ options.FailedRetryInterval = configuration.GetValue("CAP:FailedRetryInterval");
+ options.FailedRetryCount = configuration.GetValue("CAP:FailedRetryCount");
+ options.UseDispatchingPerGroup = configuration.GetValue("CAP:UseDispatchingPerGroup");
+ options.ConsumerThreadCount = configuration.GetValue("CAP:ConsumerThreadCount");
// options.TopicNamePrefix = "v1";
options.SucceedMessageExpiredAfter = 6 * 60 * 60;