日志分表 任务日志 操作日志 接口日志
添加对应的日志文件 修改主子表的表结构信息 删除无关字段信息 测试添加数据到历史表中
This commit is contained in:
1 parent
ebdd40c518
commit
4f2ba2a3ee
101 files changed
+1004
-418
No files matched your search
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
using WalkingTec.Mvvm.Core.Extensions;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
|
||||
|
||||
namespace HHWMS.Web
|
||||
{
|
||||
public partial class InterfaceLogBatchVM : BaseBatchVM<InterfaceLog, InterfaceLog_BatchEdit>
|
||||
{
|
||||
public InterfaceLogBatchVM()
|
||||
{
|
||||
ListVM = new InterfaceLogListVM();
|
||||
LinkedVM = new InterfaceLog_BatchEdit();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Class to define batch edit fields
|
||||
/// </summary>
|
||||
public class InterfaceLog_BatchEdit : BaseVM
|
||||
{
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
using WalkingTec.Mvvm.Core.Extensions;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
|
||||
|
||||
namespace HHWMS.Web
|
||||
{
|
||||
public partial class InterfaceLogTemplateVM : BaseTemplateVM
|
||||
{
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class InterfaceLogImportVM : BaseImportVM<InterfaceLogTemplateVM, InterfaceLog>
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
using WalkingTec.Mvvm.Core.Extensions;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
|
||||
|
||||
namespace HHWMS.Web
|
||||
{
|
||||
public partial class InterfaceLogListVM : BasePagedListVM<InterfaceLog_View, InterfaceLogSearcher>
|
||||
{
|
||||
protected override List<GridAction> InitGridAction()
|
||||
{
|
||||
return new List<GridAction>
|
||||
{
|
||||
this.MakeStandardAction("InterfaceLog", GridActionStandardTypesEnum.Create, Localizer["Sys.Create"],"_Admin", dialogWidth: 800),
|
||||
this.MakeStandardAction("InterfaceLog", GridActionStandardTypesEnum.Edit, Localizer["Sys.Edit"], "_Admin", dialogWidth: 800),
|
||||
this.MakeStandardAction("InterfaceLog", GridActionStandardTypesEnum.Delete, Localizer["Sys.Delete"], "_Admin", dialogWidth: 800),
|
||||
this.MakeStandardAction("InterfaceLog", GridActionStandardTypesEnum.Details, Localizer["Sys.Details"], "_Admin", dialogWidth: 800),
|
||||
this.MakeStandardAction("InterfaceLog", GridActionStandardTypesEnum.BatchEdit, Localizer["Sys.BatchEdit"], "_Admin", dialogWidth: 800),
|
||||
this.MakeStandardAction("InterfaceLog", GridActionStandardTypesEnum.BatchDelete, Localizer["Sys.BatchDelete"], "_Admin", dialogWidth: 800),
|
||||
this.MakeStandardAction("InterfaceLog", GridActionStandardTypesEnum.Import, Localizer["Sys.Import"], "_Admin", dialogWidth: 800),
|
||||
this.MakeStandardAction("InterfaceLog", GridActionStandardTypesEnum.ExportExcel, Localizer["Sys.Export"], "_Admin"),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
protected override IEnumerable<IGridColumn<InterfaceLog_View>> InitGridHeader()
|
||||
{
|
||||
return new List<GridColumn<InterfaceLog_View>>{
|
||||
this.MakeGridHeader(x => x.ModuleName),
|
||||
this.MakeGridHeader(x => x.ActionName),
|
||||
this.MakeGridHeader(x => x.ITCode),
|
||||
this.MakeGridHeader(x => x.ActionUrl),
|
||||
this.MakeGridHeader(x => x.ActionTime),
|
||||
this.MakeGridHeader(x => x.Duration),
|
||||
this.MakeGridHeader(x => x.Remark),
|
||||
this.MakeGridHeader(x => x.IP),
|
||||
this.MakeGridHeader(x => x.LogType),
|
||||
this.MakeGridHeader(x => x.TenantCode),
|
||||
this.MakeGridHeader(x => x.Request),
|
||||
this.MakeGridHeader(x => x.Result),
|
||||
this.MakeGridHeaderAction(width: 200)
|
||||
};
|
||||
}
|
||||
|
||||
public override IOrderedQueryable<InterfaceLog_View> GetSearchQuery()
|
||||
{
|
||||
var query = DC.Set<InterfaceLog>()
|
||||
.CheckContain(Searcher.ModuleName, x=>x.ModuleName)
|
||||
.CheckContain(Searcher.ActionName, x=>x.ActionName)
|
||||
.CheckContain(Searcher.ITCode, x=>x.ITCode)
|
||||
.CheckContain(Searcher.ActionUrl, x=>x.ActionUrl)
|
||||
.CheckBetween(Searcher.ActionTime?.GetStartTime(), Searcher.ActionTime?.GetEndTime(), x => x.ActionTime, includeMax: false)
|
||||
.CheckContain(Searcher.IP, x=>x.IP)
|
||||
.CheckEqual(Searcher.LogType, x=>x.LogType)
|
||||
.CheckContain(Searcher.Request, x=>x.Request)
|
||||
.CheckContain(Searcher.Result, x=>x.Result)
|
||||
.Select(x => new InterfaceLog_View
|
||||
{
|
||||
ID = x.ID,
|
||||
ModuleName = x.ModuleName,
|
||||
ActionName = x.ActionName,
|
||||
ITCode = x.ITCode,
|
||||
ActionUrl = x.ActionUrl,
|
||||
ActionTime = x.ActionTime,
|
||||
Duration = x.Duration,
|
||||
Remark = x.Remark,
|
||||
IP = x.IP,
|
||||
LogType = x.LogType,
|
||||
TenantCode = x.TenantCode,
|
||||
Request = x.Request,
|
||||
Result = x.Result,
|
||||
})
|
||||
.OrderBy(x => x.ID);
|
||||
return query;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class InterfaceLog_View : InterfaceLog{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
using WalkingTec.Mvvm.Core.Extensions;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
|
||||
|
||||
namespace HHWMS.Web
|
||||
{
|
||||
public partial class InterfaceLogSearcher : BaseSearcher
|
||||
{
|
||||
[Display(Name = "_Admin.Module")]
|
||||
public String ModuleName { get; set; }
|
||||
[Display(Name = "_Admin.Action")]
|
||||
public String ActionName { get; set; }
|
||||
[Display(Name = "_Admin.Account")]
|
||||
public String ITCode { get; set; }
|
||||
[Display(Name = "Url")]
|
||||
public String ActionUrl { get; set; }
|
||||
[Display(Name = "_Admin.ActionTime")]
|
||||
public DateRange ActionTime { get; set; }
|
||||
[Display(Name = "IP")]
|
||||
public String IP { get; set; }
|
||||
[Display(Name = "_Admin.LogType")]
|
||||
public ActionLogTypesEnum? LogType { get; set; }
|
||||
[Display(Name = "_Admin.Request")]
|
||||
public String Request { get; set; }
|
||||
[Display(Name = "_Admin.Response")]
|
||||
public String Result { get; set; }
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
using WalkingTec.Mvvm.Core.Extensions;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
|
||||
|
||||
namespace HHWMS.Web
|
||||
{
|
||||
public partial class InterfaceLogVM : BaseCRUDVM<InterfaceLog>
|
||||
{
|
||||
|
||||
public InterfaceLogVM()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
}
|
||||
|
||||
public override void DoAdd()
|
||||
{
|
||||
base.DoAdd();
|
||||
}
|
||||
|
||||
public override void DoEdit(bool updateAllFields = false)
|
||||
{
|
||||
base.DoEdit(updateAllFields);
|
||||
}
|
||||
|
||||
public override void DoDelete()
|
||||
{
|
||||
base.DoDelete();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user