|
@@ -1,4 +1,5 @@
|
|
using Dapr;
|
|
using Dapr;
|
|
|
|
+using Dapr.Client;
|
|
using Hotline.Application.TimeLimits;
|
|
using Hotline.Application.TimeLimits;
|
|
using Hotline.CallCenter.BlackLists;
|
|
using Hotline.CallCenter.BlackLists;
|
|
using Hotline.CallCenter.Devices;
|
|
using Hotline.CallCenter.Devices;
|
|
@@ -51,6 +52,7 @@ public class TestController : BaseController
|
|
private readonly ITimeLimitApplication _timeLimitApplication;
|
|
private readonly ITimeLimitApplication _timeLimitApplication;
|
|
private readonly IDistributedLock _distributedLock;
|
|
private readonly IDistributedLock _distributedLock;
|
|
private readonly IWexClient _wexClient;
|
|
private readonly IWexClient _wexClient;
|
|
|
|
+ private readonly DaprClient _daprClient;
|
|
private readonly IGroupManager _goupManager;
|
|
private readonly IGroupManager _goupManager;
|
|
|
|
|
|
//private readonly ITypedCache<List<User>> _cache;
|
|
//private readonly ITypedCache<List<User>> _cache;
|
|
@@ -75,7 +77,8 @@ public class TestController : BaseController
|
|
IMediator mediator,
|
|
IMediator mediator,
|
|
ITimeLimitApplication timeLimitApplication,
|
|
ITimeLimitApplication timeLimitApplication,
|
|
IDistributedLock distributedLock,
|
|
IDistributedLock distributedLock,
|
|
- IWexClient wexClient
|
|
|
|
|
|
+ IWexClient wexClient,
|
|
|
|
+ DaprClient daprClient
|
|
)
|
|
)
|
|
{
|
|
{
|
|
_logger = logger;
|
|
_logger = logger;
|
|
@@ -93,6 +96,7 @@ public class TestController : BaseController
|
|
_timeLimitApplication = timeLimitApplication;
|
|
_timeLimitApplication = timeLimitApplication;
|
|
_distributedLock = distributedLock;
|
|
_distributedLock = distributedLock;
|
|
_wexClient = wexClient;
|
|
_wexClient = wexClient;
|
|
|
|
+ _daprClient = daprClient;
|
|
}
|
|
}
|
|
|
|
|
|
[HttpGet("time")]
|
|
[HttpGet("time")]
|
|
@@ -100,8 +104,10 @@ public class TestController : BaseController
|
|
{
|
|
{
|
|
//var rsp = await _wexClient.QueryTelsAsync(new QueryTelRequest { StaffNo = "123" }, HttpContext.RequestAborted);
|
|
//var rsp = await _wexClient.QueryTelsAsync(new QueryTelRequest { StaffNo = "123" }, HttpContext.RequestAborted);
|
|
|
|
|
|
- return DateTime.Now.ToString("F");
|
|
|
|
|
|
+ //return DateTime.Now.ToString("F");
|
|
|
|
|
|
|
|
+ var rsp = await _daprClient.InvokeMethodAsync<string>(HttpMethod.Get, "identity", "api/v1/Test/time", HttpContext.RequestAborted);
|
|
|
|
+ return rsp;
|
|
}
|
|
}
|
|
|
|
|
|
[HttpGet("pgsql")]
|
|
[HttpGet("pgsql")]
|