【升级】升级Asp.Net 6.0.11 到 Asp.Net 7.0.0

【升级】升级所有组建包,移除一些不用或者版本弃用的组建。
【优化】优化升级npoi最新版后,出现导出数据兼容性的问题。
【优化】使用新的【NLog.Database】nlog数据库链接组件,解决nlog升级到5.x以后版本记录到数据库日志失败的问题。
This commit is contained in:
大灰灰
2022-11-09 19:06:05 +08:00
parent 543bb281f4
commit 2313bf6ac9
58 changed files with 154 additions and 832 deletions

View File

@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.9" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
</ItemGroup>
<ItemGroup>

View File

@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="6.0.1" />
<PackageReference Include="SKIT.FlurlHttpClient.Wechat.Api" Version="2.17.0" />
<PackageReference Include="StackExchange.Redis" Version="2.6.66" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="7.0.0" />
<PackageReference Include="SKIT.FlurlHttpClient.Wechat.Api" Version="2.20.1" />
<PackageReference Include="StackExchange.Redis" Version="2.6.70" />
</ItemGroup>
<ItemGroup>

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
@@ -19,7 +19,7 @@
<ItemGroup>
<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>

View File

@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AutoMapper" Version="12.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
</ItemGroup>
<ItemGroup>

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
@@ -22,11 +22,11 @@
<PackageReference Include="Hangfire.MySqlStorage" Version="2.0.3" />
<PackageReference Include="Hangfire.Redis.StackExchange" Version="1.8.6" />
<PackageReference Include="InitQ" Version="1.0.0.14" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.OpenApi" Version="1.4.3" />
<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" />
</ItemGroup>

View File

@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

View File

@@ -1,13 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Aliyun.OSS.SDK.NetCore" Version="2.13.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.5" />
<PackageReference Include="Microsoft.AspNetCore.SignalR" Version="1.1.0" />
</ItemGroup>
<ItemGroup>

View File

@@ -21,7 +21,6 @@ using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.AspNetCore.SignalR;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;

View File

@@ -21,7 +21,6 @@ using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.AspNetCore.SignalR;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>
<ItemGroup>

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>
<ItemGroup>

View File

@@ -31,7 +31,6 @@ namespace CoreCms.Net.IServices
/// <returns></returns>
Task<WebApiCallBack> QrShare(int client, int page, int userShareCode, string url, JObject parameter);
/// <summary>
/// 页面分享
/// </summary>
@@ -43,19 +42,6 @@ namespace CoreCms.Net.IServices
/// <returns></returns>
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>

View File

@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>
<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="NLog" Version="4.7.15" />
<PackageReference Include="NLog" Version="5.0.5" />
</ItemGroup>
<ItemGroup>

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>
<ItemGroup>

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>
<ItemGroup>

View File

@@ -51,18 +51,6 @@ namespace CoreCms.Net.Middlewares
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>
/// IP请求中间件
/// </summary>
@@ -73,7 +61,6 @@ namespace CoreCms.Net.Middlewares
return app.UseMiddleware<IPLogMildd>();
}
/// <summary>
/// 用户访问接口日志中间件
/// </summary>

View File

@@ -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);
}
}
}

View File

@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="sqlSugarCore" Version="5.1.3.24" />
<PackageReference Include="sqlSugarCore" Version="5.1.3.32" />
</ItemGroup>
</Project>

View File

@@ -104,10 +104,10 @@ namespace CoreCms.Net.Model.FromBody
/// </summary>
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 style { get; set; }

View File

@@ -28,14 +28,14 @@ namespace CoreCms.Net.Model.FromBody
[Display(Name = "数据子集")]
[Required(ErrorMessage = "请输入{0}")]
public List<items> datalist { get; set; }
public List<Items> datalist { get; set; }
}
/// <summary>
/// 数据子集类型
/// </summary>
[Display(Name = "数据子集类型")]
public class items
public class Items
{
[Display(Name = "数据子集类型")]
[Required(ErrorMessage = "请输入{0}")]

View File

@@ -21,10 +21,10 @@ namespace CoreCms.Net.Model.ViewModels.DTO
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>
/// 关联资源序列

View File

@@ -28,20 +28,20 @@ namespace CoreCms.Net.Model.ViewModels.DTO.Distribution
/// <summary>
/// 分销级别一配置
/// </summary>
public commission commission_1 { get; set; }
public Commission commission_1 { get; set; }
/// <summary>
/// 分销级别二配置
/// </summary>
public commission commission_2 { get; set; }
public Commission commission_2 { get; set; }
/// <summary>
/// 分销级别三配置
/// </summary>
public commission commission_3 { get; set; }
public Commission commission_3 { get; set; }
}
public class commission
public class Commission
{
/// <summary>
/// 类型(百分比/固定金额)

View File

@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Essensoft.Paylink.Alipay" Version="4.0.12" />
<PackageReference Include="Essensoft.Paylink.WeChatPay" Version="4.0.12" />
<PackageReference Include="Essensoft.Paylink.Alipay" Version="4.0.14" />
<PackageReference Include="Essensoft.Paylink.WeChatPay" Version="4.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>

View File

@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<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>

View File

@@ -155,7 +155,7 @@ namespace CoreCms.Net.Repository
updateTime = p.updateTime,
verifyTime = p.verifyTime,
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()
@@ -184,7 +184,7 @@ namespace CoreCms.Net.Repository
updateTime = p.updateTime,
verifyTime = p.verifyTime,
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()
.OrderByIF(orderByExpression != null, orderByExpression, orderByType)

View File

@@ -132,7 +132,7 @@ namespace CoreCms.Net.Services
p.status == (int)GlobalEnumVars.OrderStatus.Normal);
if (orderModel != null)
{
dto.rel.Add(new rel()
dto.rel.Add(new Rel()
{
sourceId = orderId,
money = orderModel.orderAmount
@@ -162,7 +162,7 @@ namespace CoreCms.Net.Services
jm.msg = "请输入正确的充值金额";
return jm;
}
dto.rel.Add(new rel()
dto.rel.Add(new Rel()
{
sourceId = orderId,
money = dto.money
@@ -186,7 +186,7 @@ namespace CoreCms.Net.Services
var formInfo = await _formSubmitServices.QueryByClauseAsync(p => p.id == intId && p.payStatus == false);
if (formInfo != null)
{
dto.rel.Add(new rel()
dto.rel.Add(new Rel()
{
sourceId = intId.ToString(),
money = formInfo.money
@@ -218,7 +218,7 @@ namespace CoreCms.Net.Services
var serviceInfo = await _servicesServices.QueryByClauseAsync(@where);
if (serviceInfo != null)
{
dto.rel.Add(new rel()
dto.rel.Add(new Rel()
{
sourceId = orderId,
money = serviceInfo.money
@@ -290,7 +290,7 @@ namespace CoreCms.Net.Services
p.status == (int)GlobalEnumVars.OrderStatus.Normal);
if (orderModel != null)
{
dto.rel.Add(new rel()
dto.rel.Add(new Rel()
{
sourceId = item,
money = orderModel.orderAmount
@@ -322,7 +322,7 @@ namespace CoreCms.Net.Services
}
foreach (var item in sourceStr)
{
dto.rel.Add(new rel()
dto.rel.Add(new Rel()
{
sourceId = item,
money = dto.money
@@ -342,7 +342,7 @@ namespace CoreCms.Net.Services
var formInfo = await _formSubmitServices.QueryByClauseAsync(p => p.id == item && p.payStatus == false);
if (formInfo != null)
{
dto.rel.Add(new rel()
dto.rel.Add(new Rel()
{
sourceId = item.ToString(),
money = formInfo.money
@@ -379,7 +379,7 @@ namespace CoreCms.Net.Services
var serviceInfo = await _servicesServices.QueryByClauseAsync(@where);
if (serviceInfo != null)
{
dto.rel.Add(new rel()
dto.rel.Add(new Rel()
{
sourceId = item,
money = serviceInfo.money

View File

@@ -1,22 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Aliyun.OSS.SDK.NetCore" Version="2.13.0" />
<PackageReference Include="Essensoft.Paylink.Alipay" Version="4.0.12" />
<PackageReference Include="Essensoft.Paylink.WeChatPay" Version="4.0.12" />
<PackageReference Include="Essensoft.Paylink.Alipay" Version="4.0.14" />
<PackageReference Include="Essensoft.Paylink.WeChatPay" Version="4.0.14" />
<PackageReference Include="Flurl.Http" Version="3.2.4" />
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="7.0.0" />
<PackageReference Include="Qiniu" Version="8.2.0" />
<PackageReference Include="QRCoder" Version="1.4.3" />
<PackageReference Include="SixLabors.ImageSharp" Version="1.0.4" />
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="1.0.0-beta13" />
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
<PackageReference Include="SixLabors.ImageSharp.Web" Version="2.0.2" />
<PackageReference Include="System.Drawing.Common" Version="7.0.0" />
<PackageReference Include="Tencent.QCloud.Cos.Sdk" Version="5.4.32" />
<PackageReference Include="ToolGood.Words" Version="3.0.3.1" />
</ItemGroup>

View File

@@ -424,7 +424,7 @@ namespace CoreCms.Net.Services
var obj = JObject.Parse(p.parameters);
if (p.code == "COMMISSION_1")
{
dto.commission_1 = new commission()
dto.commission_1 = new Commission()
{
type = obj["commissionType"].ObjectToInt(0),
discount = obj["discount"].ObjectToDecimal(0)
@@ -432,7 +432,7 @@ namespace CoreCms.Net.Services
}
else if (p.code == "COMMISSION_2")
{
dto.commission_2 = new commission()
dto.commission_2 = new Commission()
{
type = obj["commissionType"].ObjectToInt(0),
discount = obj["discount"].ObjectToDecimal(0)
@@ -441,7 +441,7 @@ namespace CoreCms.Net.Services
}
else if (p.code == "COMMISSION_3")
{
dto.commission_3 = new commission()
dto.commission_3 = new Commission()
{
type = obj["commissionType"].ObjectToInt(0),
discount = obj["discount"].ObjectToDecimal(0)
@@ -453,17 +453,17 @@ namespace CoreCms.Net.Services
else
{
dto.grade_id = 0;
dto.commission_1 = new commission()
dto.commission_1 = new Commission()
{
type = commissionType,
discount = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.CommissionFirst).ObjectToDecimal(0)
};
dto.commission_2 = new commission()
dto.commission_2 = new Commission()
{
type = commissionType,
discount = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.CommissionSecond).ObjectToDecimal(0)
};
dto.commission_3 = new commission()
dto.commission_3 = new Commission()
{
type = commissionType,
discount = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.CommissionThird).ObjectToDecimal(0)
@@ -474,17 +474,17 @@ namespace CoreCms.Net.Services
else
{
dto.grade_id = 0;
dto.commission_1 = new commission()
dto.commission_1 = new Commission()
{
type = commissionType,
discount = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.CommissionFirst).ObjectToDecimal(0)
};
dto.commission_2 = new commission()
dto.commission_2 = new Commission()
{
type = commissionType,
discount = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.CommissionSecond).ObjectToDecimal(0)
};
dto.commission_3 = new commission()
dto.commission_3 = new Commission()
{
type = commissionType,
discount = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.CommissionThird).ObjectToDecimal(0)

View File

@@ -30,7 +30,6 @@ using Microsoft.Extensions.DependencyInjection;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using SqlSugar;
using static SKIT.FlurlHttpClient.Wechat.Api.Models.ScanProductV2AddRequest.Types.Product.Types;
namespace CoreCms.Net.Services

View File

@@ -29,11 +29,6 @@ using CoreCms.Net.WeChat.Service.Options;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Options;
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.Models;
@@ -113,44 +108,6 @@ namespace CoreCms.Net.Services
#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
/// <summary>
/// 页面分享
@@ -790,260 +747,5 @@ namespace CoreCms.Net.Services
return jm;
}
#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;
}
}
}

View File

@@ -84,7 +84,8 @@ namespace CoreCms.Net.Services
request.Audit.Category.FirstCategoryId = entity.level1;
request.Audit.Category.SecondCategoryId = entity.level2;
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);

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>
<ItemGroup>

View File

@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<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>

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>
<ItemGroup>

View File

@@ -12,7 +12,7 @@
onLaunch() {
// 此版本发布于2022-10-23
const version = '0.6.4'
const version = '0.6.5'
// 开发环境才提示,生产环境不会提示
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;');

View File

@@ -1,13 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.SignalR.Core" Version="1.1.0" />
<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="Yitter.IdGenerator" Version="1.0.14" />
</ItemGroup>

View File

@@ -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 ,来接收
}
}
}

View File

@@ -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);
}
}

View File

@@ -1,17 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MediatR" 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.Extensions.Http" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="7.0.0" />
<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>

View File

@@ -1081,12 +1081,13 @@ namespace CoreCms.Net.Web.Admin.Controllers
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 };
if (order.items.Count <= 1) continue;
foreach (var id in marId)
{
sheet1.AddMergedRegion(new CellRangeAddress(nowNumber + 1, detailsStartNumber, id, id));
}
}
// 写入到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 };
if (order.items.Count <= 1) continue;
foreach (var id in marId)
{
sheet1.AddMergedRegion(new CellRangeAddress(nowNumber + 1, detailsStartNumber, id, id));
}
}
// 写入到excel

View File

@@ -389,7 +389,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
rowTemp0.CellStyle = commonCellStyle;
var rowTemp1 = rowTemp.CreateCell(1);
rowTemp1.SetCellValue(listModel[i].serviceOrderId.ToString());
rowTemp1.SetCellValue(listModel[i].serviceOrderId);
rowTemp1.CellStyle = commonCellStyle;
var rowTemp2 = rowTemp.CreateCell(2);
@@ -409,7 +409,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
rowTemp5.CellStyle = commonCellStyle;
var rowTemp6 = rowTemp.CreateCell(6);
rowTemp6.SetCellValue(listModel[i].paymentId.ToString());
rowTemp6.SetCellValue(listModel[i].paymentId);
rowTemp6.CellStyle = commonCellStyle;
var rowTemp7 = rowTemp.CreateCell(7);
@@ -607,7 +607,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
var rowTemp1 = rowTemp.CreateCell(1);
rowTemp1.SetCellValue(listModel[i].serviceOrderId.ToString());
rowTemp1.SetCellValue(listModel[i].serviceOrderId);
rowTemp1.CellStyle = commonCellStyle;
@@ -637,7 +637,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
var rowTemp6 = rowTemp.CreateCell(6);
rowTemp6.SetCellValue(listModel[i].paymentId.ToString());
rowTemp6.SetCellValue(listModel[i].paymentId);
rowTemp6.CellStyle = commonCellStyle;
@@ -1042,7 +1042,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
rowTemp0.CellStyle = commonCellStyle;
var rowTemp1 = rowTemp.CreateCell(1);
rowTemp1.SetCellValue(listModel[i].serviceOrderId.ToString());
rowTemp1.SetCellValue(listModel[i].serviceOrderId);
rowTemp1.CellStyle = commonCellStyle;
var rowTemp2 = rowTemp.CreateCell(2);
@@ -1050,7 +1050,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
rowTemp2.CellStyle = commonCellStyle;
var rowTemp3 = rowTemp.CreateCell(3);
rowTemp3.SetCellValue(listModel[i].redeemCode.ToString());
rowTemp3.SetCellValue(listModel[i].redeemCode);
rowTemp3.CellStyle = commonCellStyle;
var rowTemp4 = rowTemp.CreateCell(4);

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<SatelliteResourceLanguages>zh-Hans</SatelliteResourceLanguages>
<MvcRazorCompileOnPublish>false</MvcRazorCompileOnPublish>
<UserSecretsId>b93911e3-96d4-453b-aa87-357c154804c2</UserSecretsId>
@@ -46,24 +46,24 @@
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Autofac.Extras.DynamicProxy" Version="6.0.1" />
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.0" />
<PackageReference Include="Essensoft.Paylink.Alipay" Version="4.0.12" />
<PackageReference Include="Essensoft.Paylink.WeChatPay" Version="4.0.12" />
<PackageReference Include="Essensoft.Paylink.Alipay" Version="4.0.14" />
<PackageReference Include="Essensoft.Paylink.WeChatPay" Version="4.0.14" />
<PackageReference Include="IdentityModel" Version="6.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.9" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="6.0.9" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="7.0.0" />
<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.ApiExplorer" Version="5.0.0" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.0.1" />
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="3.1.6" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.PlatformAbstractions" Version="1.1.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.10" />
<PackageReference Include="NLog" Version="4.7.15" />
<PackageReference Include="NLog.Web.AspNetCore" Version="4.14.0" />
<PackageReference Include="NPOI" Version="2.4.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="7.0.0" />
<PackageReference Include="NLog" Version="5.0.5" />
<PackageReference Include="NLog.Database" Version="5.0.5" />
<PackageReference Include="NLog.Web.AspNetCore" Version="5.1.5" />
<PackageReference Include="NPOI" Version="2.5.6" />
<PackageReference Include="Snowflake.Core" Version="2.0.0" />
<PackageReference Include="StackExchange.Redis" Version="2.6.66" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.23.1" />
<PackageReference Include="StackExchange.Redis" Version="2.6.70" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.25.0" />
<PackageReference Include="Tencent.QCloud.Cos.Sdk" Version="5.4.32" />
<PackageReference Include="ToolGood.Words" Version="3.0.3.1" />
<PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />

View File

@@ -54,9 +54,6 @@ builder.Services.AddSession();
// AutoMapper支持
builder.Services.AddAutoMapper(typeof(AutoMapperConfiguration));
//使用 SignalR
builder.Services.AddSignalR();
// 引入Payment 依赖注入(支付宝支付/微信支付)
builder.Services.AddAlipay();
builder.Services.AddWeChatPay();
@@ -144,14 +141,10 @@ builder.Host.ConfigureContainer<ContainerBuilder>(containerBuilder =>
#endregion
#region Nlog注册============================================================================
builder.Host.ConfigureLogging(logging =>
{
logging.ClearProviders(); //移除已经注册的其他日志处理程序
logging.SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Trace); //设置最小的日志级别
})
.UseNLog(); //NLog: Setup NLog for Dependency injection
// NLog: Setup NLog for Dependency injection
builder.Logging.ClearProviders();//移除已经注册的其他日志处理程序
builder.Logging.SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Trace); //设置最小的日志级别
builder.Host.UseNLog();
#endregion
@@ -175,8 +168,6 @@ app.UseRequestResponseLog();
app.UseRecordAccessLogsMildd(GlobalEnumVars.CoreShopSystemCategory.Admin.ToString());
// 记录ip请求 (注意开启权限,不然本地无法写入)
app.UseIpLogMildd();
// signalr
app.UseSignalRSendMildd();
#endregion
@@ -223,17 +214,9 @@ app.UseAuthentication();
// 然后是授权中间件
app.UseAuthorization();
app.UseEndpoints(endpoints =>
{
endpoints.MapControllerRoute(
"areas",
"{area:exists}/{controller=Default}/{action=Index}/{id?}"
);
endpoints.MapControllerRoute(
"default",
"{controller=Home}/{action=Index}/{id?}");
});
app.MapControllerRoute(
name: "default",
pattern: "{controller=Home}/{action=Index}/{id?}");
//设置默认起始页如default.html

View File

@@ -16,7 +16,7 @@
"AppConfig": {
"AppUrl": "https://admin.test.pro.coreshop.cn/", //后端管理地址
"AppInterFaceUrl": "https://api.test.pro.coreshop.cn/", //接口请求地址
"AppVersion": "CoreShopProfessional v0.6.4"
"AppVersion": "CoreShopProfessional v0.6.5"
},
//redis为必须启动项请保持redis为正常可用
"RedisConfig": {

View File

@@ -12,7 +12,7 @@ layui.define(['laytpl', 'layer', 'element', 'util'], function (exports) {
, pageTabs: false //是否开启页面选项卡功能。单页版不推荐开启
, name: '核心商城系统'
, version: '0.6.4'
, version: '0.6.5'
, tableName: 'CoreCms' //本地存储表名
, MOD_NAME: 'admin' //模块事件名

View File

@@ -68,12 +68,6 @@
</div>
</div>
</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">
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>
</script>
@@ -125,8 +119,6 @@
url: layui.setter.apiUrl + 'Api/CoreCmsAgentOrder/GetPageList',
method: 'POST',
toolbar: '#LAY-app-CoreCmsAgentOrder-toolbar',
pagebar: '#LAY-app-CoreCmsAgentOrder-pagebar',
className: 'pagebarbox',
defaultToolbar: ['filter', 'print', 'exports'],
height: 'full-127',//面包屑142px,搜索框4行172,3行137,2行102,1行67
page: true,
@@ -174,18 +166,6 @@
//查看详情
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)',
function (obj) {
@@ -228,46 +208,6 @@
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);
}
});
});
}
//监听 表格复选框操作
});
};

View File

@@ -254,7 +254,7 @@
var delidsStr = [];
layui.each(checkData,
function (index, item) {
delidsStr.push(item.id);
delidsStr.push(item.paymentId);
});
layer.close(index);
coreHelper.Post("Api/CoreCmsBillPayments/SelectExportExcel", { id: delidsStr }, function (e) {

View File

@@ -129,7 +129,7 @@
<td>基于框架</td>
<td>
<script type="text/html" template>
Asp.Net Core 5.1
Asp.Net 7
</script>
</td>
</tr>

View File

@@ -168,7 +168,8 @@
});
//头工具栏事件
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) {
case 'selectExportExcel':
doSelectExportExcel(checkStatus);
@@ -308,6 +309,7 @@
}
//执行选择目录导出数据
function doSelectExportExcel(checkStatus) {
console.log(checkStatus);
var checkData = checkStatus.data;
if (checkData.length === 0) {
return layer.msg('请选择您要导出的数据');

View File

@@ -168,7 +168,7 @@
});
//头工具栏事件
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) {
case 'selectExportExcel':
doSelectExportExcel(checkStatus);
@@ -262,7 +262,7 @@
var delidsStr = [];
layui.each(checkData,
function (index, item) {
delidsStr.push(item.id);
delidsStr.push(item.reshipId);
});
layer.close(index);
coreHelper.Post("Api/CoreCmsBillReship/SelectExportExcel", { id: delidsStr }, function (e) {

View File

@@ -57,12 +57,6 @@
</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">
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>
</script>
@@ -109,7 +103,6 @@
url: layui.setter.apiUrl + 'Api/CoreCmsUserWeChatInfo/GetPageList',
method: 'POST',
toolbar: '#LAY-app-CoreCmsUserWeChatInfo-toolbar',
pagebar: '#LAY-app-CoreCmsUserWeChatInfo-pagebar',
css: [
'.layui-table-page{text-align: right;}'
,'.layui-table-pagebar{float: left;}'

View File

@@ -727,7 +727,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
}
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);
}

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<SatelliteResourceLanguages>zh-Hans</SatelliteResourceLanguages>
<MvcRazorCompileOnPublish>false</MvcRazorCompileOnPublish>
<UserSecretsId>077906fd-e490-4431-9bae-c3a48ae21992</UserSecretsId>
@@ -50,22 +50,23 @@
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Autofac.Extras.DynamicProxy" Version="6.0.1" />
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.0" />
<PackageReference Include="Essensoft.Paylink.Alipay" Version="4.0.12" />
<PackageReference Include="Essensoft.Paylink.WeChatPay" Version="4.0.12" />
<PackageReference Include="Essensoft.Paylink.Alipay" Version="4.0.14" />
<PackageReference Include="Essensoft.Paylink.WeChatPay" Version="4.0.14" />
<PackageReference Include="Hangfire" Version="1.7.31" />
<PackageReference Include="Hangfire.AspNetCore" Version="1.7.31" />
<PackageReference Include="Hangfire.Core" Version="1.7.31" />
<PackageReference Include="Hangfire.Dashboard.BasicAuthorization" Version="1.0.2" />
<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.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="NLog" Version="4.7.15" />
<PackageReference Include="NLog.Web.AspNetCore" Version="4.14.0" />
<PackageReference Include="NLog" Version="5.0.5" />
<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="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="ToolGood.Words" Version="3.0.3.1" />
</ItemGroup>

View File

@@ -181,7 +181,7 @@
签到控制器
</summary>
</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>
@@ -255,13 +255,10 @@
优惠券接口
</summary>
</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>
<param name="user"></param>
<param name="couponServices"></param>
<param name="promotionServices"></param>
</member>
<member name="M:CoreCms.Net.Web.WebApi.Controllers.CouponController.CouponList(CoreCms.Net.Model.FromBody.FMCouponForUserCouponPost)">
<summary>
@@ -481,7 +478,7 @@
团购调用接口数据
</summary>
</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>
@@ -528,7 +525,7 @@
订单调用接口数据
</summary>
</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>
@@ -563,6 +560,12 @@
</summary>
<returns></returns>
</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)">
<summary>
获取订单不同状态的数量
@@ -646,7 +649,7 @@
<param name="entity"></param>
<returns></returns>
</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>
@@ -757,7 +760,7 @@
构造函数
</summary>
</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>
@@ -1449,61 +1452,5 @@
</summary>
<returns></returns>
</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>
</doc>

View File

@@ -14,7 +14,7 @@
dbProvider="Microsoft.Data.SqlClient.SqlConnection, Microsoft.Data.SqlClient"
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>
INSERT INTO SysNLogRecords
(LogDate,LogLevel,LogType,LogTitle,Logger,Message,MachineName,MachineIp,NetRequestMethod

View File

@@ -59,9 +59,6 @@ builder.Services.AddAutoMapper(typeof(AutoMapperConfiguration));
//MediatR只需要注册一个,同项目或类库下就不需要注册多个)
builder.Services.AddMediatR(typeof(TextMessageEventCommand).Assembly);
//使用 SignalR
builder.Services.AddSignalR();
//Redis消息队列
builder.Services.AddRedisMessageQueueSetup();
@@ -155,14 +152,10 @@ builder.Host.ConfigureContainer<ContainerBuilder>(containerBuilder =>
#endregion
#region Nlog注册============================================================================
builder.Host.ConfigureLogging(logging =>
{
logging.ClearProviders(); //移除已经注册的其他日志处理程序
logging.SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Trace); //设置最小的日志级别
})
.UseNLog(); //NLog: Setup NLog for Dependency injection
// NLog: Setup NLog for Dependency injection
builder.Logging.ClearProviders();//移除已经注册的其他日志处理程序
builder.Logging.SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Trace); //设置最小的日志级别
builder.Host.UseNLog();
#endregion
@@ -186,8 +179,6 @@ app.UseRequestResponseLog();
app.UseRecordAccessLogsMildd(GlobalEnumVars.CoreShopSystemCategory.Api.ToString());
// 记录ip请求 (注意开启权限,不然本地无法写入)
app.UseIpLogMildd();
// signalr
app.UseSignalRSendMildd();
#endregion
@@ -274,17 +265,9 @@ app.UseAuthentication();
// 然后是授权中间件
app.UseAuthorization();
app.UseEndpoints(endpoints =>
{
endpoints.MapControllerRoute(
"areas",
"{area:exists}/{controller=Default}/{action=Index}/{id?}"
);
endpoints.MapControllerRoute(
"default",
"{controller=Home}/{action=Index}/{id?}");
});
app.MapControllerRoute(
name: "default",
pattern: "{controller=Home}/{action=Index}/{id?}");
//设置默认起始页如default.html

View File

@@ -16,7 +16,7 @@
"AppConfig": {
"AppUrl": "https://admin.test.pro.coreshop.cn/", //后端管理地址
"AppInterFaceUrl": "https://api.test.pro.coreshop.cn/", //接口请求地址
"AppVersion": "CoreShopProfessional v0.6.4"
"AppVersion": "CoreShopProfessional v0.6.5"
},
//redis为必须启动项请保持redis为正常可用
"RedisConfig": {

View File

@@ -31,8 +31,8 @@
<br />
<span class="zhuyi">注意事项:</span><br />
<p>1、以上组件地址支持自定义调整投产环境下请及时修改或屏蔽投产环境下可删除此展示页面。</p>
<p>2、『Swagger接口文档』访问路径修改位置为Startup.cs】文件第206行左右【代码c.RoutePrefix = "doc"】请将doc修改为其他虚拟路径。</p>
<p>3、『HangFire定时任务』面板路径修改位置为Startup.cs】文件第256行左右【代码app.UseHangfireDashboard("/job", options);】请将job修改为其他虚拟路径。</p>
<p>2、『Swagger接口文档』访问路径修改位置为Program.cs】文件第205行左右【代码c.RoutePrefix = "doc"】请将doc修改为其他虚拟路径。</p>
<p>3、『HangFire定时任务』面板路径修改位置为Program.cs】文件第240行左右【代码app.UseHangfireDashboard("/job", hangfireOptions);】请将job修改为其他虚拟路径。</p>
<p>4、『HangFire定时任务』初始登录账号密码均为【CoreShop】修改位置为【appsettings.json】文件代码中【HangFire】节点。</p>
<p>5、如果无法访问接口请检查【1、数据库配置是否正常】【2、Redis是否配置正常并可正常链接使用】【3、Mysql数据库请保持5.7+版本】【4、站点日志文件夹写入权限】。</p>
<p>6、如果第三方请求接口服务获取不到数据Debug提示【Access-Control-Allow-Origin】的错误表示为跨域问题请打开【appsettings.json】文件在【Cors】节点设置请求白名单。</p>