|
@@ -125,9 +125,10 @@ public class TestController : BaseController
|
|
|
//private readonly ITypedCache<List<User>> _cache;
|
|
|
//private readonly ICacheManager<User> _cache;
|
|
|
private readonly ICalcExpireTime _expireTime;
|
|
|
+ private readonly IOptions<CityBaseConfiguration> _cityBaseConfiguration;
|
|
|
|
|
|
|
|
|
- public TestController(
|
|
|
+ public TestController(
|
|
|
//INewRockClient client,
|
|
|
ILogger<TestController> logger,
|
|
|
//IAuthorizeGenerator authorizeGenerator,
|
|
@@ -175,8 +176,10 @@ IRepository<Hotspot> hotspotRepository,
|
|
|
IOrderDomainService orderDomainService,
|
|
|
ICallApplication callApplication,
|
|
|
IOptionsSnapshot<AppConfiguration> appOptions,
|
|
|
- ISystemSettingCacheManager systemSettingCacheManager
|
|
|
- )
|
|
|
+ ISystemSettingCacheManager systemSettingCacheManager,
|
|
|
+ ICalcExpireTime expireTime,
|
|
|
+ IOptions<CityBaseConfiguration> cityBaseConfiguration
|
|
|
+ )
|
|
|
{
|
|
|
_logger = logger;
|
|
|
//_authorizeGenerator = authorizeGenerator;
|
|
@@ -224,7 +227,9 @@ ICallApplication callApplication,
|
|
|
_callApplication = callApplication;
|
|
|
_appOptions = appOptions;
|
|
|
_systemSettingCacheManager = systemSettingCacheManager;
|
|
|
- }
|
|
|
+ _expireTime = expireTime;
|
|
|
+ _cityBaseConfiguration = cityBaseConfiguration;
|
|
|
+ }
|
|
|
|
|
|
|
|
|
[HttpGet("time")]
|
|
@@ -687,10 +692,14 @@ ICallApplication callApplication,
|
|
|
[HttpGet("t5")]
|
|
|
public async Task<string> GetUserAllowAnonymous()
|
|
|
{
|
|
|
- var users = await _userRepository.Queryable()
|
|
|
- .FirstAsync(d => d.Name == "xf", HttpContext.RequestAborted);
|
|
|
- return users.Id;
|
|
|
- }
|
|
|
+ //var users = await _userRepository.Queryable()
|
|
|
+ // .FirstAsync(d => d.Name == "xf", HttpContext.RequestAborted);
|
|
|
+ //return users.Id;
|
|
|
+ var b = _cityBaseConfiguration.Value;
|
|
|
+
|
|
|
+ var a = await _expireTime.WorkDay_ZG(DateTime.Now);
|
|
|
+ return string.Empty;
|
|
|
+ }
|
|
|
|
|
|
[HttpGet("t6")]
|
|
|
public async Task<string> GetUserWithAuth()
|