| | |
| | | { |
| | | public class GetStaticsWorker : AsyncPeriodicBackgroundWorkerBase |
| | | { |
| | | private readonly ILifePayService _lifePayService; |
| | | private readonly IStatisticsService _statisticService; |
| | | private readonly int _doWorkHour = 0; |
| | | private readonly int _doWorkMinute = 30; |
| | | public GetStaticsWorker(AbpAsyncTimer timer, IServiceScopeFactory serviceScopeFactory, ILifePayService lifePayService) : base(timer, serviceScopeFactory) |
| | | public GetStaticsWorker(AbpAsyncTimer timer, IServiceScopeFactory serviceScopeFactory, IStatisticsService statisticService) : base(timer, serviceScopeFactory) |
| | | { |
| | | _lifePayService = lifePayService; |
| | | _statisticService = statisticService; |
| | | timer.Period = PeriodTool.CalcuPeriodFromEveryDayTime(_doWorkHour, _doWorkMinute, 0); |
| | | //timer.Period =5 * 60000; |
| | | //timer.Period =1 * 60000; |
| | | } |
| | | |
| | | [UnitOfWork] |
| | |
| | | { |
| | | try |
| | | { |
| | | await _lifePayService.GetTopStatistics(); |
| | | await _statisticService.GetTopStatistics(); |
| | | Logger.LogError($"获取统计信息开始: {DateTime.Now}"); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | "CorsOrigins": "http://localhost:31804" |
| | | }, |
| | | "ElasticSearch": { |
| | | "Url": "http://localhost:9200" |
| | | "Url": "http://106.12.151.86:19200", |
| | | "UserName": "elastic", |
| | | "PassWord": "bole5201314" |
| | | }, |
| | | "Redis": { |
| | | "Configuration": "localhost:6379" |
| | | "Configuration": "118.178.252.28:5390,defaultDatabase=5,password=Bole123!" |
| | | }, |
| | | "AliYunSMSSetting": { |
| | | "AliYunSmsAccessId": "LTAI4G5qXfYeS14JxEeN9JxF", |
| | |
| | | "CheckPath": false, |
| | | "AppName": "C端客户端" |
| | | }, |
| | | "RabbitMQ": { |
| | | "Connections": { |
| | | "Default": { |
| | | "HostName": "118.178.252.28", |
| | | "UserName": "admin", |
| | | "Password": "Bole12345678", |
| | | "Port": "5673" |
| | | } |
| | | }, |
| | | "EventBus": { |
| | | "ClientName": "MsDemo_LifePaymentService_Development_Ling1122", |
| | | "ExchangeName": "MsDemo_Development_Ling1122" |
| | | } |
| | | }, |
| | | "InitSetting": { |
| | | "SelfSupportingServiceName": "壹贰叁叁叁信息技术", |
| | | "PlatServicePhone": "13005741111", |