|
@@ -64,6 +64,7 @@ using NETCore.Encrypt;
|
|
|
using NETCore.Encrypt.Internal;
|
|
|
using SqlSugar;
|
|
|
using System.Text;
|
|
|
+using Hotline.BatchTask;
|
|
|
using XC.RSAUtil;
|
|
|
using XF.Domain.Authentications;
|
|
|
using XF.Domain.Cache;
|
|
@@ -75,6 +76,9 @@ using XF.Domain.Repository;
|
|
|
using Order = Hotline.Orders.Order;
|
|
|
using OrderDto = Hotline.Share.Dtos.Order.OrderDto;
|
|
|
using Hotline.Schedulings;
|
|
|
+using Hotline.Share.Dtos.BatchTask;
|
|
|
+using Hotline.Share.Enums.BatchTask;
|
|
|
+using Hotline.Application.OrderApp.OrderVisitApp;
|
|
|
|
|
|
namespace Hotline.Api.Controllers;
|
|
|
|
|
@@ -138,6 +142,7 @@ public class TestController : BaseController
|
|
|
private readonly IRepository<OrderSecondaryHandling> _orderSecondaryHandlingRepository;
|
|
|
private readonly IRepository<Message> _messageRepository;
|
|
|
private readonly IRepository<Scheduling> _schedulingRepository;
|
|
|
+ private readonly IApptaskDomainService _apptaskDomainService;
|
|
|
|
|
|
|
|
|
public TestController(
|
|
@@ -196,9 +201,9 @@ public class TestController : BaseController
|
|
|
IRepository<OrderVisit> orderVisitRepository,
|
|
|
IServiceProvider serviceProvider,
|
|
|
IRepository<OrderSecondaryHandling> orderSecondaryHandlingRepository,
|
|
|
- IRepository<Message> messageRepository
|
|
|
-,
|
|
|
- IRepository<Scheduling> schedulingRepository)
|
|
|
+ IRepository<Message> messageRepository,
|
|
|
+ IRepository<Scheduling> schedulingRepository,
|
|
|
+ IApptaskDomainService apptaskDomainService)
|
|
|
{
|
|
|
_logger = logger;
|
|
|
_options = options;
|
|
@@ -253,6 +258,7 @@ public class TestController : BaseController
|
|
|
_orderSecondaryHandlingRepository = orderSecondaryHandlingRepository;
|
|
|
_messageRepository = messageRepository;
|
|
|
_schedulingRepository = schedulingRepository;
|
|
|
+ _apptaskDomainService = apptaskDomainService;
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 测试
|
|
@@ -1602,5 +1608,28 @@ public class TestController : BaseController
|
|
|
|
|
|
return $"共计: {total}, 成功:{successed}";
|
|
|
}
|
|
|
+
|
|
|
+ [AllowAnonymous]
|
|
|
+ [HttpGet("addapptask")]
|
|
|
+ public async Task AddAppTask()
|
|
|
+ {
|
|
|
+ await _apptaskDomainService.AddAsync(new AddApptaskRequest
|
|
|
+ {
|
|
|
+ TaskType = ETaskType.VoiceVisit,
|
|
|
+ TryLimit = 5,
|
|
|
+ ApptaskItems = new List<AddApptaskItemRequest>
|
|
|
+ {
|
|
|
+ new AddApptaskItemRequest
|
|
|
+ {
|
|
|
+ BusinessId = Ulid.NewUlid().ToString(),
|
|
|
+ TaskParams = new VoiceVisitRequest
|
|
|
+ {
|
|
|
+ PhoneNo = "15881089499",
|
|
|
+ VisitId = Ulid.NewUlid().ToString()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }, HttpContext.RequestAborted);
|
|
|
+ }
|
|
|
}
|
|
|
|