mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2026-03-25 17:37:21 +08:00
### 0.6.0 专业版(大版本升级,破坏性升级,请酌情处理):
【新增】弃用现在sku前端,启用全新sku组件,更加灵活,体验更好。 【新增】新增通过商品序列获取sku全新列表功能。 【新增】仓储层底层增加二级缓存功能,后面将逐步完善底层缓存中心模块。 【新增】0元购,积分兑换模式下,也去计算用户是否科技升级。 【新增】数据及业务仓储增加二级缓存功能。curd可自主控制是否缓存和清除。 【新增】订单导出excel数据增加商品名称+货品sku组合展示的方式。 【新增】自定义交易组件增加【获取商家信息】【更新商家信息】两个接口处理。 【新增】增加公告列表及公告详情页面,首页组件公告点击跳转列表展示。 【新增】个人中心增加【公告中心】入口。 【新增】后台余额变动增加说明录入。 【调整】将前端能进行分包的文件夹都进行分包,减少主包占用,方便进行二开。 【调整】因ckeditor5存在图片不可设置宽度,上传不支持mp4,排版不畅等情况,降级使用ckeditor4版本。 【修复】修复0.5.5版本售后积分返还机制积分模式判断异常的问题。 【修复】修复使用积分全额抵扣,或其他优惠政策导致的0元购,未进行短信提醒及小票打印机未打印的问题。 【修复】修复更换ckeditor4编辑器后接龙添加编辑调用失败的问题。 【修复】修复积分全额抵扣,金额0元购的情况下,进行售后执行完毕,订单未完结的情况。 【优化】去除分销申请面板按钮无用并失效报错的customStyle属性。 【优化】优化部分方法中使用手写字符串的遗留问题,统一采用enum方式。 【优化】优化前端及接口部分命名错误的问题。错将skill误写成seckill。 【优化】去除uniapp端多个客服代码。 【优化】商品详情底部完善购物车数量显示的问题。 【优化】优化团购列表,拼团列表,秒杀页面页面样式布局差异问题。 【优化】调整支付结果界面样式效果,仿微信支付结果界面。更加清晰明朗。 【优化】优化售后提交页面json计算,开放当用户下单后但未发货情况下,可以申请直接售后的操作需求。 【优化】后台商家手机号码支持设置多个,使用小写逗号分隔,方便多个商家管理员接收下单提醒。 【优化】后台售后单审核,调整售后商品为必选项。
This commit is contained in:
@@ -18,6 +18,7 @@ using AutoMapper;
|
||||
using CoreCms.Net.Configuration;
|
||||
using CoreCms.Net.IServices;
|
||||
using CoreCms.Net.Loging;
|
||||
using CoreCms.Net.Model.ViewModels.Basics;
|
||||
using CoreCms.Net.Model.ViewModels.UI;
|
||||
using CoreCms.Net.Utility.Helper;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
@@ -71,7 +72,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
||||
{
|
||||
code = 0,
|
||||
data = _mapper
|
||||
.Map<List<SqlSugar.DbTableInfo>, List<CoreCms.Net.Model.ViewModels.Basics.DbTableInfoTree>>(tables)
|
||||
.Map<List<SqlSugar.DbTableInfo>, List<DbTableInfoTree>>(tables)
|
||||
};
|
||||
return jm;
|
||||
}
|
||||
@@ -84,7 +85,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[Description("生成代码")]
|
||||
public ActionResult CodeGenDown([FromQuery] string tableName, [FromQuery] string fileType)
|
||||
public IActionResult CodeGenDown([FromQuery] string tableName, [FromQuery] string fileType)
|
||||
{
|
||||
var jm = new AdminUiCallBack();
|
||||
if (string.IsNullOrEmpty(tableName))
|
||||
|
||||
@@ -19,10 +19,10 @@ using CoreCms.Net.Configuration;
|
||||
using CoreCms.Net.Model.Entities;
|
||||
using CoreCms.Net.Model.Entities.Expression;
|
||||
using CoreCms.Net.Model.FromBody;
|
||||
using CoreCms.Net.Model.ViewModels.UI;
|
||||
using CoreCms.Net.Filter;
|
||||
using CoreCms.Net.Loging;
|
||||
using CoreCms.Net.IServices;
|
||||
using CoreCms.Net.Model.ViewModels.UI;
|
||||
using CoreCms.Net.Utility.Helper;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
@@ -212,15 +212,8 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
||||
var jm = new AdminUiCallBack();
|
||||
|
||||
jm = await _sysMenuServices.DeleteByIdAsync(entity.id);
|
||||
|
||||
|
||||
|
||||
|
||||
return jm;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -265,13 +258,10 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
||||
});
|
||||
}
|
||||
|
||||
var bl = await _sysMenuServices.InsertAsync(list) > 0;
|
||||
var bl = await _sysMenuServices.InsertAsync(list, true) > 0;
|
||||
jm.code = bl ? 0 : 1;
|
||||
jm.msg = bl ? GlobalConstVars.DeleteSuccess : GlobalConstVars.DeleteFailure;
|
||||
if (bl)
|
||||
{
|
||||
await _sysMenuServices.UpdateCaChe();
|
||||
}
|
||||
|
||||
return jm;
|
||||
|
||||
}
|
||||
|
||||
@@ -191,6 +191,13 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
||||
var NetUserIdentity = Request.Form["NetUserIdentity"].FirstOrDefault();
|
||||
if (!string.IsNullOrEmpty(NetUserIdentity))
|
||||
@where = @where.And(p => p.NetUserIdentity.Contains(NetUserIdentity));
|
||||
|
||||
//身份认证 nvarchar
|
||||
var logTitle = Request.Form["logTitle"].FirstOrDefault();
|
||||
if (!string.IsNullOrEmpty(logTitle))
|
||||
@where = @where.And(p => p.LogTitle.Contains(logTitle));
|
||||
|
||||
|
||||
//异常信息 nvarchar
|
||||
var Exception = Request.Form["Exception"].FirstOrDefault();
|
||||
if (!string.IsNullOrEmpty(Exception)) @where = @where.And(p => p.Exception.Contains(Exception));
|
||||
@@ -519,6 +526,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 清空数据============================================================
|
||||
|
||||
// POST: Api/SysNLogRecords/DoBatchDelete/10,11,20
|
||||
@@ -541,5 +549,6 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -18,10 +18,10 @@ using CoreCms.Net.Configuration;
|
||||
using CoreCms.Net.Model.Entities;
|
||||
using CoreCms.Net.Model.Entities.Expression;
|
||||
using CoreCms.Net.Model.FromBody;
|
||||
using CoreCms.Net.Model.ViewModels.UI;
|
||||
using CoreCms.Net.Filter;
|
||||
using CoreCms.Net.Loging;
|
||||
using CoreCms.Net.IServices;
|
||||
using CoreCms.Net.Model.ViewModels.UI;
|
||||
using CoreCms.Net.Utility.Helper;
|
||||
using CoreCms.Net.Utility.Extensions;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
@@ -43,22 +43,22 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
||||
public class SysOperRecordController : ControllerBase
|
||||
{
|
||||
private readonly IWebHostEnvironment _webHostEnvironment;
|
||||
private readonly ISysOperRecordServices _sysOperRecordServices;
|
||||
private readonly ISysOperRecordServices _SysOperRecordServices;
|
||||
|
||||
/// <summary>
|
||||
/// 构造函数
|
||||
///</summary>
|
||||
public SysOperRecordController(IWebHostEnvironment webHostEnvironment
|
||||
,ISysOperRecordServices sysOperRecordServices
|
||||
, ISysOperRecordServices SysOperRecordServices
|
||||
)
|
||||
{
|
||||
_webHostEnvironment = webHostEnvironment;
|
||||
_sysOperRecordServices = sysOperRecordServices;
|
||||
_SysOperRecordServices = SysOperRecordServices;
|
||||
}
|
||||
|
||||
#region 获取列表============================================================
|
||||
// POST: Api/SysOperRecord/GetPageList
|
||||
/// <summary>
|
||||
/// <summary>
|
||||
/// 获取列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
@@ -75,7 +75,20 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
||||
|
||||
Expression<Func<SysOperRecord, object>> orderEx = orderField switch
|
||||
{
|
||||
"id" => p => p.id,"userId" => p => p.userId,"userName" => p => p.userName,"model" => p => p.model,"description" => p => p.description,"url" => p => p.url,"requestMethod" => p => p.requestMethod,"operMethod" => p => p.operMethod,"param" => p => p.param,"result" => p => p.result,"ip" => p => p.ip,"spendTime" => p => p.spendTime,"state" => p => p.state,"createTime" => p => p.createTime,
|
||||
"id" => p => p.id,
|
||||
"userId" => p => p.userId,
|
||||
"userName" => p => p.userName,
|
||||
"model" => p => p.model,
|
||||
"description" => p => p.description,
|
||||
"url" => p => p.url,
|
||||
"requestMethod" => p => p.requestMethod,
|
||||
"operMethod" => p => p.operMethod,
|
||||
"param" => p => p.param,
|
||||
"result" => p => p.result,
|
||||
"ip" => p => p.ip,
|
||||
"spendTime" => p => p.spendTime,
|
||||
"state" => p => p.state,
|
||||
"createTime" => p => p.createTime,
|
||||
_ => p => p.id
|
||||
};
|
||||
|
||||
@@ -88,87 +101,87 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
||||
_ => OrderByType.Desc
|
||||
};
|
||||
//查询筛选
|
||||
|
||||
//主键 int
|
||||
var id = Request.Form["id"].FirstOrDefault().ObjectToInt(0);
|
||||
|
||||
//主键 int
|
||||
var id = Request.Form["id"].FirstOrDefault().ObjectToInt(0);
|
||||
if (id > 0)
|
||||
{
|
||||
where = where.And(p => p.id == id);
|
||||
}
|
||||
//用户id int
|
||||
var userId = Request.Form["userId"].FirstOrDefault().ObjectToInt(0);
|
||||
//用户id int
|
||||
var userId = Request.Form["userId"].FirstOrDefault().ObjectToInt(0);
|
||||
if (userId > 0)
|
||||
{
|
||||
where = where.And(p => p.userId == userId);
|
||||
}
|
||||
//用户名 nvarchar
|
||||
var userName = Request.Form["userName"].FirstOrDefault();
|
||||
//用户名 nvarchar
|
||||
var userName = Request.Form["userName"].FirstOrDefault();
|
||||
if (!string.IsNullOrEmpty(userName))
|
||||
{
|
||||
where = where.And(p => p.userName.Contains(userName));
|
||||
}
|
||||
//操作模块 nvarchar
|
||||
var model = Request.Form["model"].FirstOrDefault();
|
||||
//操作模块 nvarchar
|
||||
var model = Request.Form["model"].FirstOrDefault();
|
||||
if (!string.IsNullOrEmpty(model))
|
||||
{
|
||||
where = where.And(p => p.model.Contains(model));
|
||||
}
|
||||
//操作方法 nvarchar
|
||||
var description = Request.Form["description"].FirstOrDefault();
|
||||
//操作方法 nvarchar
|
||||
var description = Request.Form["description"].FirstOrDefault();
|
||||
if (!string.IsNullOrEmpty(description))
|
||||
{
|
||||
where = where.And(p => p.description.Contains(description));
|
||||
}
|
||||
//请求地址 nvarchar
|
||||
var url = Request.Form["url"].FirstOrDefault();
|
||||
//请求地址 nvarchar
|
||||
var url = Request.Form["url"].FirstOrDefault();
|
||||
if (!string.IsNullOrEmpty(url))
|
||||
{
|
||||
where = where.And(p => p.url.Contains(url));
|
||||
}
|
||||
//请求方式 nvarchar
|
||||
var requestMethod = Request.Form["requestMethod"].FirstOrDefault();
|
||||
//请求方式 nvarchar
|
||||
var requestMethod = Request.Form["requestMethod"].FirstOrDefault();
|
||||
if (!string.IsNullOrEmpty(requestMethod))
|
||||
{
|
||||
where = where.And(p => p.requestMethod.Contains(requestMethod));
|
||||
}
|
||||
//调用方法 nvarchar
|
||||
var operMethod = Request.Form["operMethod"].FirstOrDefault();
|
||||
//调用方法 nvarchar
|
||||
var operMethod = Request.Form["operMethod"].FirstOrDefault();
|
||||
if (!string.IsNullOrEmpty(operMethod))
|
||||
{
|
||||
where = where.And(p => p.operMethod.Contains(operMethod));
|
||||
}
|
||||
//请求参数 nvarchar
|
||||
var param = Request.Form["param"].FirstOrDefault();
|
||||
//请求参数 nvarchar
|
||||
var param = Request.Form["param"].FirstOrDefault();
|
||||
if (!string.IsNullOrEmpty(param))
|
||||
{
|
||||
where = where.And(p => p.param.Contains(param));
|
||||
}
|
||||
//返回结果 nvarchar
|
||||
var result = Request.Form["result"].FirstOrDefault();
|
||||
//返回结果 nvarchar
|
||||
var result = Request.Form["result"].FirstOrDefault();
|
||||
if (!string.IsNullOrEmpty(result))
|
||||
{
|
||||
where = where.And(p => p.result.Contains(result));
|
||||
}
|
||||
//ip地址 nvarchar
|
||||
var ip = Request.Form["ip"].FirstOrDefault();
|
||||
//ip地址 nvarchar
|
||||
var ip = Request.Form["ip"].FirstOrDefault();
|
||||
if (!string.IsNullOrEmpty(ip))
|
||||
{
|
||||
where = where.And(p => p.ip.Contains(ip));
|
||||
}
|
||||
//请求耗时,单位毫秒 nvarchar
|
||||
var spendTime = Request.Form["spendTime"].FirstOrDefault();
|
||||
//请求耗时,单位毫秒 nvarchar
|
||||
var spendTime = Request.Form["spendTime"].FirstOrDefault();
|
||||
if (!string.IsNullOrEmpty(spendTime))
|
||||
{
|
||||
where = where.And(p => p.spendTime.Contains(spendTime));
|
||||
}
|
||||
//状态,0成功,1异常 int
|
||||
var state = Request.Form["state"].FirstOrDefault().ObjectToInt(0);
|
||||
//状态,0成功,1异常 int
|
||||
var state = Request.Form["state"].FirstOrDefault().ObjectToInt(0);
|
||||
if (state > 0)
|
||||
{
|
||||
where = where.And(p => p.state == state);
|
||||
}
|
||||
//登录时间 datetime
|
||||
var createTime = Request.Form["createTime"].FirstOrDefault();
|
||||
//登录时间 datetime
|
||||
var createTime = Request.Form["createTime"].FirstOrDefault();
|
||||
if (!string.IsNullOrEmpty(createTime))
|
||||
{
|
||||
if (createTime.Contains("到"))
|
||||
@@ -186,7 +199,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
||||
}
|
||||
}
|
||||
//获取数据
|
||||
var list = await _sysOperRecordServices.QueryPageAsync(where, orderEx, orderBy, pageCurrent, pageSize, true);
|
||||
var list = await _SysOperRecordServices.QueryPageAsync(where, orderEx, orderBy, pageCurrent, pageSize, true);
|
||||
//返回数据
|
||||
jm.data = list;
|
||||
jm.code = 0;
|
||||
@@ -212,22 +225,6 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 创建数据============================================================
|
||||
// POST: Api/SysOperRecord/GetCreate
|
||||
/// <summary>
|
||||
/// 创建数据
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[Description("创建数据")]
|
||||
public AdminUiCallBack GetCreate()
|
||||
{
|
||||
//返回数据
|
||||
var jm = new AdminUiCallBack { code = 0 };
|
||||
return jm;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 预览数据============================================================
|
||||
// POST: Api/SysOperRecord/GetDetails/10
|
||||
/// <summary>
|
||||
@@ -237,11 +234,11 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[Description("预览数据")]
|
||||
public async Task<AdminUiCallBack> GetDetails([FromBody]FMIntId entity)
|
||||
public async Task<AdminUiCallBack> GetDetails([FromBody] FMIntId entity)
|
||||
{
|
||||
var jm = new AdminUiCallBack();
|
||||
|
||||
var model = await _sysOperRecordServices.QueryByIdAsync(entity.id, false);
|
||||
var model = await _SysOperRecordServices.QueryByIdAsync(entity.id, false);
|
||||
if (model == null)
|
||||
{
|
||||
jm.msg = "不存在此信息";
|
||||
@@ -263,7 +260,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[Description("选择导出")]
|
||||
public async Task<AdminUiCallBack> SelectExportExcel([FromBody]FMArrayIntIds entity)
|
||||
public async Task<AdminUiCallBack> SelectExportExcel([FromBody] FMArrayIntIds entity)
|
||||
{
|
||||
var jm = new AdminUiCallBack();
|
||||
|
||||
@@ -272,7 +269,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
||||
//添加一个sheet
|
||||
var mySheet = book.CreateSheet("Sheet1");
|
||||
//获取list数据
|
||||
var listModel = await _sysOperRecordServices.QueryListByClauseAsync(p => entity.id.Contains(p.id), p => p.id, OrderByType.Asc, true);
|
||||
var listModel = await _SysOperRecordServices.QueryListByClauseAsync(p => entity.id.Contains(p.id), p => p.id, OrderByType.Asc, true);
|
||||
//给sheet1添加第一行的头部标题
|
||||
var headerRow = mySheet.CreateRow(0);
|
||||
var headerStyle = ExcelHelper.GetHeaderStyle(book);
|
||||
@@ -355,61 +352,61 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
||||
{
|
||||
var rowTemp = mySheet.CreateRow(i + 1);
|
||||
|
||||
var rowTemp0 = rowTemp.CreateCell(0);
|
||||
rowTemp0.SetCellValue(listModel[i].id.ToString());
|
||||
rowTemp0.CellStyle = commonCellStyle;
|
||||
var rowTemp0 = rowTemp.CreateCell(0);
|
||||
rowTemp0.SetCellValue(listModel[i].id.ToString());
|
||||
rowTemp0.CellStyle = commonCellStyle;
|
||||
|
||||
var rowTemp1 = rowTemp.CreateCell(1);
|
||||
rowTemp1.SetCellValue(listModel[i].userId.ToString());
|
||||
rowTemp1.CellStyle = commonCellStyle;
|
||||
var rowTemp1 = rowTemp.CreateCell(1);
|
||||
rowTemp1.SetCellValue(listModel[i].userId.ToString());
|
||||
rowTemp1.CellStyle = commonCellStyle;
|
||||
|
||||
var rowTemp2 = rowTemp.CreateCell(2);
|
||||
rowTemp2.SetCellValue(listModel[i].userName.ToString());
|
||||
rowTemp2.CellStyle = commonCellStyle;
|
||||
var rowTemp2 = rowTemp.CreateCell(2);
|
||||
rowTemp2.SetCellValue(listModel[i].userName.ToString());
|
||||
rowTemp2.CellStyle = commonCellStyle;
|
||||
|
||||
var rowTemp3 = rowTemp.CreateCell(3);
|
||||
rowTemp3.SetCellValue(listModel[i].model.ToString());
|
||||
rowTemp3.CellStyle = commonCellStyle;
|
||||
var rowTemp3 = rowTemp.CreateCell(3);
|
||||
rowTemp3.SetCellValue(listModel[i].model.ToString());
|
||||
rowTemp3.CellStyle = commonCellStyle;
|
||||
|
||||
var rowTemp4 = rowTemp.CreateCell(4);
|
||||
rowTemp4.SetCellValue(listModel[i].description.ToString());
|
||||
rowTemp4.CellStyle = commonCellStyle;
|
||||
var rowTemp4 = rowTemp.CreateCell(4);
|
||||
rowTemp4.SetCellValue(listModel[i].description.ToString());
|
||||
rowTemp4.CellStyle = commonCellStyle;
|
||||
|
||||
var rowTemp5 = rowTemp.CreateCell(5);
|
||||
rowTemp5.SetCellValue(listModel[i].url.ToString());
|
||||
rowTemp5.CellStyle = commonCellStyle;
|
||||
var rowTemp5 = rowTemp.CreateCell(5);
|
||||
rowTemp5.SetCellValue(listModel[i].url.ToString());
|
||||
rowTemp5.CellStyle = commonCellStyle;
|
||||
|
||||
var rowTemp6 = rowTemp.CreateCell(6);
|
||||
rowTemp6.SetCellValue(listModel[i].requestMethod.ToString());
|
||||
rowTemp6.CellStyle = commonCellStyle;
|
||||
var rowTemp6 = rowTemp.CreateCell(6);
|
||||
rowTemp6.SetCellValue(listModel[i].requestMethod.ToString());
|
||||
rowTemp6.CellStyle = commonCellStyle;
|
||||
|
||||
var rowTemp7 = rowTemp.CreateCell(7);
|
||||
rowTemp7.SetCellValue(listModel[i].operMethod.ToString());
|
||||
rowTemp7.CellStyle = commonCellStyle;
|
||||
var rowTemp7 = rowTemp.CreateCell(7);
|
||||
rowTemp7.SetCellValue(listModel[i].operMethod.ToString());
|
||||
rowTemp7.CellStyle = commonCellStyle;
|
||||
|
||||
var rowTemp8 = rowTemp.CreateCell(8);
|
||||
rowTemp8.SetCellValue(listModel[i].param.ToString());
|
||||
rowTemp8.CellStyle = commonCellStyle;
|
||||
var rowTemp8 = rowTemp.CreateCell(8);
|
||||
rowTemp8.SetCellValue(listModel[i].param.ToString());
|
||||
rowTemp8.CellStyle = commonCellStyle;
|
||||
|
||||
var rowTemp9 = rowTemp.CreateCell(9);
|
||||
rowTemp9.SetCellValue(listModel[i].result.ToString());
|
||||
rowTemp9.CellStyle = commonCellStyle;
|
||||
var rowTemp9 = rowTemp.CreateCell(9);
|
||||
rowTemp9.SetCellValue(listModel[i].result.ToString());
|
||||
rowTemp9.CellStyle = commonCellStyle;
|
||||
|
||||
var rowTemp10 = rowTemp.CreateCell(10);
|
||||
rowTemp10.SetCellValue(listModel[i].ip.ToString());
|
||||
rowTemp10.CellStyle = commonCellStyle;
|
||||
var rowTemp10 = rowTemp.CreateCell(10);
|
||||
rowTemp10.SetCellValue(listModel[i].ip.ToString());
|
||||
rowTemp10.CellStyle = commonCellStyle;
|
||||
|
||||
var rowTemp11 = rowTemp.CreateCell(11);
|
||||
rowTemp11.SetCellValue(listModel[i].spendTime.ToString());
|
||||
rowTemp11.CellStyle = commonCellStyle;
|
||||
var rowTemp11 = rowTemp.CreateCell(11);
|
||||
rowTemp11.SetCellValue(listModel[i].spendTime.ToString());
|
||||
rowTemp11.CellStyle = commonCellStyle;
|
||||
|
||||
var rowTemp12 = rowTemp.CreateCell(12);
|
||||
rowTemp12.SetCellValue(listModel[i].state.ToString());
|
||||
rowTemp12.CellStyle = commonCellStyle;
|
||||
var rowTemp12 = rowTemp.CreateCell(12);
|
||||
rowTemp12.SetCellValue(listModel[i].state.ToString());
|
||||
rowTemp12.CellStyle = commonCellStyle;
|
||||
|
||||
var rowTemp13 = rowTemp.CreateCell(13);
|
||||
rowTemp13.SetCellValue(listModel[i].createTime.ToString());
|
||||
rowTemp13.CellStyle = commonCellStyle;
|
||||
var rowTemp13 = rowTemp.CreateCell(13);
|
||||
rowTemp13.SetCellValue(listModel[i].createTime.ToString());
|
||||
rowTemp13.CellStyle = commonCellStyle;
|
||||
|
||||
}
|
||||
// 导出excel
|
||||
@@ -447,88 +444,88 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
||||
var jm = new AdminUiCallBack();
|
||||
|
||||
var where = PredicateBuilder.True<SysOperRecord>();
|
||||
//查询筛选
|
||||
|
||||
//主键 int
|
||||
var id = Request.Form["id"].FirstOrDefault().ObjectToInt(0);
|
||||
//查询筛选
|
||||
|
||||
//主键 int
|
||||
var id = Request.Form["id"].FirstOrDefault().ObjectToInt(0);
|
||||
if (id > 0)
|
||||
{
|
||||
where = where.And(p => p.id == id);
|
||||
}
|
||||
//用户id int
|
||||
var userId = Request.Form["userId"].FirstOrDefault().ObjectToInt(0);
|
||||
//用户id int
|
||||
var userId = Request.Form["userId"].FirstOrDefault().ObjectToInt(0);
|
||||
if (userId > 0)
|
||||
{
|
||||
where = where.And(p => p.userId == userId);
|
||||
}
|
||||
//用户名 nvarchar
|
||||
var userName = Request.Form["userName"].FirstOrDefault();
|
||||
//用户名 nvarchar
|
||||
var userName = Request.Form["userName"].FirstOrDefault();
|
||||
if (!string.IsNullOrEmpty(userName))
|
||||
{
|
||||
where = where.And(p => p.userName.Contains(userName));
|
||||
}
|
||||
//操作模块 nvarchar
|
||||
var model = Request.Form["model"].FirstOrDefault();
|
||||
//操作模块 nvarchar
|
||||
var model = Request.Form["model"].FirstOrDefault();
|
||||
if (!string.IsNullOrEmpty(model))
|
||||
{
|
||||
where = where.And(p => p.model.Contains(model));
|
||||
}
|
||||
//操作方法 nvarchar
|
||||
var description = Request.Form["description"].FirstOrDefault();
|
||||
//操作方法 nvarchar
|
||||
var description = Request.Form["description"].FirstOrDefault();
|
||||
if (!string.IsNullOrEmpty(description))
|
||||
{
|
||||
where = where.And(p => p.description.Contains(description));
|
||||
}
|
||||
//请求地址 nvarchar
|
||||
var url = Request.Form["url"].FirstOrDefault();
|
||||
//请求地址 nvarchar
|
||||
var url = Request.Form["url"].FirstOrDefault();
|
||||
if (!string.IsNullOrEmpty(url))
|
||||
{
|
||||
where = where.And(p => p.url.Contains(url));
|
||||
}
|
||||
//请求方式 nvarchar
|
||||
var requestMethod = Request.Form["requestMethod"].FirstOrDefault();
|
||||
//请求方式 nvarchar
|
||||
var requestMethod = Request.Form["requestMethod"].FirstOrDefault();
|
||||
if (!string.IsNullOrEmpty(requestMethod))
|
||||
{
|
||||
where = where.And(p => p.requestMethod.Contains(requestMethod));
|
||||
}
|
||||
//调用方法 nvarchar
|
||||
var operMethod = Request.Form["operMethod"].FirstOrDefault();
|
||||
//调用方法 nvarchar
|
||||
var operMethod = Request.Form["operMethod"].FirstOrDefault();
|
||||
if (!string.IsNullOrEmpty(operMethod))
|
||||
{
|
||||
where = where.And(p => p.operMethod.Contains(operMethod));
|
||||
}
|
||||
//请求参数 nvarchar
|
||||
var param = Request.Form["param"].FirstOrDefault();
|
||||
//请求参数 nvarchar
|
||||
var param = Request.Form["param"].FirstOrDefault();
|
||||
if (!string.IsNullOrEmpty(param))
|
||||
{
|
||||
where = where.And(p => p.param.Contains(param));
|
||||
}
|
||||
//返回结果 nvarchar
|
||||
var result = Request.Form["result"].FirstOrDefault();
|
||||
//返回结果 nvarchar
|
||||
var result = Request.Form["result"].FirstOrDefault();
|
||||
if (!string.IsNullOrEmpty(result))
|
||||
{
|
||||
where = where.And(p => p.result.Contains(result));
|
||||
}
|
||||
//ip地址 nvarchar
|
||||
var ip = Request.Form["ip"].FirstOrDefault();
|
||||
//ip地址 nvarchar
|
||||
var ip = Request.Form["ip"].FirstOrDefault();
|
||||
if (!string.IsNullOrEmpty(ip))
|
||||
{
|
||||
where = where.And(p => p.ip.Contains(ip));
|
||||
}
|
||||
//请求耗时,单位毫秒 nvarchar
|
||||
var spendTime = Request.Form["spendTime"].FirstOrDefault();
|
||||
//请求耗时,单位毫秒 nvarchar
|
||||
var spendTime = Request.Form["spendTime"].FirstOrDefault();
|
||||
if (!string.IsNullOrEmpty(spendTime))
|
||||
{
|
||||
where = where.And(p => p.spendTime.Contains(spendTime));
|
||||
}
|
||||
//状态,0成功,1异常 int
|
||||
var state = Request.Form["state"].FirstOrDefault().ObjectToInt(0);
|
||||
//状态,0成功,1异常 int
|
||||
var state = Request.Form["state"].FirstOrDefault().ObjectToInt(0);
|
||||
if (state > 0)
|
||||
{
|
||||
where = where.And(p => p.state == state);
|
||||
}
|
||||
//登录时间 datetime
|
||||
var createTime = Request.Form["createTime"].FirstOrDefault();
|
||||
//登录时间 datetime
|
||||
var createTime = Request.Form["createTime"].FirstOrDefault();
|
||||
if (!string.IsNullOrEmpty(createTime))
|
||||
{
|
||||
var dt = createTime.ObjectToDate();
|
||||
@@ -540,81 +537,81 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
||||
//添加一个sheet
|
||||
var mySheet = book.CreateSheet("Sheet1");
|
||||
//获取list数据
|
||||
var listModel = await _sysOperRecordServices.QueryListByClauseAsync(where, p => p.id, OrderByType.Asc, true);
|
||||
var listModel = await _SysOperRecordServices.QueryListByClauseAsync(where, p => p.id, OrderByType.Asc, true);
|
||||
//给sheet1添加第一行的头部标题
|
||||
var headerRow = mySheet.CreateRow(0);
|
||||
var headerRow = mySheet.CreateRow(0);
|
||||
var headerStyle = ExcelHelper.GetHeaderStyle(book);
|
||||
|
||||
|
||||
var cell0 = headerRow.CreateCell(0);
|
||||
cell0.SetCellValue("主键");
|
||||
cell0.CellStyle = headerStyle;
|
||||
mySheet.SetColumnWidth(0, 10 * 256);
|
||||
|
||||
|
||||
var cell1 = headerRow.CreateCell(1);
|
||||
cell1.SetCellValue("用户id");
|
||||
cell1.CellStyle = headerStyle;
|
||||
mySheet.SetColumnWidth(1, 10 * 256);
|
||||
|
||||
|
||||
var cell2 = headerRow.CreateCell(2);
|
||||
cell2.SetCellValue("用户名");
|
||||
cell2.CellStyle = headerStyle;
|
||||
mySheet.SetColumnWidth(2, 10 * 256);
|
||||
|
||||
|
||||
var cell3 = headerRow.CreateCell(3);
|
||||
cell3.SetCellValue("操作模块");
|
||||
cell3.CellStyle = headerStyle;
|
||||
mySheet.SetColumnWidth(3, 10 * 256);
|
||||
|
||||
|
||||
var cell4 = headerRow.CreateCell(4);
|
||||
cell4.SetCellValue("操作方法");
|
||||
cell4.CellStyle = headerStyle;
|
||||
mySheet.SetColumnWidth(4, 10 * 256);
|
||||
|
||||
|
||||
var cell5 = headerRow.CreateCell(5);
|
||||
cell5.SetCellValue("请求地址");
|
||||
cell5.CellStyle = headerStyle;
|
||||
mySheet.SetColumnWidth(5, 10 * 256);
|
||||
|
||||
|
||||
var cell6 = headerRow.CreateCell(6);
|
||||
cell6.SetCellValue("请求方式");
|
||||
cell6.CellStyle = headerStyle;
|
||||
mySheet.SetColumnWidth(6, 10 * 256);
|
||||
|
||||
|
||||
var cell7 = headerRow.CreateCell(7);
|
||||
cell7.SetCellValue("调用方法");
|
||||
cell7.CellStyle = headerStyle;
|
||||
mySheet.SetColumnWidth(7, 10 * 256);
|
||||
|
||||
|
||||
var cell8 = headerRow.CreateCell(8);
|
||||
cell8.SetCellValue("请求参数");
|
||||
cell8.CellStyle = headerStyle;
|
||||
mySheet.SetColumnWidth(8, 10 * 256);
|
||||
|
||||
|
||||
var cell9 = headerRow.CreateCell(9);
|
||||
cell9.SetCellValue("返回结果");
|
||||
cell9.CellStyle = headerStyle;
|
||||
mySheet.SetColumnWidth(9, 10 * 256);
|
||||
|
||||
|
||||
var cell10 = headerRow.CreateCell(10);
|
||||
cell10.SetCellValue("ip地址");
|
||||
cell10.CellStyle = headerStyle;
|
||||
mySheet.SetColumnWidth(10, 10 * 256);
|
||||
|
||||
|
||||
var cell11 = headerRow.CreateCell(11);
|
||||
cell11.SetCellValue("请求耗时,单位毫秒");
|
||||
cell11.CellStyle = headerStyle;
|
||||
mySheet.SetColumnWidth(11, 10 * 256);
|
||||
|
||||
|
||||
var cell12 = headerRow.CreateCell(12);
|
||||
cell12.SetCellValue("状态,0成功,1异常");
|
||||
cell12.CellStyle = headerStyle;
|
||||
mySheet.SetColumnWidth(12, 10 * 256);
|
||||
|
||||
|
||||
var cell13 = headerRow.CreateCell(13);
|
||||
cell13.SetCellValue("登录时间");
|
||||
cell13.CellStyle = headerStyle;
|
||||
mySheet.SetColumnWidth(13, 10 * 256);
|
||||
|
||||
|
||||
|
||||
headerRow.Height = 30 * 20;
|
||||
var commonCellStyle = ExcelHelper.GetCommonStyle(book);
|
||||
@@ -625,87 +622,87 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
||||
var rowTemp = mySheet.CreateRow(i + 1);
|
||||
|
||||
|
||||
var rowTemp0 = rowTemp.CreateCell(0);
|
||||
rowTemp0.SetCellValue(listModel[i].id.ToString());
|
||||
rowTemp0.CellStyle = commonCellStyle;
|
||||
var rowTemp0 = rowTemp.CreateCell(0);
|
||||
rowTemp0.SetCellValue(listModel[i].id.ToString());
|
||||
rowTemp0.CellStyle = commonCellStyle;
|
||||
|
||||
|
||||
|
||||
var rowTemp1 = rowTemp.CreateCell(1);
|
||||
rowTemp1.SetCellValue(listModel[i].userId.ToString());
|
||||
rowTemp1.CellStyle = commonCellStyle;
|
||||
var rowTemp1 = rowTemp.CreateCell(1);
|
||||
rowTemp1.SetCellValue(listModel[i].userId.ToString());
|
||||
rowTemp1.CellStyle = commonCellStyle;
|
||||
|
||||
|
||||
|
||||
var rowTemp2 = rowTemp.CreateCell(2);
|
||||
rowTemp2.SetCellValue(listModel[i].userName.ToString());
|
||||
rowTemp2.CellStyle = commonCellStyle;
|
||||
var rowTemp2 = rowTemp.CreateCell(2);
|
||||
rowTemp2.SetCellValue(listModel[i].userName.ToString());
|
||||
rowTemp2.CellStyle = commonCellStyle;
|
||||
|
||||
|
||||
|
||||
var rowTemp3 = rowTemp.CreateCell(3);
|
||||
rowTemp3.SetCellValue(listModel[i].model.ToString());
|
||||
rowTemp3.CellStyle = commonCellStyle;
|
||||
var rowTemp3 = rowTemp.CreateCell(3);
|
||||
rowTemp3.SetCellValue(listModel[i].model.ToString());
|
||||
rowTemp3.CellStyle = commonCellStyle;
|
||||
|
||||
|
||||
|
||||
var rowTemp4 = rowTemp.CreateCell(4);
|
||||
rowTemp4.SetCellValue(listModel[i].description.ToString());
|
||||
rowTemp4.CellStyle = commonCellStyle;
|
||||
var rowTemp4 = rowTemp.CreateCell(4);
|
||||
rowTemp4.SetCellValue(listModel[i].description.ToString());
|
||||
rowTemp4.CellStyle = commonCellStyle;
|
||||
|
||||
|
||||
|
||||
var rowTemp5 = rowTemp.CreateCell(5);
|
||||
rowTemp5.SetCellValue(listModel[i].url.ToString());
|
||||
rowTemp5.CellStyle = commonCellStyle;
|
||||
var rowTemp5 = rowTemp.CreateCell(5);
|
||||
rowTemp5.SetCellValue(listModel[i].url.ToString());
|
||||
rowTemp5.CellStyle = commonCellStyle;
|
||||
|
||||
|
||||
|
||||
var rowTemp6 = rowTemp.CreateCell(6);
|
||||
rowTemp6.SetCellValue(listModel[i].requestMethod.ToString());
|
||||
rowTemp6.CellStyle = commonCellStyle;
|
||||
var rowTemp6 = rowTemp.CreateCell(6);
|
||||
rowTemp6.SetCellValue(listModel[i].requestMethod.ToString());
|
||||
rowTemp6.CellStyle = commonCellStyle;
|
||||
|
||||
|
||||
|
||||
var rowTemp7 = rowTemp.CreateCell(7);
|
||||
rowTemp7.SetCellValue(listModel[i].operMethod.ToString());
|
||||
rowTemp7.CellStyle = commonCellStyle;
|
||||
var rowTemp7 = rowTemp.CreateCell(7);
|
||||
rowTemp7.SetCellValue(listModel[i].operMethod.ToString());
|
||||
rowTemp7.CellStyle = commonCellStyle;
|
||||
|
||||
|
||||
|
||||
var rowTemp8 = rowTemp.CreateCell(8);
|
||||
rowTemp8.SetCellValue(listModel[i].param.ToString());
|
||||
rowTemp8.CellStyle = commonCellStyle;
|
||||
var rowTemp8 = rowTemp.CreateCell(8);
|
||||
rowTemp8.SetCellValue(listModel[i].param.ToString());
|
||||
rowTemp8.CellStyle = commonCellStyle;
|
||||
|
||||
|
||||
|
||||
var rowTemp9 = rowTemp.CreateCell(9);
|
||||
rowTemp9.SetCellValue(listModel[i].result.ToString());
|
||||
rowTemp9.CellStyle = commonCellStyle;
|
||||
var rowTemp9 = rowTemp.CreateCell(9);
|
||||
rowTemp9.SetCellValue(listModel[i].result.ToString());
|
||||
rowTemp9.CellStyle = commonCellStyle;
|
||||
|
||||
|
||||
|
||||
var rowTemp10 = rowTemp.CreateCell(10);
|
||||
rowTemp10.SetCellValue(listModel[i].ip.ToString());
|
||||
rowTemp10.CellStyle = commonCellStyle;
|
||||
var rowTemp10 = rowTemp.CreateCell(10);
|
||||
rowTemp10.SetCellValue(listModel[i].ip.ToString());
|
||||
rowTemp10.CellStyle = commonCellStyle;
|
||||
|
||||
|
||||
|
||||
var rowTemp11 = rowTemp.CreateCell(11);
|
||||
rowTemp11.SetCellValue(listModel[i].spendTime.ToString());
|
||||
rowTemp11.CellStyle = commonCellStyle;
|
||||
var rowTemp11 = rowTemp.CreateCell(11);
|
||||
rowTemp11.SetCellValue(listModel[i].spendTime.ToString());
|
||||
rowTemp11.CellStyle = commonCellStyle;
|
||||
|
||||
|
||||
|
||||
var rowTemp12 = rowTemp.CreateCell(12);
|
||||
rowTemp12.SetCellValue(listModel[i].state.ToString());
|
||||
rowTemp12.CellStyle = commonCellStyle;
|
||||
var rowTemp12 = rowTemp.CreateCell(12);
|
||||
rowTemp12.SetCellValue(listModel[i].state.ToString());
|
||||
rowTemp12.CellStyle = commonCellStyle;
|
||||
|
||||
|
||||
|
||||
var rowTemp13 = rowTemp.CreateCell(13);
|
||||
rowTemp13.SetCellValue(listModel[i].createTime.ToString());
|
||||
rowTemp13.CellStyle = commonCellStyle;
|
||||
var rowTemp13 = rowTemp.CreateCell(13);
|
||||
rowTemp13.SetCellValue(listModel[i].createTime.ToString());
|
||||
rowTemp13.CellStyle = commonCellStyle;
|
||||
|
||||
|
||||
}
|
||||
@@ -731,7 +728,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,10 +19,10 @@ using CoreCms.Net.Configuration;
|
||||
using CoreCms.Net.Model.Entities;
|
||||
using CoreCms.Net.Model.Entities.Expression;
|
||||
using CoreCms.Net.Model.FromBody;
|
||||
using CoreCms.Net.Model.ViewModels.UI;
|
||||
using CoreCms.Net.Filter;
|
||||
using CoreCms.Net.Loging;
|
||||
using CoreCms.Net.IServices;
|
||||
using CoreCms.Net.Model.ViewModels.UI;
|
||||
using CoreCms.Net.Utility.Helper;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
|
||||
@@ -21,8 +21,8 @@ using CoreCms.Net.Loging;
|
||||
using CoreCms.Net.Model.Entities;
|
||||
using CoreCms.Net.Model.Entities.Expression;
|
||||
using CoreCms.Net.Model.FromBody;
|
||||
using CoreCms.Net.Model.ViewModels.UI;
|
||||
using CoreCms.Net.Model.ViewModels.DTO;
|
||||
using CoreCms.Net.Model.ViewModels.UI;
|
||||
using CoreCms.Net.Utility.Extensions;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
|
||||
@@ -536,5 +536,6 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -39,6 +39,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
||||
[ApiController]
|
||||
[RequiredErrorForAdmin]
|
||||
[Authorize(Permissions.Name)]
|
||||
//[Authorize(Permissions.Name)]
|
||||
public class SysUserController : ControllerBase
|
||||
{
|
||||
private readonly ISysOrganizationServices _sysOrganizationServices;
|
||||
|
||||
Reference in New Issue
Block a user