mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 16:03:25 +08:00
【升级】升级Asp.Net 6.0.11 到 Asp.Net 7.0.0
【升级】升级所有组建包,移除一些不用或者版本弃用的组建。 【优化】优化升级npoi最新版后,出现导出数据兼容性的问题。 【优化】使用新的【NLog.Database】nlog数据库链接组件,解决nlog升级到5.x以后版本记录到数据库日志失败的问题。
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.9" />
|
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="6.0.1" />
|
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="7.0.0" />
|
||||||
<PackageReference Include="SKIT.FlurlHttpClient.Wechat.Api" Version="2.17.0" />
|
<PackageReference Include="SKIT.FlurlHttpClient.Wechat.Api" Version="2.20.1" />
|
||||||
<PackageReference Include="StackExchange.Redis" Version="2.6.66" />
|
<PackageReference Include="StackExchange.Redis" Version="2.6.70" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="DotLiquid" Version="2.2.656" />
|
<PackageReference Include="DotLiquid" Version="2.2.656" />
|
||||||
<PackageReference Include="sqlSugarCore" Version="5.1.3.24" />
|
<PackageReference Include="sqlSugarCore" Version="5.1.3.32" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="AutoMapper" Version="12.0.0" />
|
<PackageReference Include="AutoMapper" Version="12.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.1" />
|
<PackageReference Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -22,11 +22,11 @@
|
|||||||
<PackageReference Include="Hangfire.MySqlStorage" Version="2.0.3" />
|
<PackageReference Include="Hangfire.MySqlStorage" Version="2.0.3" />
|
||||||
<PackageReference Include="Hangfire.Redis.StackExchange" Version="1.8.6" />
|
<PackageReference Include="Hangfire.Redis.StackExchange" Version="1.8.6" />
|
||||||
<PackageReference Include="InitQ" Version="1.0.0.14" />
|
<PackageReference Include="InitQ" Version="1.0.0.14" />
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.OpenApi" Version="1.4.3" />
|
<PackageReference Include="Microsoft.OpenApi" Version="1.4.3" />
|
||||||
<PackageReference Include="SqlSugar.IOC" Version="1.9.0" />
|
<PackageReference Include="SqlSugar.IOC" Version="1.9.0" />
|
||||||
<PackageReference Include="sqlSugarCore" Version="5.1.3.24" />
|
<PackageReference Include="sqlSugarCore" Version="5.1.3.32" />
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore.Filters" Version="7.0.5" />
|
<PackageReference Include="Swashbuckle.AspNetCore.Filters" Version="7.0.5" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>disable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Aliyun.OSS.SDK.NetCore" Version="2.13.0" />
|
<PackageReference Include="Aliyun.OSS.SDK.NetCore" Version="2.13.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.5" />
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.5" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.SignalR" Version="1.1.0" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ using Microsoft.AspNetCore.Hosting;
|
|||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.AspNetCore.Mvc.Filters;
|
using Microsoft.AspNetCore.Mvc.Filters;
|
||||||
using Microsoft.AspNetCore.SignalR;
|
|
||||||
using Microsoft.Extensions.Hosting;
|
using Microsoft.Extensions.Hosting;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ using Microsoft.AspNetCore.Hosting;
|
|||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.AspNetCore.Mvc.Filters;
|
using Microsoft.AspNetCore.Mvc.Filters;
|
||||||
using Microsoft.AspNetCore.SignalR;
|
|
||||||
using Microsoft.Extensions.Hosting;
|
using Microsoft.Extensions.Hosting;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ namespace CoreCms.Net.IServices
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<WebApiCallBack> QrShare(int client, int page, int userShareCode, string url, JObject parameter);
|
Task<WebApiCallBack> QrShare(int client, int page, int userShareCode, string url, JObject parameter);
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 页面分享
|
/// 页面分享
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -43,19 +42,6 @@ namespace CoreCms.Net.IServices
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
WebApiCallBack UrlShare(int client, int page, int userShareCode, string url, JObject parameter);
|
WebApiCallBack UrlShare(int client, int page, int userShareCode, string url, JObject parameter);
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 海报分享
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="client"></param>
|
|
||||||
/// <param name="page"></param>
|
|
||||||
/// <param name="userShareCode"></param>
|
|
||||||
/// <param name="url"></param>
|
|
||||||
/// <param name="parameter"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
Task<WebApiCallBack> PosterShare(int client, int page, int userShareCode, string url, JObject parameter);
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 小程序二维码,和业务没关系
|
/// 小程序二维码,和业务没关系
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="7.0.0" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
<PackageReference Include="NLog" Version="4.7.15" />
|
<PackageReference Include="NLog" Version="5.0.5" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -51,18 +51,6 @@ namespace CoreCms.Net.Middlewares
|
|||||||
return app.UseMiddleware<ExceptionHandlerMiddlewareForClent>();
|
return app.UseMiddleware<ExceptionHandlerMiddlewareForClent>();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// SignalR中间件
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="app"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public static IApplicationBuilder UseSignalRSendMildd(this IApplicationBuilder app)
|
|
||||||
{
|
|
||||||
return app.UseMiddleware<SignalRSendMildd>();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// IP请求中间件
|
/// IP请求中间件
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -73,7 +61,6 @@ namespace CoreCms.Net.Middlewares
|
|||||||
return app.UseMiddleware<IPLogMildd>();
|
return app.UseMiddleware<IPLogMildd>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 用户访问接口日志中间件
|
/// 用户访问接口日志中间件
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -1,57 +0,0 @@
|
|||||||
/***********************************************************************
|
|
||||||
* Project: CoreCms.Net *
|
|
||||||
* Web: https://CoreCms.Net *
|
|
||||||
* ProjectName: 核心内容管理系统 *
|
|
||||||
* Author: 大灰灰 *
|
|
||||||
* Email: JianWeie@163.com *
|
|
||||||
* CreateTime: 2020-09-06 23:37:04
|
|
||||||
* Description: 暂无
|
|
||||||
***********************************************************************/
|
|
||||||
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using CoreCms.Net.Utility.Hub;
|
|
||||||
using Microsoft.AspNetCore.Http;
|
|
||||||
using Microsoft.AspNetCore.SignalR;
|
|
||||||
|
|
||||||
namespace CoreCms.Net.Middlewares
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 中间件
|
|
||||||
/// SignalR发送数据
|
|
||||||
/// </summary>
|
|
||||||
public class SignalRSendMildd
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
private readonly RequestDelegate _next;
|
|
||||||
private readonly IHubContext<ChatHub> _hubContext;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="next"></param>
|
|
||||||
/// <param name="hubContext"></param>
|
|
||||||
public SignalRSendMildd(RequestDelegate next, IHubContext<ChatHub> hubContext)
|
|
||||||
{
|
|
||||||
_next = next;
|
|
||||||
_hubContext = hubContext;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public async Task InvokeAsync(HttpContext context)
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
await _next(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="sqlSugarCore" Version="5.1.3.24" />
|
<PackageReference Include="sqlSugarCore" Version="5.1.3.32" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -104,10 +104,10 @@ namespace CoreCms.Net.Model.FromBody
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public int[] ids { get; set; }
|
public int[] ids { get; set; }
|
||||||
|
|
||||||
public List<labels> labels { get; set; }
|
public List<Labels> labels { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class labels
|
public class Labels
|
||||||
{
|
{
|
||||||
public string text { get; set; }
|
public string text { get; set; }
|
||||||
public string style { get; set; }
|
public string style { get; set; }
|
||||||
|
|||||||
@@ -28,14 +28,14 @@ namespace CoreCms.Net.Model.FromBody
|
|||||||
|
|
||||||
[Display(Name = "数据子集")]
|
[Display(Name = "数据子集")]
|
||||||
[Required(ErrorMessage = "请输入{0}")]
|
[Required(ErrorMessage = "请输入{0}")]
|
||||||
public List<items> datalist { get; set; }
|
public List<Items> datalist { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 数据子集类型
|
/// 数据子集类型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Display(Name = "数据子集类型")]
|
[Display(Name = "数据子集类型")]
|
||||||
public class items
|
public class Items
|
||||||
{
|
{
|
||||||
[Display(Name = "数据子集类型")]
|
[Display(Name = "数据子集类型")]
|
||||||
[Required(ErrorMessage = "请输入{0}")]
|
[Required(ErrorMessage = "请输入{0}")]
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ namespace CoreCms.Net.Model.ViewModels.DTO
|
|||||||
|
|
||||||
public decimal money { get; set; } = 0;
|
public decimal money { get; set; } = 0;
|
||||||
|
|
||||||
public List<rel> rel { get; set; } = new();
|
public List<Rel> rel { get; set; } = new();
|
||||||
}
|
}
|
||||||
|
|
||||||
public class rel
|
public class Rel
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 关联资源序列
|
/// 关联资源序列
|
||||||
|
|||||||
@@ -28,20 +28,20 @@ namespace CoreCms.Net.Model.ViewModels.DTO.Distribution
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 分销级别一配置
|
/// 分销级别一配置
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public commission commission_1 { get; set; }
|
public Commission commission_1 { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 分销级别二配置
|
/// 分销级别二配置
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public commission commission_2 { get; set; }
|
public Commission commission_2 { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 分销级别三配置
|
/// 分销级别三配置
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public commission commission_3 { get; set; }
|
public Commission commission_3 { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class commission
|
public class Commission
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 类型(百分比/固定金额)
|
/// 类型(百分比/固定金额)
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Essensoft.Paylink.Alipay" Version="4.0.12" />
|
<PackageReference Include="Essensoft.Paylink.Alipay" Version="4.0.14" />
|
||||||
<PackageReference Include="Essensoft.Paylink.WeChatPay" Version="4.0.12" />
|
<PackageReference Include="Essensoft.Paylink.WeChatPay" Version="4.0.14" />
|
||||||
<PackageReference Include="InitQ" Version="1.0.0.14" />
|
<PackageReference Include="InitQ" Version="1.0.0.14" />
|
||||||
<PackageReference Include="SKIT.FlurlHttpClient.Wechat.Api" Version="2.17.0" />
|
<PackageReference Include="SKIT.FlurlHttpClient.Wechat.Api" Version="2.20.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="DotLiquid" Version="2.2.656" />
|
<PackageReference Include="DotLiquid" Version="2.2.656" />
|
||||||
<PackageReference Include="Essensoft.Paylink.WeChatPay" Version="4.0.12" />
|
<PackageReference Include="Essensoft.Paylink.WeChatPay" Version="4.0.14" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ namespace CoreCms.Net.Repository
|
|||||||
updateTime = p.updateTime,
|
updateTime = p.updateTime,
|
||||||
verifyTime = p.verifyTime,
|
verifyTime = p.verifyTime,
|
||||||
isDelete = p.isDelete,
|
isDelete = p.isDelete,
|
||||||
UserGradeId = SqlFunc.Subqueryable<CoreCmsUser>().Where(o => o.id == p.userId).Select(p => p.grade)
|
UserGradeId = SqlFunc.Subqueryable<CoreCmsUser>().Where(o => o.id == p.userId).Select(o => o.grade)
|
||||||
|
|
||||||
})
|
})
|
||||||
.MergeTable()
|
.MergeTable()
|
||||||
@@ -184,7 +184,7 @@ namespace CoreCms.Net.Repository
|
|||||||
updateTime = p.updateTime,
|
updateTime = p.updateTime,
|
||||||
verifyTime = p.verifyTime,
|
verifyTime = p.verifyTime,
|
||||||
isDelete = p.isDelete,
|
isDelete = p.isDelete,
|
||||||
UserGradeId = SqlFunc.Subqueryable<CoreCmsUser>().Where(o => o.id == p.userId).Select(p => p.grade)
|
UserGradeId = SqlFunc.Subqueryable<CoreCmsUser>().Where(o => o.id == p.userId).Select(o => o.grade)
|
||||||
})
|
})
|
||||||
.MergeTable()
|
.MergeTable()
|
||||||
.OrderByIF(orderByExpression != null, orderByExpression, orderByType)
|
.OrderByIF(orderByExpression != null, orderByExpression, orderByType)
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ namespace CoreCms.Net.Services
|
|||||||
p.status == (int)GlobalEnumVars.OrderStatus.Normal);
|
p.status == (int)GlobalEnumVars.OrderStatus.Normal);
|
||||||
if (orderModel != null)
|
if (orderModel != null)
|
||||||
{
|
{
|
||||||
dto.rel.Add(new rel()
|
dto.rel.Add(new Rel()
|
||||||
{
|
{
|
||||||
sourceId = orderId,
|
sourceId = orderId,
|
||||||
money = orderModel.orderAmount
|
money = orderModel.orderAmount
|
||||||
@@ -162,7 +162,7 @@ namespace CoreCms.Net.Services
|
|||||||
jm.msg = "请输入正确的充值金额";
|
jm.msg = "请输入正确的充值金额";
|
||||||
return jm;
|
return jm;
|
||||||
}
|
}
|
||||||
dto.rel.Add(new rel()
|
dto.rel.Add(new Rel()
|
||||||
{
|
{
|
||||||
sourceId = orderId,
|
sourceId = orderId,
|
||||||
money = dto.money
|
money = dto.money
|
||||||
@@ -186,7 +186,7 @@ namespace CoreCms.Net.Services
|
|||||||
var formInfo = await _formSubmitServices.QueryByClauseAsync(p => p.id == intId && p.payStatus == false);
|
var formInfo = await _formSubmitServices.QueryByClauseAsync(p => p.id == intId && p.payStatus == false);
|
||||||
if (formInfo != null)
|
if (formInfo != null)
|
||||||
{
|
{
|
||||||
dto.rel.Add(new rel()
|
dto.rel.Add(new Rel()
|
||||||
{
|
{
|
||||||
sourceId = intId.ToString(),
|
sourceId = intId.ToString(),
|
||||||
money = formInfo.money
|
money = formInfo.money
|
||||||
@@ -218,7 +218,7 @@ namespace CoreCms.Net.Services
|
|||||||
var serviceInfo = await _servicesServices.QueryByClauseAsync(@where);
|
var serviceInfo = await _servicesServices.QueryByClauseAsync(@where);
|
||||||
if (serviceInfo != null)
|
if (serviceInfo != null)
|
||||||
{
|
{
|
||||||
dto.rel.Add(new rel()
|
dto.rel.Add(new Rel()
|
||||||
{
|
{
|
||||||
sourceId = orderId,
|
sourceId = orderId,
|
||||||
money = serviceInfo.money
|
money = serviceInfo.money
|
||||||
@@ -290,7 +290,7 @@ namespace CoreCms.Net.Services
|
|||||||
p.status == (int)GlobalEnumVars.OrderStatus.Normal);
|
p.status == (int)GlobalEnumVars.OrderStatus.Normal);
|
||||||
if (orderModel != null)
|
if (orderModel != null)
|
||||||
{
|
{
|
||||||
dto.rel.Add(new rel()
|
dto.rel.Add(new Rel()
|
||||||
{
|
{
|
||||||
sourceId = item,
|
sourceId = item,
|
||||||
money = orderModel.orderAmount
|
money = orderModel.orderAmount
|
||||||
@@ -322,7 +322,7 @@ namespace CoreCms.Net.Services
|
|||||||
}
|
}
|
||||||
foreach (var item in sourceStr)
|
foreach (var item in sourceStr)
|
||||||
{
|
{
|
||||||
dto.rel.Add(new rel()
|
dto.rel.Add(new Rel()
|
||||||
{
|
{
|
||||||
sourceId = item,
|
sourceId = item,
|
||||||
money = dto.money
|
money = dto.money
|
||||||
@@ -342,7 +342,7 @@ namespace CoreCms.Net.Services
|
|||||||
var formInfo = await _formSubmitServices.QueryByClauseAsync(p => p.id == item && p.payStatus == false);
|
var formInfo = await _formSubmitServices.QueryByClauseAsync(p => p.id == item && p.payStatus == false);
|
||||||
if (formInfo != null)
|
if (formInfo != null)
|
||||||
{
|
{
|
||||||
dto.rel.Add(new rel()
|
dto.rel.Add(new Rel()
|
||||||
{
|
{
|
||||||
sourceId = item.ToString(),
|
sourceId = item.ToString(),
|
||||||
money = formInfo.money
|
money = formInfo.money
|
||||||
@@ -379,7 +379,7 @@ namespace CoreCms.Net.Services
|
|||||||
var serviceInfo = await _servicesServices.QueryByClauseAsync(@where);
|
var serviceInfo = await _servicesServices.QueryByClauseAsync(@where);
|
||||||
if (serviceInfo != null)
|
if (serviceInfo != null)
|
||||||
{
|
{
|
||||||
dto.rel.Add(new rel()
|
dto.rel.Add(new Rel()
|
||||||
{
|
{
|
||||||
sourceId = item,
|
sourceId = item,
|
||||||
money = serviceInfo.money
|
money = serviceInfo.money
|
||||||
|
|||||||
@@ -1,22 +1,21 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Aliyun.OSS.SDK.NetCore" Version="2.13.0" />
|
<PackageReference Include="Aliyun.OSS.SDK.NetCore" Version="2.13.0" />
|
||||||
<PackageReference Include="Essensoft.Paylink.Alipay" Version="4.0.12" />
|
<PackageReference Include="Essensoft.Paylink.Alipay" Version="4.0.14" />
|
||||||
<PackageReference Include="Essensoft.Paylink.WeChatPay" Version="4.0.12" />
|
<PackageReference Include="Essensoft.Paylink.WeChatPay" Version="4.0.14" />
|
||||||
<PackageReference Include="Flurl.Http" Version="3.2.4" />
|
<PackageReference Include="Flurl.Http" Version="3.2.4" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Options" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Options" Version="7.0.0" />
|
||||||
<PackageReference Include="Qiniu" Version="8.2.0" />
|
<PackageReference Include="Qiniu" Version="8.2.0" />
|
||||||
<PackageReference Include="QRCoder" Version="1.4.3" />
|
<PackageReference Include="QRCoder" Version="1.4.3" />
|
||||||
<PackageReference Include="SixLabors.ImageSharp" Version="1.0.4" />
|
<PackageReference Include="SixLabors.ImageSharp.Web" Version="2.0.2" />
|
||||||
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="1.0.0-beta13" />
|
<PackageReference Include="System.Drawing.Common" Version="7.0.0" />
|
||||||
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
|
|
||||||
<PackageReference Include="Tencent.QCloud.Cos.Sdk" Version="5.4.32" />
|
<PackageReference Include="Tencent.QCloud.Cos.Sdk" Version="5.4.32" />
|
||||||
<PackageReference Include="ToolGood.Words" Version="3.0.3.1" />
|
<PackageReference Include="ToolGood.Words" Version="3.0.3.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -424,7 +424,7 @@ namespace CoreCms.Net.Services
|
|||||||
var obj = JObject.Parse(p.parameters);
|
var obj = JObject.Parse(p.parameters);
|
||||||
if (p.code == "COMMISSION_1")
|
if (p.code == "COMMISSION_1")
|
||||||
{
|
{
|
||||||
dto.commission_1 = new commission()
|
dto.commission_1 = new Commission()
|
||||||
{
|
{
|
||||||
type = obj["commissionType"].ObjectToInt(0),
|
type = obj["commissionType"].ObjectToInt(0),
|
||||||
discount = obj["discount"].ObjectToDecimal(0)
|
discount = obj["discount"].ObjectToDecimal(0)
|
||||||
@@ -432,7 +432,7 @@ namespace CoreCms.Net.Services
|
|||||||
}
|
}
|
||||||
else if (p.code == "COMMISSION_2")
|
else if (p.code == "COMMISSION_2")
|
||||||
{
|
{
|
||||||
dto.commission_2 = new commission()
|
dto.commission_2 = new Commission()
|
||||||
{
|
{
|
||||||
type = obj["commissionType"].ObjectToInt(0),
|
type = obj["commissionType"].ObjectToInt(0),
|
||||||
discount = obj["discount"].ObjectToDecimal(0)
|
discount = obj["discount"].ObjectToDecimal(0)
|
||||||
@@ -441,7 +441,7 @@ namespace CoreCms.Net.Services
|
|||||||
}
|
}
|
||||||
else if (p.code == "COMMISSION_3")
|
else if (p.code == "COMMISSION_3")
|
||||||
{
|
{
|
||||||
dto.commission_3 = new commission()
|
dto.commission_3 = new Commission()
|
||||||
{
|
{
|
||||||
type = obj["commissionType"].ObjectToInt(0),
|
type = obj["commissionType"].ObjectToInt(0),
|
||||||
discount = obj["discount"].ObjectToDecimal(0)
|
discount = obj["discount"].ObjectToDecimal(0)
|
||||||
@@ -453,17 +453,17 @@ namespace CoreCms.Net.Services
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
dto.grade_id = 0;
|
dto.grade_id = 0;
|
||||||
dto.commission_1 = new commission()
|
dto.commission_1 = new Commission()
|
||||||
{
|
{
|
||||||
type = commissionType,
|
type = commissionType,
|
||||||
discount = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.CommissionFirst).ObjectToDecimal(0)
|
discount = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.CommissionFirst).ObjectToDecimal(0)
|
||||||
};
|
};
|
||||||
dto.commission_2 = new commission()
|
dto.commission_2 = new Commission()
|
||||||
{
|
{
|
||||||
type = commissionType,
|
type = commissionType,
|
||||||
discount = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.CommissionSecond).ObjectToDecimal(0)
|
discount = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.CommissionSecond).ObjectToDecimal(0)
|
||||||
};
|
};
|
||||||
dto.commission_3 = new commission()
|
dto.commission_3 = new Commission()
|
||||||
{
|
{
|
||||||
type = commissionType,
|
type = commissionType,
|
||||||
discount = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.CommissionThird).ObjectToDecimal(0)
|
discount = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.CommissionThird).ObjectToDecimal(0)
|
||||||
@@ -474,17 +474,17 @@ namespace CoreCms.Net.Services
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
dto.grade_id = 0;
|
dto.grade_id = 0;
|
||||||
dto.commission_1 = new commission()
|
dto.commission_1 = new Commission()
|
||||||
{
|
{
|
||||||
type = commissionType,
|
type = commissionType,
|
||||||
discount = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.CommissionFirst).ObjectToDecimal(0)
|
discount = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.CommissionFirst).ObjectToDecimal(0)
|
||||||
};
|
};
|
||||||
dto.commission_2 = new commission()
|
dto.commission_2 = new Commission()
|
||||||
{
|
{
|
||||||
type = commissionType,
|
type = commissionType,
|
||||||
discount = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.CommissionSecond).ObjectToDecimal(0)
|
discount = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.CommissionSecond).ObjectToDecimal(0)
|
||||||
};
|
};
|
||||||
dto.commission_3 = new commission()
|
dto.commission_3 = new Commission()
|
||||||
{
|
{
|
||||||
type = commissionType,
|
type = commissionType,
|
||||||
discount = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.CommissionThird).ObjectToDecimal(0)
|
discount = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.CommissionThird).ObjectToDecimal(0)
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ using Microsoft.Extensions.DependencyInjection;
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
using static SKIT.FlurlHttpClient.Wechat.Api.Models.ScanProductV2AddRequest.Types.Product.Types;
|
|
||||||
|
|
||||||
|
|
||||||
namespace CoreCms.Net.Services
|
namespace CoreCms.Net.Services
|
||||||
|
|||||||
@@ -29,11 +29,6 @@ using CoreCms.Net.WeChat.Service.Options;
|
|||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using SixLabors.Fonts;
|
|
||||||
using SixLabors.ImageSharp;
|
|
||||||
using SixLabors.ImageSharp.Drawing.Processing;
|
|
||||||
using SixLabors.ImageSharp.PixelFormats;
|
|
||||||
using SixLabors.ImageSharp.Processing;
|
|
||||||
using SKIT.FlurlHttpClient.Wechat.Api;
|
using SKIT.FlurlHttpClient.Wechat.Api;
|
||||||
using SKIT.FlurlHttpClient.Wechat.Api.Models;
|
using SKIT.FlurlHttpClient.Wechat.Api.Models;
|
||||||
|
|
||||||
@@ -113,44 +108,6 @@ namespace CoreCms.Net.Services
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 海报分享
|
|
||||||
/// <summary>
|
|
||||||
/// 海报分享
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="client"></param>
|
|
||||||
/// <param name="page"></param>
|
|
||||||
/// <param name="userShareCode"></param>
|
|
||||||
/// <param name="url"></param>
|
|
||||||
/// <param name="parameter"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public async Task<WebApiCallBack> PosterShare(int client, int page, int userShareCode, string url, JObject parameter)
|
|
||||||
{
|
|
||||||
//获取分享代码
|
|
||||||
var res = GetCode(client, page, userShareCode, url, parameter);
|
|
||||||
if (!res.status)
|
|
||||||
{
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
//如果不是商品和拼团
|
|
||||||
if (page != (int)GlobalEnumVars.UrlSharePageType.PinTuan &&
|
|
||||||
page != (int)GlobalEnumVars.UrlSharePageType.Goods &&
|
|
||||||
page != (int)GlobalEnumVars.UrlSharePageType.Seckill &&
|
|
||||||
page != (int)GlobalEnumVars.UrlSharePageType.Solitaire &&
|
|
||||||
page != (int)GlobalEnumVars.UrlSharePageType.Group)
|
|
||||||
{
|
|
||||||
//走二维码分享
|
|
||||||
return await getQr(url, res.otherData.ToString(), client);
|
|
||||||
}
|
|
||||||
//生成海报图片
|
|
||||||
|
|
||||||
var userId = UserHelper.GetUserIdByShareCode(userShareCode);
|
|
||||||
var user = await _userServices.QueryByClauseAsync(p => p.id == userId);
|
|
||||||
|
|
||||||
var result = await Poster(url, res.otherData.ToString(), client, user);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region 页面分享UrlShare
|
#region 页面分享UrlShare
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 页面分享
|
/// 页面分享
|
||||||
@@ -790,260 +747,5 @@ namespace CoreCms.Net.Services
|
|||||||
return jm;
|
return jm;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 渲染并生成海报图片
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="url"></param>
|
|
||||||
/// <param name="code"></param>
|
|
||||||
/// <param name="client"></param>
|
|
||||||
/// <param name="user"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public async Task<WebApiCallBack> Poster(string url, string code, int client, CoreCmsUser user)
|
|
||||||
{
|
|
||||||
var jm = new WebApiCallBack() { status = false, msg = "海报生成失败0" };
|
|
||||||
|
|
||||||
|
|
||||||
var fileNameStr = CommonHelper.Md5For32(url + code + client) + CommonHelper.Msectime();
|
|
||||||
//QrCode 根目录
|
|
||||||
var dir = "/static/poster/";
|
|
||||||
//文件虚拟目录
|
|
||||||
var fileName = dir + fileNameStr + ".jpg";
|
|
||||||
//文件硬地址
|
|
||||||
var qrCodeDir = _webHostEnvironment.WebRootPath + dir;
|
|
||||||
//QrCode 根目录
|
|
||||||
var pathFileName = qrCodeDir + fileNameStr + ".jpg";
|
|
||||||
|
|
||||||
//QrCode 根目录
|
|
||||||
if (File.Exists(pathFileName))
|
|
||||||
{
|
|
||||||
//有这个二维码了
|
|
||||||
jm.status = true;
|
|
||||||
jm.msg = "海报获取成功";
|
|
||||||
jm.data = _appInterFaceUrl + fileName;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//去生成
|
|
||||||
var res = de_url(code);
|
|
||||||
if (!res.status)
|
|
||||||
{
|
|
||||||
jm.msg = "海报生成失败1";
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
var qrResult = await getQr(url, code, client);
|
|
||||||
if (!qrResult.status)
|
|
||||||
{
|
|
||||||
jm.msg = "海报生成失败2";
|
|
||||||
return qrResult;
|
|
||||||
}
|
|
||||||
|
|
||||||
var mkResult = await DoMark(res.data, qrResult.otherData.ToString(), fileName, user);
|
|
||||||
if (mkResult)
|
|
||||||
{
|
|
||||||
jm.status = true;
|
|
||||||
jm.msg = "海报生成成功";
|
|
||||||
jm.data = _appInterFaceUrl + fileName;
|
|
||||||
}
|
|
||||||
jm.otherData = mkResult;
|
|
||||||
}
|
|
||||||
return jm;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 绘制图片
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="data"></param>
|
|
||||||
/// <param name="otherData">生成的二维码图片地址</param>
|
|
||||||
/// <param name="fileNameStr">海报文件名称</param>
|
|
||||||
/// <param name="user">用户信息</param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public async Task<bool> DoMark(object data, string otherData, string fileNameStr, CoreCmsUser user)
|
|
||||||
{
|
|
||||||
var fileName = fileNameStr;
|
|
||||||
|
|
||||||
//文件硬地址
|
|
||||||
var savePath = _webHostEnvironment.WebRootPath + "/static/poster/";
|
|
||||||
var qrCodeDir = _webHostEnvironment.WebRootPath + "/static/qrCode/weChat/" + otherData;
|
|
||||||
//如果文件夹不存在,则创建文件夹
|
|
||||||
if (!Directory.Exists(savePath)) Directory.CreateDirectory(savePath);
|
|
||||||
|
|
||||||
//获取数据来源
|
|
||||||
var dataObj = JObject.FromObject(data);
|
|
||||||
if (!dataObj.ContainsKey("page") || dataObj["page"].ObjectToInt(0) <= 0)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
//2商品详情页,3拼团详情页
|
|
||||||
var page = dataObj["page"].ObjectToInt(0);
|
|
||||||
if (page is (int)GlobalEnumVars.UrlSharePageType.Goods or (int)GlobalEnumVars.UrlSharePageType.PinTuan or (int)GlobalEnumVars.UrlSharePageType.Seckill)
|
|
||||||
{
|
|
||||||
if (dataObj.ContainsKey("params"))
|
|
||||||
{
|
|
||||||
var paramsObj = JObject.FromObject(dataObj["params"]);
|
|
||||||
if (!paramsObj.ContainsKey("goodsId"))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
var goodId = paramsObj["goodsId"].ObjectToInt();
|
|
||||||
var goodModel = await _goodsServices.GetGoodsDetail(goodId);
|
|
||||||
if (goodModel != null)
|
|
||||||
{
|
|
||||||
var images = goodModel.images.Split(",");
|
|
||||||
if (images.Any())
|
|
||||||
{
|
|
||||||
var image = images[0];
|
|
||||||
//创建一个背景宽度为400X600的底图
|
|
||||||
using var imageTemple = new SixLabors.ImageSharp.Image<Rgba32>(400, 600);
|
|
||||||
//设置底图的背景色为白色
|
|
||||||
imageTemple.Mutate(x => x.BackgroundColor(SixLabors.ImageSharp.Color.White));
|
|
||||||
//绘制商品图片(网络下载图片)
|
|
||||||
HttpClient client = new HttpClient();
|
|
||||||
HttpResponseMessage response = await client.GetAsync(image);
|
|
||||||
response.EnsureSuccessStatusCode();
|
|
||||||
var stream = await response.Content.ReadAsStreamAsync();
|
|
||||||
//载入下载的图片流2
|
|
||||||
var imageThumbnail = await SixLabors.ImageSharp.Image.LoadAsync(stream);
|
|
||||||
//将下载的图片压缩至400X400
|
|
||||||
imageThumbnail.Mutate(x =>
|
|
||||||
{
|
|
||||||
x.Resize(400, 400);
|
|
||||||
});
|
|
||||||
//将商品大图合并到背景图上
|
|
||||||
imageTemple.Mutate(x => x.DrawImage(imageThumbnail, new SixLabors.ImageSharp.Point(0, 0), 1));
|
|
||||||
//将用户的分享二维码合并大背景图上
|
|
||||||
var imageQrcode = await SixLabors.ImageSharp.Image.LoadAsync(qrCodeDir);
|
|
||||||
//将二维码缩略至120X120
|
|
||||||
imageQrcode.Mutate(x =>
|
|
||||||
{
|
|
||||||
x.Resize(120, 120);
|
|
||||||
});
|
|
||||||
//将二维码图片合并到背景图上
|
|
||||||
imageTemple.Mutate(x => x.DrawImage(imageQrcode, new SixLabors.ImageSharp.Point(275, 420), 1));
|
|
||||||
//构建字体//装载字体(ttf)(而且字体一定要支持简体中文的)
|
|
||||||
var fonts = new FontCollection();
|
|
||||||
SixLabors.Fonts.FontFamily fontFamily = fonts.Install(_webHostEnvironment.WebRootPath + "/fonts/SourceHanSansK-Normal.ttf");
|
|
||||||
//商品名称可能较长,设置为多行文本输出
|
|
||||||
SixLabors.Fonts.Font titleFont = new SixLabors.Fonts.Font(fontFamily, 20, SixLabors.Fonts.FontStyle.Regular);
|
|
||||||
//多行文本输出
|
|
||||||
var textOptions = new TextOptions()
|
|
||||||
{
|
|
||||||
ApplyKerning = true,
|
|
||||||
VerticalAlignment = VerticalAlignment.Top,
|
|
||||||
HorizontalAlignment = HorizontalAlignment.Left,
|
|
||||||
WrapTextWidth = 230
|
|
||||||
};
|
|
||||||
var graphicsOptions = new GraphicsOptions()
|
|
||||||
{
|
|
||||||
Antialias = true
|
|
||||||
};
|
|
||||||
//沿着行尾的绕行路径绘制文本
|
|
||||||
var options = new SixLabors.ImageSharp.Drawing.Processing.DrawingOptions
|
|
||||||
{
|
|
||||||
GraphicsOptions = graphicsOptions,
|
|
||||||
TextOptions = textOptions
|
|
||||||
};
|
|
||||||
//开始绘制商品名称
|
|
||||||
imageTemple.Mutate(ctx => ctx.DrawText(options, goodModel.name, titleFont, SixLabors.ImageSharp.Color.Red, new SixLabors.ImageSharp.PointF(10, 450)));
|
|
||||||
//绘制商品金额
|
|
||||||
SixLabors.Fonts.Font moneyFont = new SixLabors.Fonts.Font(fontFamily, 18);
|
|
||||||
//获取该文件绘制所需的大小
|
|
||||||
imageTemple.Mutate(ctx => ctx.DrawText("¥" + goodModel.price, moneyFont, SixLabors.ImageSharp.Color.Crimson, new SixLabors.ImageSharp.PointF(10, 410)));
|
|
||||||
//绘制提示语
|
|
||||||
SixLabors.Fonts.Font tipsFont = new SixLabors.Fonts.Font(fontFamily, 10);
|
|
||||||
imageTemple.Mutate(ctx => ctx.DrawText("扫描或长按识别二维码", tipsFont, SixLabors.ImageSharp.Color.Black, new SixLabors.ImageSharp.PointF(283, 555)));
|
|
||||||
//载入流存储在到文件
|
|
||||||
await imageTemple.SaveAsync(_webHostEnvironment.WebRootPath + fileName);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (page == (int)GlobalEnumVars.UrlSharePageType.Solitaire)
|
|
||||||
{
|
|
||||||
if (dataObj.ContainsKey("params"))
|
|
||||||
{
|
|
||||||
var paramsObj = JObject.FromObject(dataObj["params"]);
|
|
||||||
if (!paramsObj.ContainsKey("id"))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
var id = paramsObj["id"].ObjectToInt();
|
|
||||||
var solitaireModel = await _solitaireServices.QueryByClauseAsync(p => p.id == id);
|
|
||||||
if (solitaireModel != null && !string.IsNullOrEmpty(solitaireModel.thumbnail))
|
|
||||||
{
|
|
||||||
//创建一个背景宽度为400X600的底图
|
|
||||||
using var imageTemple = new SixLabors.ImageSharp.Image<Rgba32>(400, 600);
|
|
||||||
//设置底图的背景色为白色
|
|
||||||
imageTemple.Mutate(x => x.BackgroundColor(SixLabors.ImageSharp.Color.White));
|
|
||||||
//绘制商品图片(网络下载图片)
|
|
||||||
HttpClient client = new HttpClient();
|
|
||||||
HttpResponseMessage response = await client.GetAsync(solitaireModel.thumbnail);
|
|
||||||
response.EnsureSuccessStatusCode();
|
|
||||||
var stream = await response.Content.ReadAsStreamAsync();
|
|
||||||
//载入下载的图片流
|
|
||||||
var imageThumbnail = await SixLabors.ImageSharp.Image.LoadAsync(stream);
|
|
||||||
//将下载的图片压缩至400X400
|
|
||||||
imageThumbnail.Mutate(x =>
|
|
||||||
{
|
|
||||||
x.Resize(400, 400);
|
|
||||||
});
|
|
||||||
//将商品大图合并到背景图上
|
|
||||||
imageTemple.Mutate(x => x.DrawImage(imageThumbnail, new SixLabors.ImageSharp.Point(0, 0), 1));
|
|
||||||
//将用户的分享二维码合并大背景图上
|
|
||||||
var imageQrcode = await SixLabors.ImageSharp.Image.LoadAsync(qrCodeDir);
|
|
||||||
//将二维码缩略至120X120
|
|
||||||
imageQrcode.Mutate(x =>
|
|
||||||
{
|
|
||||||
x.Resize(120, 120);
|
|
||||||
});
|
|
||||||
//将二维码图片合并到背景图上
|
|
||||||
imageTemple.Mutate(x => x.DrawImage(imageQrcode, new SixLabors.ImageSharp.Point(275, 420), 1));
|
|
||||||
//构建字体//装载字体(ttf)(而且字体一定要支持简体中文的)
|
|
||||||
var fonts = new FontCollection();
|
|
||||||
SixLabors.Fonts.FontFamily fontFamily = fonts.Install(_webHostEnvironment.WebRootPath + "/fonts/SourceHanSansK-Normal.ttf");
|
|
||||||
//绘制商品名称
|
|
||||||
SixLabors.Fonts.Font titleFont = new SixLabors.Fonts.Font(fontFamily, 20, SixLabors.Fonts.FontStyle.Regular);
|
|
||||||
//商品名称可能较长,设置为多行文本输出
|
|
||||||
var textOptions = new TextOptions()
|
|
||||||
{
|
|
||||||
ApplyKerning = true,
|
|
||||||
VerticalAlignment = VerticalAlignment.Top,
|
|
||||||
HorizontalAlignment = HorizontalAlignment.Left,
|
|
||||||
WrapTextWidth = 230
|
|
||||||
};
|
|
||||||
var graphicsOptions = new GraphicsOptions()
|
|
||||||
{
|
|
||||||
Antialias = true
|
|
||||||
};
|
|
||||||
//沿着行尾的绕行路径绘制文本
|
|
||||||
var options = new SixLabors.ImageSharp.Drawing.Processing.DrawingOptions
|
|
||||||
{
|
|
||||||
GraphicsOptions = graphicsOptions,
|
|
||||||
TextOptions = textOptions
|
|
||||||
};
|
|
||||||
//开始绘制商品名称
|
|
||||||
imageTemple.Mutate(ctx => ctx.DrawText(options, solitaireModel.title, titleFont, SixLabors.ImageSharp.Color.Red, new SixLabors.ImageSharp.PointF(10, 450)));
|
|
||||||
//绘制商品金额
|
|
||||||
SixLabors.Fonts.Font moneyFont = new SixLabors.Fonts.Font(fontFamily, 18);
|
|
||||||
//获取该文件绘制所需的大小
|
|
||||||
//var size = TextMeasurer.Measure(moneyText, new RendererOptions(moneyFont));
|
|
||||||
imageTemple.Mutate(ctx => ctx.DrawText("火热接龙中", moneyFont, SixLabors.ImageSharp.Color.Crimson, new SixLabors.ImageSharp.PointF(10, 410)));
|
|
||||||
//绘制提示语
|
|
||||||
SixLabors.Fonts.Font tipsFont = new SixLabors.Fonts.Font(fontFamily, 10);
|
|
||||||
imageTemple.Mutate(ctx => ctx.DrawText("扫描或长按识别二维码", tipsFont, SixLabors.ImageSharp.Color.Black, new SixLabors.ImageSharp.PointF(283, 555)));
|
|
||||||
|
|
||||||
//载入流存储在到文件
|
|
||||||
await imageTemple.SaveAsync(_webHostEnvironment.WebRootPath + fileName);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,7 +84,8 @@ namespace CoreCms.Net.Services
|
|||||||
request.Audit.Category.FirstCategoryId = entity.level1;
|
request.Audit.Category.FirstCategoryId = entity.level1;
|
||||||
request.Audit.Category.SecondCategoryId = entity.level2;
|
request.Audit.Category.SecondCategoryId = entity.level2;
|
||||||
request.Audit.Category.ThirdCategoryId = entity.level3;
|
request.Audit.Category.ThirdCategoryId = entity.level3;
|
||||||
request.Audit.Category.QualificationUrlList = entity.certificateImage.Split(",").ToList();
|
request.Audit.Category.CertificateUrlList = entity.certificateImage.Split(",").ToList();
|
||||||
|
//request.Audit.Category.QualificationUrlList = entity.certificateImage.Split(",").ToList();
|
||||||
|
|
||||||
|
|
||||||
var response = await client.ExecuteShopAuditAuditCategoryAsync(request);
|
var response = await client.ExecuteShopAuditAuditCategoryAsync(request);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Hangfire" Version="1.7.31" />
|
<PackageReference Include="Hangfire" Version="1.7.31" />
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
onLaunch() {
|
onLaunch() {
|
||||||
|
|
||||||
// 此版本发布于2022-10-23
|
// 此版本发布于2022-10-23
|
||||||
const version = '0.6.4'
|
const version = '0.6.5'
|
||||||
// 开发环境才提示,生产环境不会提示
|
// 开发环境才提示,生产环境不会提示
|
||||||
if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
console.log(`\n %c \u6838\u5fc3\u5546\u57ce\u7cfb\u7edf\u0020\u0043\u006f\u0072\u0065\u0053\u0068\u006f\u0070 V${version} %c \u0068\u0074\u0074\u0070\u0073\u003a\u002f\u002f\u0077\u0077\u0077\u002e\u0063\u006f\u0072\u0065\u0073\u0068\u006f\u0070\u002e\u0063\u006e\u002f \n\n`, 'color: #ffffff; background: #3c9cff; padding:5px 0;', 'color: #3c9cff;background: #f1f1f1; padding:5px 0;');
|
console.log(`\n %c \u6838\u5fc3\u5546\u57ce\u7cfb\u7edf\u0020\u0043\u006f\u0072\u0065\u0053\u0068\u006f\u0070 V${version} %c \u0068\u0074\u0074\u0070\u0073\u003a\u002f\u002f\u0077\u0077\u0077\u002e\u0063\u006f\u0072\u0065\u0073\u0068\u006f\u0070\u002e\u0063\u006e\u002f \n\n`, 'color: #ffffff; background: #3c9cff; padding:5px 0;', 'color: #3c9cff;background: #f1f1f1; padding:5px 0;');
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Core" Version="1.1.0" />
|
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
<PackageReference Include="NPOI" Version="2.4.1" />
|
<PackageReference Include="NPOI" Version="2.5.6" />
|
||||||
<PackageReference Include="ToolGood.Words" Version="3.0.3.1" />
|
<PackageReference Include="ToolGood.Words" Version="3.0.3.1" />
|
||||||
<PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
|
<PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -1,103 +0,0 @@
|
|||||||
/***********************************************************************
|
|
||||||
* Project: CoreCms.Net *
|
|
||||||
* Web: https://CoreCms.Net *
|
|
||||||
* ProjectName: 核心内容管理系统 *
|
|
||||||
* Author: 大灰灰 *
|
|
||||||
* Email: JianWeie@163.com *
|
|
||||||
* CreateTime: 2020-09-06 23:39:37
|
|
||||||
* Description: 暂无
|
|
||||||
***********************************************************************/
|
|
||||||
|
|
||||||
|
|
||||||
using Microsoft.AspNetCore.SignalR;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace CoreCms.Net.Utility.Hub
|
|
||||||
{
|
|
||||||
public class ChatHub : Hub<IChatClient>
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 向指定群组发送信息
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="groupName">组名</param>
|
|
||||||
/// <param name="message">信息内容</param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public async Task SendMessageToGroupAsync(string groupName, string message)
|
|
||||||
{
|
|
||||||
await Clients.Group(groupName).ReceiveMessage(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 加入指定组
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="groupName">组名</param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public async Task AddToGroup(string groupName)
|
|
||||||
{
|
|
||||||
await Groups.AddToGroupAsync(Context.ConnectionId, groupName);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 退出指定组
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="groupName">组名</param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public async Task RemoveFromGroup(string groupName)
|
|
||||||
{
|
|
||||||
await Groups.RemoveFromGroupAsync(Context.ConnectionId, groupName);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 向指定成员发送信息
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="user">成员名</param>
|
|
||||||
/// <param name="message">信息内容</param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public async Task SendPrivateMessage(string user, string message)
|
|
||||||
{
|
|
||||||
await Clients.User(user).ReceiveMessage(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 当连接建立时运行
|
|
||||||
/// </summary>
|
|
||||||
/// <returns></returns>
|
|
||||||
public override Task OnConnectedAsync()
|
|
||||||
{
|
|
||||||
//TODO..
|
|
||||||
return base.OnConnectedAsync();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 当链接断开时运行
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="ex"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public override Task OnDisconnectedAsync(System.Exception ex)
|
|
||||||
{
|
|
||||||
//TODO..
|
|
||||||
return base.OnDisconnectedAsync(ex);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public async Task SendMessage(string user, string message)
|
|
||||||
{
|
|
||||||
await Clients.All.ReceiveMessage(user, message);
|
|
||||||
}
|
|
||||||
|
|
||||||
//定于一个通讯管道,用来管理我们和客户端的连接
|
|
||||||
//1、客户端调用 GetLatestCount,就像订阅
|
|
||||||
public async Task GetLatestCount(string random)
|
|
||||||
{
|
|
||||||
//2、服务端主动向客户端发送数据,名字千万不能错
|
|
||||||
var dt = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
|
||||||
|
|
||||||
await Clients.All.ReceiveUpdate(dt);
|
|
||||||
//3、客户端再通过 ReceiveUpdate ,来接收
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
/***********************************************************************
|
|
||||||
* Project: CoreCms.Net *
|
|
||||||
* Web: https://CoreCms.Net *
|
|
||||||
* ProjectName: 核心内容管理系统 *
|
|
||||||
* Author: 大灰灰 *
|
|
||||||
* Email: JianWeie@163.com *
|
|
||||||
* CreateTime: 2020-09-06 23:39:07
|
|
||||||
* Description: 暂无
|
|
||||||
***********************************************************************/
|
|
||||||
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace CoreCms.Net.Utility.Hub
|
|
||||||
{
|
|
||||||
public interface IChatClient
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// SignalR接收信息
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="message">信息内容</param>
|
|
||||||
/// <returns></returns>
|
|
||||||
Task ReceiveMessage(object message);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// SignalR接收信息
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="user">指定接收客户端</param>
|
|
||||||
/// <param name="message">信息内容</param>
|
|
||||||
/// <returns></returns>
|
|
||||||
Task ReceiveMessage(string user, string message);
|
|
||||||
|
|
||||||
Task ReceiveUpdate(object message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,17 +1,17 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="MediatR" Version="11.0.0" />
|
<PackageReference Include="MediatR" Version="11.0.0" />
|
||||||
<PackageReference Include="MediatR.Extensions.Microsoft.DependencyInjection" Version="11.0.0" />
|
<PackageReference Include="MediatR.Extensions.Microsoft.DependencyInjection" Version="11.0.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Http" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Options" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Options" Version="7.0.0" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
<PackageReference Include="SKIT.FlurlHttpClient.Wechat.Api" Version="2.17.0" />
|
<PackageReference Include="SKIT.FlurlHttpClient.Wechat.Api" Version="2.20.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1081,12 +1081,13 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
|||||||
detailsStartNumber++;
|
detailsStartNumber++;
|
||||||
}
|
}
|
||||||
//合并单元格(第几行,到第几行,第几列,到第几列)
|
//合并单元格(第几行,到第几行,第几列,到第几列)
|
||||||
|
|
||||||
var marId = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 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 };
|
var marId = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 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 };
|
||||||
|
if (order.items.Count <= 1) continue;
|
||||||
foreach (var id in marId)
|
foreach (var id in marId)
|
||||||
{
|
{
|
||||||
sheet1.AddMergedRegion(new CellRangeAddress(nowNumber + 1, detailsStartNumber, id, id));
|
sheet1.AddMergedRegion(new CellRangeAddress(nowNumber + 1, detailsStartNumber, id, id));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 写入到excel
|
// 写入到excel
|
||||||
@@ -1487,11 +1488,11 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
|||||||
}
|
}
|
||||||
//合并单元格(第几行,到第几行,第几列,到第几列)
|
//合并单元格(第几行,到第几行,第几列,到第几列)
|
||||||
var marId = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 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 };
|
var marId = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 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 };
|
||||||
|
if (order.items.Count <= 1) continue;
|
||||||
foreach (var id in marId)
|
foreach (var id in marId)
|
||||||
{
|
{
|
||||||
sheet1.AddMergedRegion(new CellRangeAddress(nowNumber + 1, detailsStartNumber, id, id));
|
sheet1.AddMergedRegion(new CellRangeAddress(nowNumber + 1, detailsStartNumber, id, id));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 写入到excel
|
// 写入到excel
|
||||||
|
|||||||
@@ -389,7 +389,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
|||||||
rowTemp0.CellStyle = commonCellStyle;
|
rowTemp0.CellStyle = commonCellStyle;
|
||||||
|
|
||||||
var rowTemp1 = rowTemp.CreateCell(1);
|
var rowTemp1 = rowTemp.CreateCell(1);
|
||||||
rowTemp1.SetCellValue(listModel[i].serviceOrderId.ToString());
|
rowTemp1.SetCellValue(listModel[i].serviceOrderId);
|
||||||
rowTemp1.CellStyle = commonCellStyle;
|
rowTemp1.CellStyle = commonCellStyle;
|
||||||
|
|
||||||
var rowTemp2 = rowTemp.CreateCell(2);
|
var rowTemp2 = rowTemp.CreateCell(2);
|
||||||
@@ -409,7 +409,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
|||||||
rowTemp5.CellStyle = commonCellStyle;
|
rowTemp5.CellStyle = commonCellStyle;
|
||||||
|
|
||||||
var rowTemp6 = rowTemp.CreateCell(6);
|
var rowTemp6 = rowTemp.CreateCell(6);
|
||||||
rowTemp6.SetCellValue(listModel[i].paymentId.ToString());
|
rowTemp6.SetCellValue(listModel[i].paymentId);
|
||||||
rowTemp6.CellStyle = commonCellStyle;
|
rowTemp6.CellStyle = commonCellStyle;
|
||||||
|
|
||||||
var rowTemp7 = rowTemp.CreateCell(7);
|
var rowTemp7 = rowTemp.CreateCell(7);
|
||||||
@@ -607,7 +607,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
|||||||
|
|
||||||
|
|
||||||
var rowTemp1 = rowTemp.CreateCell(1);
|
var rowTemp1 = rowTemp.CreateCell(1);
|
||||||
rowTemp1.SetCellValue(listModel[i].serviceOrderId.ToString());
|
rowTemp1.SetCellValue(listModel[i].serviceOrderId);
|
||||||
rowTemp1.CellStyle = commonCellStyle;
|
rowTemp1.CellStyle = commonCellStyle;
|
||||||
|
|
||||||
|
|
||||||
@@ -637,7 +637,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
|||||||
|
|
||||||
|
|
||||||
var rowTemp6 = rowTemp.CreateCell(6);
|
var rowTemp6 = rowTemp.CreateCell(6);
|
||||||
rowTemp6.SetCellValue(listModel[i].paymentId.ToString());
|
rowTemp6.SetCellValue(listModel[i].paymentId);
|
||||||
rowTemp6.CellStyle = commonCellStyle;
|
rowTemp6.CellStyle = commonCellStyle;
|
||||||
|
|
||||||
|
|
||||||
@@ -1042,7 +1042,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
|||||||
rowTemp0.CellStyle = commonCellStyle;
|
rowTemp0.CellStyle = commonCellStyle;
|
||||||
|
|
||||||
var rowTemp1 = rowTemp.CreateCell(1);
|
var rowTemp1 = rowTemp.CreateCell(1);
|
||||||
rowTemp1.SetCellValue(listModel[i].serviceOrderId.ToString());
|
rowTemp1.SetCellValue(listModel[i].serviceOrderId);
|
||||||
rowTemp1.CellStyle = commonCellStyle;
|
rowTemp1.CellStyle = commonCellStyle;
|
||||||
|
|
||||||
var rowTemp2 = rowTemp.CreateCell(2);
|
var rowTemp2 = rowTemp.CreateCell(2);
|
||||||
@@ -1050,7 +1050,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
|||||||
rowTemp2.CellStyle = commonCellStyle;
|
rowTemp2.CellStyle = commonCellStyle;
|
||||||
|
|
||||||
var rowTemp3 = rowTemp.CreateCell(3);
|
var rowTemp3 = rowTemp.CreateCell(3);
|
||||||
rowTemp3.SetCellValue(listModel[i].redeemCode.ToString());
|
rowTemp3.SetCellValue(listModel[i].redeemCode);
|
||||||
rowTemp3.CellStyle = commonCellStyle;
|
rowTemp3.CellStyle = commonCellStyle;
|
||||||
|
|
||||||
var rowTemp4 = rowTemp.CreateCell(4);
|
var rowTemp4 = rowTemp.CreateCell(4);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
<SatelliteResourceLanguages>zh-Hans</SatelliteResourceLanguages>
|
<SatelliteResourceLanguages>zh-Hans</SatelliteResourceLanguages>
|
||||||
<MvcRazorCompileOnPublish>false</MvcRazorCompileOnPublish>
|
<MvcRazorCompileOnPublish>false</MvcRazorCompileOnPublish>
|
||||||
<UserSecretsId>b93911e3-96d4-453b-aa87-357c154804c2</UserSecretsId>
|
<UserSecretsId>b93911e3-96d4-453b-aa87-357c154804c2</UserSecretsId>
|
||||||
@@ -46,24 +46,24 @@
|
|||||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="8.0.0" />
|
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="8.0.0" />
|
||||||
<PackageReference Include="Autofac.Extras.DynamicProxy" Version="6.0.1" />
|
<PackageReference Include="Autofac.Extras.DynamicProxy" Version="6.0.1" />
|
||||||
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.0" />
|
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.0" />
|
||||||
<PackageReference Include="Essensoft.Paylink.Alipay" Version="4.0.12" />
|
<PackageReference Include="Essensoft.Paylink.Alipay" Version="4.0.14" />
|
||||||
<PackageReference Include="Essensoft.Paylink.WeChatPay" Version="4.0.12" />
|
<PackageReference Include="Essensoft.Paylink.WeChatPay" Version="4.0.14" />
|
||||||
<PackageReference Include="IdentityModel" Version="6.0.0" />
|
<PackageReference Include="IdentityModel" Version="6.0.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.9" />
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="6.0.9" />
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="5.0.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="5.0.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer" Version="5.0.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer" Version="5.0.0" />
|
||||||
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.0.1" />
|
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.0.1" />
|
||||||
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="3.1.6" />
|
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="3.1.6" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.PlatformAbstractions" Version="1.1.0" />
|
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.10" />
|
<PackageReference Include="NLog" Version="5.0.5" />
|
||||||
<PackageReference Include="NLog" Version="4.7.15" />
|
<PackageReference Include="NLog.Database" Version="5.0.5" />
|
||||||
<PackageReference Include="NLog.Web.AspNetCore" Version="4.14.0" />
|
<PackageReference Include="NLog.Web.AspNetCore" Version="5.1.5" />
|
||||||
<PackageReference Include="NPOI" Version="2.4.1" />
|
<PackageReference Include="NPOI" Version="2.5.6" />
|
||||||
<PackageReference Include="Snowflake.Core" Version="2.0.0" />
|
<PackageReference Include="Snowflake.Core" Version="2.0.0" />
|
||||||
<PackageReference Include="StackExchange.Redis" Version="2.6.66" />
|
<PackageReference Include="StackExchange.Redis" Version="2.6.70" />
|
||||||
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.23.1" />
|
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.25.0" />
|
||||||
<PackageReference Include="Tencent.QCloud.Cos.Sdk" Version="5.4.32" />
|
<PackageReference Include="Tencent.QCloud.Cos.Sdk" Version="5.4.32" />
|
||||||
<PackageReference Include="ToolGood.Words" Version="3.0.3.1" />
|
<PackageReference Include="ToolGood.Words" Version="3.0.3.1" />
|
||||||
<PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
|
<PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
|
||||||
|
|||||||
@@ -54,9 +54,6 @@ builder.Services.AddSession();
|
|||||||
// AutoMapper支持
|
// AutoMapper支持
|
||||||
builder.Services.AddAutoMapper(typeof(AutoMapperConfiguration));
|
builder.Services.AddAutoMapper(typeof(AutoMapperConfiguration));
|
||||||
|
|
||||||
//使用 SignalR
|
|
||||||
builder.Services.AddSignalR();
|
|
||||||
|
|
||||||
// 引入Payment 依赖注入(支付宝支付/微信支付)
|
// 引入Payment 依赖注入(支付宝支付/微信支付)
|
||||||
builder.Services.AddAlipay();
|
builder.Services.AddAlipay();
|
||||||
builder.Services.AddWeChatPay();
|
builder.Services.AddWeChatPay();
|
||||||
@@ -144,14 +141,10 @@ builder.Host.ConfigureContainer<ContainerBuilder>(containerBuilder =>
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Nlog注册============================================================================
|
#region Nlog注册============================================================================
|
||||||
|
// NLog: Setup NLog for Dependency injection
|
||||||
builder.Host.ConfigureLogging(logging =>
|
builder.Logging.ClearProviders();//移除已经注册的其他日志处理程序
|
||||||
{
|
builder.Logging.SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Trace); //设置最小的日志级别
|
||||||
logging.ClearProviders(); //移除已经注册的其他日志处理程序
|
builder.Host.UseNLog();
|
||||||
logging.SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Trace); //设置最小的日志级别
|
|
||||||
})
|
|
||||||
.UseNLog(); //NLog: Setup NLog for Dependency injection
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
@@ -175,8 +168,6 @@ app.UseRequestResponseLog();
|
|||||||
app.UseRecordAccessLogsMildd(GlobalEnumVars.CoreShopSystemCategory.Admin.ToString());
|
app.UseRecordAccessLogsMildd(GlobalEnumVars.CoreShopSystemCategory.Admin.ToString());
|
||||||
// 记录ip请求 (注意开启权限,不然本地无法写入)
|
// 记录ip请求 (注意开启权限,不然本地无法写入)
|
||||||
app.UseIpLogMildd();
|
app.UseIpLogMildd();
|
||||||
// signalr
|
|
||||||
app.UseSignalRSendMildd();
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -223,17 +214,9 @@ app.UseAuthentication();
|
|||||||
// 然后是授权中间件
|
// 然后是授权中间件
|
||||||
app.UseAuthorization();
|
app.UseAuthorization();
|
||||||
|
|
||||||
app.UseEndpoints(endpoints =>
|
app.MapControllerRoute(
|
||||||
{
|
name: "default",
|
||||||
endpoints.MapControllerRoute(
|
pattern: "{controller=Home}/{action=Index}/{id?}");
|
||||||
"areas",
|
|
||||||
"{area:exists}/{controller=Default}/{action=Index}/{id?}"
|
|
||||||
);
|
|
||||||
|
|
||||||
endpoints.MapControllerRoute(
|
|
||||||
"default",
|
|
||||||
"{controller=Home}/{action=Index}/{id?}");
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
//设置默认起始页(如default.html)
|
//设置默认起始页(如default.html)
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
"AppConfig": {
|
"AppConfig": {
|
||||||
"AppUrl": "https://admin.test.pro.coreshop.cn/", //后端管理地址
|
"AppUrl": "https://admin.test.pro.coreshop.cn/", //后端管理地址
|
||||||
"AppInterFaceUrl": "https://api.test.pro.coreshop.cn/", //接口请求地址
|
"AppInterFaceUrl": "https://api.test.pro.coreshop.cn/", //接口请求地址
|
||||||
"AppVersion": "CoreShopProfessional v0.6.4"
|
"AppVersion": "CoreShopProfessional v0.6.5"
|
||||||
},
|
},
|
||||||
//redis为必须启动项,请保持redis为正常可用
|
//redis为必须启动项,请保持redis为正常可用
|
||||||
"RedisConfig": {
|
"RedisConfig": {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ layui.define(['laytpl', 'layer', 'element', 'util'], function (exports) {
|
|||||||
, pageTabs: false //是否开启页面选项卡功能。单页版不推荐开启
|
, pageTabs: false //是否开启页面选项卡功能。单页版不推荐开启
|
||||||
|
|
||||||
, name: '核心商城系统'
|
, name: '核心商城系统'
|
||||||
, version: '0.6.4'
|
, version: '0.6.5'
|
||||||
, tableName: 'CoreCms' //本地存储表名
|
, tableName: 'CoreCms' //本地存储表名
|
||||||
, MOD_NAME: 'admin' //模块事件名
|
, MOD_NAME: 'admin' //模块事件名
|
||||||
|
|
||||||
|
|||||||
@@ -68,12 +68,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
<script type="text/html" id="LAY-app-CoreCmsAgentOrder-pagebar">
|
|
||||||
<div class="layui-btn-container">
|
|
||||||
<button class="layui-btn layui-btn-sm" lay-event="selectExportExcel"><i class="layui-icon layui-icon-add-circle"></i>选择导出</button>
|
|
||||||
<button class="layui-btn layui-btn-sm" lay-event="queryExportExcel"><i class="layui-icon layui-icon-download-circle"></i>查询导出</button>
|
|
||||||
</div>
|
|
||||||
</script>
|
|
||||||
<script type="text/html" id="LAY-app-CoreCmsAgentOrder-tableBox-bar">
|
<script type="text/html" id="LAY-app-CoreCmsAgentOrder-tableBox-bar">
|
||||||
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>
|
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>
|
||||||
</script>
|
</script>
|
||||||
@@ -125,8 +119,6 @@
|
|||||||
url: layui.setter.apiUrl + 'Api/CoreCmsAgentOrder/GetPageList',
|
url: layui.setter.apiUrl + 'Api/CoreCmsAgentOrder/GetPageList',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
toolbar: '#LAY-app-CoreCmsAgentOrder-toolbar',
|
toolbar: '#LAY-app-CoreCmsAgentOrder-toolbar',
|
||||||
pagebar: '#LAY-app-CoreCmsAgentOrder-pagebar',
|
|
||||||
className: 'pagebarbox',
|
|
||||||
defaultToolbar: ['filter', 'print', 'exports'],
|
defaultToolbar: ['filter', 'print', 'exports'],
|
||||||
height: 'full-127',//面包屑142px,搜索框4行172,3行137,2行102,1行67
|
height: 'full-127',//面包屑142px,搜索框4行172,3行137,2行102,1行67
|
||||||
page: true,
|
page: true,
|
||||||
@@ -174,18 +166,6 @@
|
|||||||
//查看详情
|
//查看详情
|
||||||
doDetails(obj);
|
doDetails(obj);
|
||||||
});
|
});
|
||||||
//头工具栏事件
|
|
||||||
table.on('pagebar(LAY-app-CoreCmsAgentOrder-tableBox)', function (obj) {
|
|
||||||
var checkStatus = table.checkStatus(obj.config.id);
|
|
||||||
switch (obj.event) {
|
|
||||||
case 'selectExportExcel':
|
|
||||||
doSelectExportExcel(checkStatus);
|
|
||||||
break;
|
|
||||||
case 'queryExportExcel':
|
|
||||||
doQueryExportexcel();
|
|
||||||
break;
|
|
||||||
};
|
|
||||||
});
|
|
||||||
//监听工具条
|
//监听工具条
|
||||||
table.on('tool(LAY-app-CoreCmsAgentOrder-tableBox)',
|
table.on('tool(LAY-app-CoreCmsAgentOrder-tableBox)',
|
||||||
function (obj) {
|
function (obj) {
|
||||||
@@ -228,46 +208,6 @@
|
|||||||
layer.msg(e.msg);
|
layer.msg(e.msg);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//执行查询条件导出excel
|
|
||||||
function doQueryExportexcel() {
|
|
||||||
layer.confirm('确定根据当前的查询条件导出数据吗?',
|
|
||||||
function (index) {
|
|
||||||
var field = searchwhere;
|
|
||||||
coreHelper.PostForm("Api/CoreCmsAgentOrder/QueryExportExcel", field, function (e) {
|
|
||||||
if (debug) { console.log(e); } //开启调试返回数据
|
|
||||||
if (e.code === 0) {
|
|
||||||
window.open(e.data);
|
|
||||||
} else {
|
|
||||||
layer.msg(e.msg);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
//执行选择目录导出数据
|
|
||||||
function doSelectExportExcel(checkStatus) {
|
|
||||||
var checkData = checkStatus.data;
|
|
||||||
if (checkData.length === 0) {
|
|
||||||
return layer.msg('请选择您要导出的数据');
|
|
||||||
}
|
|
||||||
layer.confirm('确定导出选择的内容吗?',
|
|
||||||
function (index) {
|
|
||||||
var delidsStr = [];
|
|
||||||
layui.each(checkData,
|
|
||||||
function (index, item) {
|
|
||||||
delidsStr.push(item.id);
|
|
||||||
});
|
|
||||||
layer.close(index);
|
|
||||||
coreHelper.Post("Api/CoreCmsAgentOrder/SelectExportExcel", { id: delidsStr }, function (e) {
|
|
||||||
if (debug) { console.log(e); } //开启调试返回数据
|
|
||||||
if (e.code === 0) {
|
|
||||||
window.open(e.data);
|
|
||||||
} else {
|
|
||||||
layer.msg(e.msg);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
//监听 表格复选框操作
|
//监听 表格复选框操作
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -254,7 +254,7 @@
|
|||||||
var delidsStr = [];
|
var delidsStr = [];
|
||||||
layui.each(checkData,
|
layui.each(checkData,
|
||||||
function (index, item) {
|
function (index, item) {
|
||||||
delidsStr.push(item.id);
|
delidsStr.push(item.paymentId);
|
||||||
});
|
});
|
||||||
layer.close(index);
|
layer.close(index);
|
||||||
coreHelper.Post("Api/CoreCmsBillPayments/SelectExportExcel", { id: delidsStr }, function (e) {
|
coreHelper.Post("Api/CoreCmsBillPayments/SelectExportExcel", { id: delidsStr }, function (e) {
|
||||||
|
|||||||
@@ -129,7 +129,7 @@
|
|||||||
<td>基于框架</td>
|
<td>基于框架</td>
|
||||||
<td>
|
<td>
|
||||||
<script type="text/html" template>
|
<script type="text/html" template>
|
||||||
Asp.Net Core 5.1
|
Asp.Net 7
|
||||||
</script>
|
</script>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -168,7 +168,8 @@
|
|||||||
});
|
});
|
||||||
//头工具栏事件
|
//头工具栏事件
|
||||||
table.on('pagebar(LAY-app-CoreCmsBillAftersales-tableBox)', function (obj) {
|
table.on('pagebar(LAY-app-CoreCmsBillAftersales-tableBox)', function (obj) {
|
||||||
var checkStatus = table.checkStatus(obj.config.aftersalesId);
|
console.log(obj);
|
||||||
|
var checkStatus = table.checkStatus(obj.config.id);
|
||||||
switch (obj.event) {
|
switch (obj.event) {
|
||||||
case 'selectExportExcel':
|
case 'selectExportExcel':
|
||||||
doSelectExportExcel(checkStatus);
|
doSelectExportExcel(checkStatus);
|
||||||
@@ -308,6 +309,7 @@
|
|||||||
}
|
}
|
||||||
//执行选择目录导出数据
|
//执行选择目录导出数据
|
||||||
function doSelectExportExcel(checkStatus) {
|
function doSelectExportExcel(checkStatus) {
|
||||||
|
console.log(checkStatus);
|
||||||
var checkData = checkStatus.data;
|
var checkData = checkStatus.data;
|
||||||
if (checkData.length === 0) {
|
if (checkData.length === 0) {
|
||||||
return layer.msg('请选择您要导出的数据');
|
return layer.msg('请选择您要导出的数据');
|
||||||
|
|||||||
@@ -168,7 +168,7 @@
|
|||||||
});
|
});
|
||||||
//头工具栏事件
|
//头工具栏事件
|
||||||
table.on('pagebar(LAY-app-CoreCmsBillReship-tableBox)', function (obj) {
|
table.on('pagebar(LAY-app-CoreCmsBillReship-tableBox)', function (obj) {
|
||||||
var checkStatus = table.checkStatus(obj.config.reshipId);
|
var checkStatus = table.checkStatus(obj.config.id);
|
||||||
switch (obj.event) {
|
switch (obj.event) {
|
||||||
case 'selectExportExcel':
|
case 'selectExportExcel':
|
||||||
doSelectExportExcel(checkStatus);
|
doSelectExportExcel(checkStatus);
|
||||||
@@ -262,7 +262,7 @@
|
|||||||
var delidsStr = [];
|
var delidsStr = [];
|
||||||
layui.each(checkData,
|
layui.each(checkData,
|
||||||
function (index, item) {
|
function (index, item) {
|
||||||
delidsStr.push(item.id);
|
delidsStr.push(item.reshipId);
|
||||||
});
|
});
|
||||||
layer.close(index);
|
layer.close(index);
|
||||||
coreHelper.Post("Api/CoreCmsBillReship/SelectExportExcel", { id: delidsStr }, function (e) {
|
coreHelper.Post("Api/CoreCmsBillReship/SelectExportExcel", { id: delidsStr }, function (e) {
|
||||||
|
|||||||
@@ -57,12 +57,6 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<script type="text/html" id="LAY-app-CoreCmsUserWeChatInfo-pagebar">
|
|
||||||
<div class="layui-btn-container">
|
|
||||||
<button class="layui-btn layui-btn-sm" lay-event="selectExportExcel"><i class="layui-icon layui-icon-add-circle"></i>选择导出</button>
|
|
||||||
<button class="layui-btn layui-btn-sm" lay-event="queryExportExcel"><i class="layui-icon layui-icon-download-circle"></i>查询导出</button>
|
|
||||||
</div>
|
|
||||||
</script>
|
|
||||||
<script type="text/html" id="LAY-app-CoreCmsUserWeChatInfo-tableBox-bar">
|
<script type="text/html" id="LAY-app-CoreCmsUserWeChatInfo-tableBox-bar">
|
||||||
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>
|
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>
|
||||||
</script>
|
</script>
|
||||||
@@ -109,7 +103,6 @@
|
|||||||
url: layui.setter.apiUrl + 'Api/CoreCmsUserWeChatInfo/GetPageList',
|
url: layui.setter.apiUrl + 'Api/CoreCmsUserWeChatInfo/GetPageList',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
toolbar: '#LAY-app-CoreCmsUserWeChatInfo-toolbar',
|
toolbar: '#LAY-app-CoreCmsUserWeChatInfo-toolbar',
|
||||||
pagebar: '#LAY-app-CoreCmsUserWeChatInfo-pagebar',
|
|
||||||
css: [
|
css: [
|
||||||
'.layui-table-page{text-align: right;}'
|
'.layui-table-page{text-align: right;}'
|
||||||
,'.layui-table-pagebar{float: left;}'
|
,'.layui-table-pagebar{float: left;}'
|
||||||
|
|||||||
@@ -727,7 +727,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
|
|||||||
}
|
}
|
||||||
else if (entity.type == (int)GlobalEnumVars.ShareType.Poster) //海报
|
else if (entity.type == (int)GlobalEnumVars.ShareType.Poster) //海报
|
||||||
{
|
{
|
||||||
//jm = await _shareServices.PosterShare(entity.client, entity.page, userShareCode, entity.url, entity.@params);
|
//取消海报后台生成渲染,统一改成生成二维码,前端渲染
|
||||||
jm = await _shareServices.QrShare(entity.client, entity.page, userShareCode, entity.url, entity.@params);
|
jm = await _shareServices.QrShare(entity.client, entity.page, userShareCode, entity.url, entity.@params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
<SatelliteResourceLanguages>zh-Hans</SatelliteResourceLanguages>
|
<SatelliteResourceLanguages>zh-Hans</SatelliteResourceLanguages>
|
||||||
<MvcRazorCompileOnPublish>false</MvcRazorCompileOnPublish>
|
<MvcRazorCompileOnPublish>false</MvcRazorCompileOnPublish>
|
||||||
<UserSecretsId>077906fd-e490-4431-9bae-c3a48ae21992</UserSecretsId>
|
<UserSecretsId>077906fd-e490-4431-9bae-c3a48ae21992</UserSecretsId>
|
||||||
@@ -50,22 +50,23 @@
|
|||||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="8.0.0" />
|
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="8.0.0" />
|
||||||
<PackageReference Include="Autofac.Extras.DynamicProxy" Version="6.0.1" />
|
<PackageReference Include="Autofac.Extras.DynamicProxy" Version="6.0.1" />
|
||||||
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.0" />
|
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.0" />
|
||||||
<PackageReference Include="Essensoft.Paylink.Alipay" Version="4.0.12" />
|
<PackageReference Include="Essensoft.Paylink.Alipay" Version="4.0.14" />
|
||||||
<PackageReference Include="Essensoft.Paylink.WeChatPay" Version="4.0.12" />
|
<PackageReference Include="Essensoft.Paylink.WeChatPay" Version="4.0.14" />
|
||||||
<PackageReference Include="Hangfire" Version="1.7.31" />
|
<PackageReference Include="Hangfire" Version="1.7.31" />
|
||||||
<PackageReference Include="Hangfire.AspNetCore" Version="1.7.31" />
|
<PackageReference Include="Hangfire.AspNetCore" Version="1.7.31" />
|
||||||
<PackageReference Include="Hangfire.Core" Version="1.7.31" />
|
<PackageReference Include="Hangfire.Core" Version="1.7.31" />
|
||||||
<PackageReference Include="Hangfire.Dashboard.BasicAuthorization" Version="1.0.2" />
|
<PackageReference Include="Hangfire.Dashboard.BasicAuthorization" Version="1.0.2" />
|
||||||
<PackageReference Include="Hangfire.Redis.StackExchange" Version="1.8.6" />
|
<PackageReference Include="Hangfire.Redis.StackExchange" Version="1.8.6" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.9" />
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.0.1" />
|
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.0.1" />
|
||||||
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="3.1.6" />
|
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="3.1.6" />
|
||||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.10" />
|
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="7.0.0" />
|
||||||
<PackageReference Include="Nito.AsyncEx" Version="5.1.2" />
|
<PackageReference Include="Nito.AsyncEx" Version="5.1.2" />
|
||||||
<PackageReference Include="NLog" Version="4.7.15" />
|
<PackageReference Include="NLog" Version="5.0.5" />
|
||||||
<PackageReference Include="NLog.Web.AspNetCore" Version="4.14.0" />
|
<PackageReference Include="NLog.Database" Version="5.0.5" />
|
||||||
|
<PackageReference Include="NLog.Web.AspNetCore" Version="5.1.5" />
|
||||||
<PackageReference Include="Snowflake.Core" Version="2.0.0" />
|
<PackageReference Include="Snowflake.Core" Version="2.0.0" />
|
||||||
<PackageReference Include="StackExchange.Redis" Version="2.6.66" />
|
<PackageReference Include="StackExchange.Redis" Version="2.6.70" />
|
||||||
<PackageReference Include="Tencent.QCloud.Cos.Sdk" Version="5.4.32" />
|
<PackageReference Include="Tencent.QCloud.Cos.Sdk" Version="5.4.32" />
|
||||||
<PackageReference Include="ToolGood.Words" Version="3.0.3.1" />
|
<PackageReference Include="ToolGood.Words" Version="3.0.3.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -181,7 +181,7 @@
|
|||||||
签到控制器
|
签到控制器
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:CoreCms.Net.Web.WebApi.Controllers.CheckInController.#ctor(CoreCms.Net.Auth.HttpContextUser.IHttpContextUser,CoreCms.Net.IServices.ICoreCmsUserCheckInDetailsServices)">
|
<member name="M:CoreCms.Net.Web.WebApi.Controllers.CheckInController.#ctor(CoreCms.Net.Auth.HttpContextUser.IHttpContextUser,CoreCms.Net.IServices.ICoreCmsUserCheckInDetailsServices,CoreCms.Net.Caching.AutoMate.RedisCache.IRedisOperationRepository)">
|
||||||
<summary>
|
<summary>
|
||||||
构造函数
|
构造函数
|
||||||
</summary>
|
</summary>
|
||||||
@@ -255,13 +255,10 @@
|
|||||||
优惠券接口
|
优惠券接口
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:CoreCms.Net.Web.WebApi.Controllers.CouponController.#ctor(CoreCms.Net.Auth.HttpContextUser.IHttpContextUser,CoreCms.Net.IServices.ICoreCmsCouponServices,CoreCms.Net.IServices.ICoreCmsPromotionServices)">
|
<member name="M:CoreCms.Net.Web.WebApi.Controllers.CouponController.#ctor(CoreCms.Net.Auth.HttpContextUser.IHttpContextUser,CoreCms.Net.IServices.ICoreCmsCouponServices,CoreCms.Net.IServices.ICoreCmsPromotionServices,CoreCms.Net.Caching.AutoMate.RedisCache.IRedisOperationRepository)">
|
||||||
<summary>
|
<summary>
|
||||||
构造函数
|
构造函数
|
||||||
</summary>
|
</summary>
|
||||||
<param name="user"></param>
|
|
||||||
<param name="couponServices"></param>
|
|
||||||
<param name="promotionServices"></param>
|
|
||||||
</member>
|
</member>
|
||||||
<member name="M:CoreCms.Net.Web.WebApi.Controllers.CouponController.CouponList(CoreCms.Net.Model.FromBody.FMCouponForUserCouponPost)">
|
<member name="M:CoreCms.Net.Web.WebApi.Controllers.CouponController.CouponList(CoreCms.Net.Model.FromBody.FMCouponForUserCouponPost)">
|
||||||
<summary>
|
<summary>
|
||||||
@@ -481,7 +478,7 @@
|
|||||||
团购调用接口数据
|
团购调用接口数据
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:CoreCms.Net.Web.WebApi.Controllers.GroupController.#ctor(CoreCms.Net.Auth.HttpContextUser.IHttpContextUser,CoreCms.Net.IServices.ICoreCmsPromotionServices,CoreCms.Net.IServices.ICoreCmsGoodsServices)">
|
<member name="M:CoreCms.Net.Web.WebApi.Controllers.GroupController.#ctor(CoreCms.Net.Auth.HttpContextUser.IHttpContextUser,CoreCms.Net.IServices.ICoreCmsPromotionServices)">
|
||||||
<summary>
|
<summary>
|
||||||
构造函数
|
构造函数
|
||||||
</summary>
|
</summary>
|
||||||
@@ -528,7 +525,7 @@
|
|||||||
订单调用接口数据
|
订单调用接口数据
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:CoreCms.Net.Web.WebApi.Controllers.OrderController.#ctor(CoreCms.Net.Auth.HttpContextUser.IHttpContextUser,CoreCms.Net.IServices.ICoreCmsOrderServices,CoreCms.Net.IServices.ICoreCmsBillAftersalesServices,CoreCms.Net.IServices.ICoreCmsSettingServices,CoreCms.Net.IServices.ICoreCmsAreaServices,CoreCms.Net.IServices.ICoreCmsBillReshipServices,CoreCms.Net.IServices.ICoreCmsShipServices,CoreCms.Net.IServices.ICoreCmsBillDeliveryServices,CoreCms.Net.IServices.ICoreCmsLogisticsServices,CoreCms.Net.IServices.ICoreCmsGoodsServices,CoreCms.Net.IServices.ICoreCmsStoreServices,CoreCms.Net.IServices.ICoreCmsOrderDistributionModelServices,CoreCms.Net.Caching.AutoMate.RedisCache.IRedisOperationRepository)">
|
<member name="M:CoreCms.Net.Web.WebApi.Controllers.OrderController.#ctor(CoreCms.Net.Auth.HttpContextUser.IHttpContextUser,CoreCms.Net.IServices.ICoreCmsOrderServices,CoreCms.Net.IServices.ICoreCmsBillAftersalesServices,CoreCms.Net.IServices.ICoreCmsSettingServices,CoreCms.Net.IServices.ICoreCmsAreaServices,CoreCms.Net.IServices.ICoreCmsBillReshipServices,CoreCms.Net.IServices.ICoreCmsShipServices,CoreCms.Net.IServices.ICoreCmsBillDeliveryServices,CoreCms.Net.IServices.ICoreCmsLogisticsServices,CoreCms.Net.IServices.ICoreCmsGoodsServices,CoreCms.Net.IServices.ICoreCmsStoreServices,CoreCms.Net.IServices.ICoreCmsOrderDistributionModelServices,CoreCms.Net.Caching.AutoMate.RedisCache.IRedisOperationRepository,CoreCms.Net.IServices.ICoreCmsBillPaymentsServices)">
|
||||||
<summary>
|
<summary>
|
||||||
构造函数
|
构造函数
|
||||||
</summary>
|
</summary>
|
||||||
@@ -563,6 +560,12 @@
|
|||||||
</summary>
|
</summary>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:CoreCms.Net.Web.WebApi.Controllers.OrderController.CheckOrderIsPaid(CoreCms.Net.Model.FromBody.FMStringId)">
|
||||||
|
<summary>
|
||||||
|
订单预览
|
||||||
|
</summary>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:CoreCms.Net.Web.WebApi.Controllers.OrderController.GetOrderStatusNum(CoreCms.Net.Model.ViewModels.DTO.GetOrderStatusNumPost)">
|
<member name="M:CoreCms.Net.Web.WebApi.Controllers.OrderController.GetOrderStatusNum(CoreCms.Net.Model.ViewModels.DTO.GetOrderStatusNumPost)">
|
||||||
<summary>
|
<summary>
|
||||||
获取订单不同状态的数量
|
获取订单不同状态的数量
|
||||||
@@ -646,7 +649,7 @@
|
|||||||
<param name="entity"></param>
|
<param name="entity"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:CoreCms.Net.Web.WebApi.Controllers.PageController.GetRecod(CoreCms.Net.Model.FromBody.FMGetRecodPost)">
|
<member name="M:CoreCms.Net.Web.WebApi.Controllers.PageController.GetRecord(CoreCms.Net.Model.FromBody.FMGetRecodPost)">
|
||||||
<summary>
|
<summary>
|
||||||
获取用户购买记录
|
获取用户购买记录
|
||||||
</summary>
|
</summary>
|
||||||
@@ -757,7 +760,7 @@
|
|||||||
构造函数
|
构造函数
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:CoreCms.Net.Web.WebApi.Controllers.PinTuanController.GetList">
|
<member name="M:CoreCms.Net.Web.WebApi.Controllers.PinTuanController.GetList(CoreCms.Net.Model.FromBody.FMPageByIntId)">
|
||||||
<summary>
|
<summary>
|
||||||
拼团列表
|
拼团列表
|
||||||
</summary>
|
</summary>
|
||||||
@@ -1449,61 +1452,5 @@
|
|||||||
</summary>
|
</summary>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="T:CoreCms.Net.Web.WebApi.Program">
|
|
||||||
<summary>
|
|
||||||
启动类
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:CoreCms.Net.Web.WebApi.Program.Main(System.String[])">
|
|
||||||
<summary>
|
|
||||||
启动配置
|
|
||||||
</summary>
|
|
||||||
<param name="args"></param>
|
|
||||||
</member>
|
|
||||||
<member name="M:CoreCms.Net.Web.WebApi.Program.CreateHostBuilder(System.String[])">
|
|
||||||
<summary>
|
|
||||||
创建启动支撑
|
|
||||||
</summary>
|
|
||||||
<param name="args"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="T:CoreCms.Net.Web.WebApi.Startup">
|
|
||||||
<summary>
|
|
||||||
启动配置
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:CoreCms.Net.Web.WebApi.Startup.#ctor(Microsoft.Extensions.Configuration.IConfiguration,Microsoft.AspNetCore.Hosting.IWebHostEnvironment)">
|
|
||||||
<summary>
|
|
||||||
构造函数
|
|
||||||
</summary>
|
|
||||||
<param name="configuration"></param>
|
|
||||||
<param name="env"></param>
|
|
||||||
</member>
|
|
||||||
<member name="P:CoreCms.Net.Web.WebApi.Startup.Configuration">
|
|
||||||
<summary>
|
|
||||||
配置属性
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:CoreCms.Net.Web.WebApi.Startup.Env">
|
|
||||||
<summary>
|
|
||||||
web环境
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:CoreCms.Net.Web.WebApi.Startup.ConfigureServices(Microsoft.Extensions.DependencyInjection.IServiceCollection)">
|
|
||||||
This method gets called by the runtime. Use this method to add services to the container.
|
|
||||||
</member>
|
|
||||||
<member name="M:CoreCms.Net.Web.WebApi.Startup.ConfigureContainer(Autofac.ContainerBuilder)">
|
|
||||||
<summary>
|
|
||||||
Autofac规则配置
|
|
||||||
</summary>
|
|
||||||
<param name="builder"></param>
|
|
||||||
</member>
|
|
||||||
<member name="M:CoreCms.Net.Web.WebApi.Startup.Configure(Microsoft.AspNetCore.Builder.IApplicationBuilder,Microsoft.AspNetCore.Hosting.IWebHostEnvironment)">
|
|
||||||
<summary>
|
|
||||||
This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
|
||||||
</summary>
|
|
||||||
<param name="app"></param>
|
|
||||||
<param name="env"></param>
|
|
||||||
</member>
|
|
||||||
</members>
|
</members>
|
||||||
</doc>
|
</doc>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
dbProvider="Microsoft.Data.SqlClient.SqlConnection, Microsoft.Data.SqlClient"
|
dbProvider="Microsoft.Data.SqlClient.SqlConnection, Microsoft.Data.SqlClient"
|
||||||
connectionString="Server=127.0.0.1;Database=BaseMIS;User ID=sa;Password=123456"
|
connectionString="Server=127.0.0.1;Database=BaseMIS;User ID=sa;Password=123456"
|
||||||
-->
|
-->
|
||||||
<target name="log_database" xsi:type="Database" dbProvider="Microsoft.Data.SqlClient.SqlConnection, Microsoft.Data.SqlClient" connectionString="Server=127.0.0.1;uid=CoreShop;pwd=CoreShop;Database=CoreShop;MultipleActiveResultSets=true;pooling=true;min pool size=5;max pool size=32767;connect timeout=20;Encrypt=True;TrustServerCertificate=True;">
|
<target name="log_database" xsi:type="Database" dbProvider="Microsoft.Data.SqlClient.SqlConnection, Microsoft.Data.SqlClient" connectionString="Server=127.0.0.1;uid=CoreShopProfessional;pwd=CoreShopProfessional;Database=CoreShopProfessional;MultipleActiveResultSets=true;pooling=true;min pool size=5;max pool size=32767;connect timeout=20;Encrypt=True;TrustServerCertificate=True;">
|
||||||
<commandText>
|
<commandText>
|
||||||
INSERT INTO SysNLogRecords
|
INSERT INTO SysNLogRecords
|
||||||
(LogDate,LogLevel,LogType,LogTitle,Logger,Message,MachineName,MachineIp,NetRequestMethod
|
(LogDate,LogLevel,LogType,LogTitle,Logger,Message,MachineName,MachineIp,NetRequestMethod
|
||||||
|
|||||||
@@ -59,9 +59,6 @@ builder.Services.AddAutoMapper(typeof(AutoMapperConfiguration));
|
|||||||
//MediatR(只需要注册一个,同项目或类库下就不需要注册多个)
|
//MediatR(只需要注册一个,同项目或类库下就不需要注册多个)
|
||||||
builder.Services.AddMediatR(typeof(TextMessageEventCommand).Assembly);
|
builder.Services.AddMediatR(typeof(TextMessageEventCommand).Assembly);
|
||||||
|
|
||||||
//使用 SignalR
|
|
||||||
builder.Services.AddSignalR();
|
|
||||||
|
|
||||||
//Redis消息队列
|
//Redis消息队列
|
||||||
builder.Services.AddRedisMessageQueueSetup();
|
builder.Services.AddRedisMessageQueueSetup();
|
||||||
|
|
||||||
@@ -155,14 +152,10 @@ builder.Host.ConfigureContainer<ContainerBuilder>(containerBuilder =>
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Nlog注册============================================================================
|
#region Nlog注册============================================================================
|
||||||
|
// NLog: Setup NLog for Dependency injection
|
||||||
builder.Host.ConfigureLogging(logging =>
|
builder.Logging.ClearProviders();//移除已经注册的其他日志处理程序
|
||||||
{
|
builder.Logging.SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Trace); //设置最小的日志级别
|
||||||
logging.ClearProviders(); //移除已经注册的其他日志处理程序
|
builder.Host.UseNLog();
|
||||||
logging.SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Trace); //设置最小的日志级别
|
|
||||||
})
|
|
||||||
.UseNLog(); //NLog: Setup NLog for Dependency injection
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
@@ -186,8 +179,6 @@ app.UseRequestResponseLog();
|
|||||||
app.UseRecordAccessLogsMildd(GlobalEnumVars.CoreShopSystemCategory.Api.ToString());
|
app.UseRecordAccessLogsMildd(GlobalEnumVars.CoreShopSystemCategory.Api.ToString());
|
||||||
// 记录ip请求 (注意开启权限,不然本地无法写入)
|
// 记录ip请求 (注意开启权限,不然本地无法写入)
|
||||||
app.UseIpLogMildd();
|
app.UseIpLogMildd();
|
||||||
// signalr
|
|
||||||
app.UseSignalRSendMildd();
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -274,17 +265,9 @@ app.UseAuthentication();
|
|||||||
// 然后是授权中间件
|
// 然后是授权中间件
|
||||||
app.UseAuthorization();
|
app.UseAuthorization();
|
||||||
|
|
||||||
app.UseEndpoints(endpoints =>
|
app.MapControllerRoute(
|
||||||
{
|
name: "default",
|
||||||
endpoints.MapControllerRoute(
|
pattern: "{controller=Home}/{action=Index}/{id?}");
|
||||||
"areas",
|
|
||||||
"{area:exists}/{controller=Default}/{action=Index}/{id?}"
|
|
||||||
);
|
|
||||||
|
|
||||||
endpoints.MapControllerRoute(
|
|
||||||
"default",
|
|
||||||
"{controller=Home}/{action=Index}/{id?}");
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
//设置默认起始页(如default.html)
|
//设置默认起始页(如default.html)
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
"AppConfig": {
|
"AppConfig": {
|
||||||
"AppUrl": "https://admin.test.pro.coreshop.cn/", //后端管理地址
|
"AppUrl": "https://admin.test.pro.coreshop.cn/", //后端管理地址
|
||||||
"AppInterFaceUrl": "https://api.test.pro.coreshop.cn/", //接口请求地址
|
"AppInterFaceUrl": "https://api.test.pro.coreshop.cn/", //接口请求地址
|
||||||
"AppVersion": "CoreShopProfessional v0.6.4"
|
"AppVersion": "CoreShopProfessional v0.6.5"
|
||||||
},
|
},
|
||||||
//redis为必须启动项,请保持redis为正常可用
|
//redis为必须启动项,请保持redis为正常可用
|
||||||
"RedisConfig": {
|
"RedisConfig": {
|
||||||
|
|||||||
@@ -31,8 +31,8 @@
|
|||||||
<br />
|
<br />
|
||||||
<span class="zhuyi">注意事项:</span><br />
|
<span class="zhuyi">注意事项:</span><br />
|
||||||
<p>1、以上组件地址支持自定义调整,投产环境下请及时修改或屏蔽;投产环境下可删除此展示页面。</p>
|
<p>1、以上组件地址支持自定义调整,投产环境下请及时修改或屏蔽;投产环境下可删除此展示页面。</p>
|
||||||
<p>2、『Swagger接口文档』访问路径修改位置为:【Startup.cs】文件第206行左右【代码:c.RoutePrefix = "doc"】,请将doc修改为其他虚拟路径。</p>
|
<p>2、『Swagger接口文档』访问路径修改位置为:【Program.cs】文件第205行左右【代码:c.RoutePrefix = "doc"】,请将doc修改为其他虚拟路径。</p>
|
||||||
<p>3、『HangFire定时任务』面板路径修改位置为:【Startup.cs】文件第256行左右【代码:app.UseHangfireDashboard("/job", options);】,请将job修改为其他虚拟路径。</p>
|
<p>3、『HangFire定时任务』面板路径修改位置为:【Program.cs】文件第240行左右【代码:app.UseHangfireDashboard("/job", hangfireOptions);】,请将job修改为其他虚拟路径。</p>
|
||||||
<p>4、『HangFire定时任务』初始登录账号密码均为:【CoreShop】,修改位置为:【appsettings.json】文件,代码中【HangFire】节点。</p>
|
<p>4、『HangFire定时任务』初始登录账号密码均为:【CoreShop】,修改位置为:【appsettings.json】文件,代码中【HangFire】节点。</p>
|
||||||
<p>5、如果无法访问接口,请检查【1、数据库配置是否正常】【2、Redis是否配置正常并可正常链接使用】【3、Mysql数据库请保持5.7+版本】【4、站点日志文件夹写入权限】。</p>
|
<p>5、如果无法访问接口,请检查【1、数据库配置是否正常】【2、Redis是否配置正常并可正常链接使用】【3、Mysql数据库请保持5.7+版本】【4、站点日志文件夹写入权限】。</p>
|
||||||
<p>6、如果第三方请求接口服务获取不到数据,Debug提示【Access-Control-Allow-Origin】的错误,表示为跨域问题,请打开【appsettings.json】文件在【Cors】节点设置请求白名单。</p>
|
<p>6、如果第三方请求接口服务获取不到数据,Debug提示【Access-Control-Allow-Origin】的错误,表示为跨域问题,请打开【appsettings.json】文件在【Cors】节点设置请求白名单。</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user