using DS.Module.Core; using DS.Module.UserModule; using Microsoft.Extensions.DependencyInjection; using NLog; using SqlSugar; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DS.Module.PrintModule { public class PrintService: IPrintService { private readonly IServiceProvider _serviceProvider; private readonly ISqlSugarClient db; private readonly IUser user; private readonly string accessKeyId; private readonly string accessSecret; private static readonly Logger Logger = LogManager.GetCurrentClassLogger(); /// /// 构造函数 /// /// public PrintService(IServiceProvider serviceProvider) { _serviceProvider = serviceProvider; db = _serviceProvider.GetRequiredService(); user = _serviceProvider.GetRequiredService(); accessKeyId = AppSetting.app(new string[] { "AliSMS", "AccessKeyId" }); accessSecret = AppSetting.app(new string[] { "AliSMS", "AccessKeySecret" }); } } }