| | |
| | | using Consul; |
| | | using FlexJobApi.Core; |
| | | using FlexJobApi.Core.Jobs; |
| | | using Furion; |
| | | using Furion.EventBus; |
| | | using Furion.Schedule; |
| | |
| | | services.AddHealthChecks(); |
| | | |
| | | services.AddConfigurableOptions<WxmpOptions>(); |
| | | services.AddConfigurableOptions<AlipayOptions>(); |
| | | services.AddConfigurableOptions<AliyunOptions>(); |
| | | services.AddConfigurableOptions<BaiduOptions>(); |
| | | |
| | | services.AddComponent<LogServiceComponent>(); |
| | | |
| | |
| | | |
| | | services.AddComponent<DistributedCacheServiceComponent>(); |
| | | |
| | | services.AddHttpRemote(); |
| | | services.AddSingleton<ResourceHttpUtils>(); |
| | | services.AddSingleton<AliyunSmsUtils>(); |
| | | services.AddHttpRemote(); |
| | | services.AddSingleton<AlipayUtils>(); |
| | | services.AddSingleton<AliyunSmsUtils>(); |
| | | services.AddSingleton<WxmpUtils>(); |
| | | services.AddScoped<SmsUtils>(); |
| | | |
| | |
| | | { |
| | | options.BuildSqlType = SqlTypes.SqlServer; |
| | | options.JobDetail.LogEnabled = true; |
| | | options.AddPersistence<DbJobPersistence>(); |
| | | //options.AddPersistence<DbJobPersistence>(); |
| | | options.AddJob<CalcTaskSatusByDateJob>(Triggers.Hourly()); |
| | | options.AddJob<CalcUserAgeByIdCardJob>(Triggers.Daily()); |
| | | options.AddJob<RefreshEnterpriseWalletStatusJob>(Triggers.PeriodMinutes(5)); |
| | | options.AddJob<RefreshEnterpriseWalletTransactionStatusJob>(Triggers.PeriodMinutes(2)); |
| | | options.AddJob<CompleteTaskSettlementT1Job>(Triggers.PeriodMinutes(2)); |
| | | }); |
| | | |
| | | services.AddSpecificationDocuments(options => |
| | |
| | | }); |
| | | services.AddSwaggerGenNewtonsoftSupport(); |
| | | |
| | | services.AddMvcFilter<ResourceActionFilter>(); |
| | | |
| | | services.AddControllers() |
| | | .AddNewtonsoftJson(options => |
| | | { |
| | | options.SerializerSettings.Converters.Add(new EmptyStringToNullConverter()); |
| | | //options.SerializerSettings.Converters.Add(new StringEnumConverter()); |
| | | }) |
| | | .AddFriendlyException() |
| | | .AddDataValidation() |
| | | .AddInjectWithUnifyResult<FriendlyResultProvider>(); |
| | | |
| | | services.AddMvcFilter<ResourceActionFilter>(); |
| | | } |
| | | |
| | | public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IHostApplicationLifetime lifetime) |