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
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/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
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)
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;