|
@@ -1,4 +1,5 @@
|
|
using Dapr;
|
|
using Dapr;
|
|
|
|
+using Hotline.Application.TimeLimits;
|
|
using Hotline.CallCenter.BlackLists;
|
|
using Hotline.CallCenter.BlackLists;
|
|
using Hotline.CallCenter.Devices;
|
|
using Hotline.CallCenter.Devices;
|
|
using Hotline.CallCenter.Ivrs;
|
|
using Hotline.CallCenter.Ivrs;
|
|
@@ -9,6 +10,8 @@ using Hotline.Identity.Roles;
|
|
using Hotline.Realtimes;
|
|
using Hotline.Realtimes;
|
|
using Hotline.Repository.SqlSugar;
|
|
using Hotline.Repository.SqlSugar;
|
|
using Hotline.Share.Dtos.Realtime;
|
|
using Hotline.Share.Dtos.Realtime;
|
|
|
|
+using Hotline.Share.Dtos.Settings;
|
|
|
|
+using Hotline.Share.Enums.Settings;
|
|
using Hotline.Users;
|
|
using Hotline.Users;
|
|
using MediatR;
|
|
using MediatR;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
@@ -43,6 +46,8 @@ public class TestController : BaseController
|
|
private readonly IRoleRepository _roleRepository;
|
|
private readonly IRoleRepository _roleRepository;
|
|
private readonly IMediator _mediator;
|
|
private readonly IMediator _mediator;
|
|
|
|
|
|
|
|
+ private readonly ITimeLimitApplication _timeLimitApplication;
|
|
|
|
+
|
|
//private readonly ITypedCache<List<User>> _cache;
|
|
//private readonly ITypedCache<List<User>> _cache;
|
|
//private readonly ICacheManager<User> _cache;
|
|
//private readonly ICacheManager<User> _cache;
|
|
|
|
|
|
@@ -74,7 +79,8 @@ public class TestController : BaseController
|
|
IIvrDomainService ivrDomainService,
|
|
IIvrDomainService ivrDomainService,
|
|
ISugarUnitOfWork<HotlineDbContext> uow,
|
|
ISugarUnitOfWork<HotlineDbContext> uow,
|
|
IRoleRepository roleRepository,
|
|
IRoleRepository roleRepository,
|
|
- IMediator mediator
|
|
|
|
|
|
+ IMediator mediator,
|
|
|
|
+ ITimeLimitApplication timeLimitApplication
|
|
)
|
|
)
|
|
{
|
|
{
|
|
_logger = logger;
|
|
_logger = logger;
|
|
@@ -89,6 +95,7 @@ public class TestController : BaseController
|
|
_uow = uow;
|
|
_uow = uow;
|
|
_roleRepository = roleRepository;
|
|
_roleRepository = roleRepository;
|
|
_mediator = mediator;
|
|
_mediator = mediator;
|
|
|
|
+ _timeLimitApplication = timeLimitApplication;
|
|
}
|
|
}
|
|
|
|
|
|
[AllowAnonymous]
|
|
[AllowAnonymous]
|
|
@@ -104,6 +111,15 @@ public class TestController : BaseController
|
|
return a;
|
|
return a;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ [AllowAnonymous]
|
|
|
|
+ [HttpGet("testtime")]
|
|
|
|
+ public async Task<TimeResult> TestTime(DateTime beginTime, ETimeType timeType, int timeValue)
|
|
|
|
+ {
|
|
|
|
+ return _timeLimitApplication.CalcEndTime(beginTime, timeType, timeValue);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
//[AllowAnonymous]
|
|
//[AllowAnonymous]
|
|
[HttpGet("hash")]
|
|
[HttpGet("hash")]
|
|
public async Task Hash()
|
|
public async Task Hash()
|