lingling
2025-03-07 1b33c9c58b57bde6b60de30dfc8727132b92829d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
using Alipay.EasySDK.Kernel;
using LifePayment.Application;
using LifePayment.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Serilog;
using Volo.Abp;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.Identity;
using Volo.Abp.IdentityServer.EntityFrameworkCore;
using Volo.Abp.Modularity;
 
namespace LifePayment.Worker
{
    [DependsOn(typeof(AbpBaseFrameworkModule))]
    [DependsOn(typeof(LifePaymentServicesApplicationModule),
               typeof(AbpEntityFrameworkCoreModule),
               typeof(AbpIdentityApplicationModule),
               typeof(AbpIdentityServerEntityFrameworkCoreModule),
               typeof(LifePaymentServicesEntityFrameworkCoreModule))]
    public class LifePaymentServicesWorkModule : AbpModule
    {
        public override void ConfigureServices(ServiceConfigurationContext context)
        {
            var configuration = context.Services.GetConfiguration();
            Configure<AbpDbContextOptions>(options =>
            {
                options.UseSqlServer();
            });
            context.Services.AddLogging(c =>
            {
                c.AddSerilog();
                c.AddConsole().SetMinimumLevel(LogLevel.Warning);
            });
 
            Configure<Config>(configuration.GetSection("AliPay"));
        }
 
        public async override Task OnApplicationInitializationAsync(ApplicationInitializationContext context)
        {
 
        }
    }
}