mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2026-03-26 17:47:21 +08:00
【新增】增加易联云小票打印机后台配置表【CoreCmsPrinter】,取消使用配置文件配置,并且支持多台打印机绑定不同门店,实现不同门店不同打印机打单。
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
using System.Linq;
|
||||
using Autofac;
|
||||
using CoreCms.Net.Auth;
|
||||
@@ -10,16 +9,15 @@ using CoreCms.Net.Filter;
|
||||
using CoreCms.Net.Loging;
|
||||
using CoreCms.Net.Mapping;
|
||||
using CoreCms.Net.Middlewares;
|
||||
using CoreCms.Net.Model.ViewModels.Options;
|
||||
using CoreCms.Net.Swagger;
|
||||
using Essensoft.Paylink.Alipay;
|
||||
using Essensoft.Paylink.WeChatPay;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.HttpOverrides;
|
||||
using Microsoft.AspNetCore.Localization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Controllers;
|
||||
using Microsoft.DotNet.PlatformAbstractions;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||
@@ -89,10 +87,10 @@ namespace CoreCms.Net.Web.Admin
|
||||
services.AddWeChatPay();
|
||||
|
||||
// 在 appsettings.json 中 配置选项
|
||||
//注册自定义的支付配置文件,后面将取消使用Paylink,直接走接口请求自定义处理。
|
||||
services.Configure<WeChatPayOptions>(Configuration.GetSection("WeChatPay"));
|
||||
services.Configure<AlipayOptions>(Configuration.GetSection("Alipay"));
|
||||
|
||||
|
||||
//注册自定义微信接口配置文件
|
||||
services.Configure<WeChat.Service.Options.WeChatOptions>(Configuration.GetSection(nameof(WeChat.Service.Options.WeChatOptions)));
|
||||
|
||||
@@ -106,9 +104,6 @@ namespace CoreCms.Net.Web.Admin
|
||||
//Swagger接口文档注入
|
||||
services.AddAdminSwaggerSetup();
|
||||
|
||||
//配置易联云打印机
|
||||
services.AddYiLianYunSetup();
|
||||
|
||||
//jwt授权支持注入
|
||||
services.AddAuthorizationSetupForAdmin();
|
||||
//上下文注入
|
||||
@@ -141,6 +136,7 @@ namespace CoreCms.Net.Web.Admin
|
||||
p.SerializerSettings.DateFormatString = "yyyy-MM-dd HH:mm:ss";
|
||||
});
|
||||
|
||||
|
||||
// 雪花漂移算法
|
||||
// 创建 IdGeneratorOptions 对象,请在构造函数中输入 WorkerId:
|
||||
var options = new IdGeneratorOptions(1);
|
||||
@@ -178,14 +174,13 @@ namespace CoreCms.Net.Web.Admin
|
||||
/// <param name="env"></param>
|
||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
||||
{
|
||||
#region 解决Ubuntu Nginx 代理不能获取IP问题()
|
||||
#region 解决Ubuntu Nginx 代理不能获取IP问题
|
||||
app.UseForwardedHeaders(new ForwardedHeadersOptions
|
||||
{
|
||||
ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto
|
||||
});
|
||||
#endregion
|
||||
|
||||
|
||||
// 开启Ip限流
|
||||
app.UseIpLimitMiddle();
|
||||
// 记录请求与返回数据 (注意开启权限,不然本地无法写入)
|
||||
|
||||
Reference in New Issue
Block a user