update 修改日志表字段类型
This commit is contained in:
@@ -22,7 +22,7 @@ namespace Ewide.Core
|
|||||||
/// 是否执行成功(Y-是,N-否)
|
/// 是否执行成功(Y-是,N-否)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Comment("是否执行成功")]
|
[Comment("是否执行成功")]
|
||||||
public string Success { get; set; }
|
public bool Success { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 具体消息
|
/// 具体消息
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ namespace Ewide.Core.Service
|
|||||||
await new SysLogVis
|
await new SysLogVis
|
||||||
{
|
{
|
||||||
Name = "登录",
|
Name = "登录",
|
||||||
Success = YesOrNot.Y.ToString(),
|
Success = true,
|
||||||
Message = "登录成功",
|
Message = "登录成功",
|
||||||
Ip = loginOutput.LastLoginIp,
|
Ip = loginOutput.LastLoginIp,
|
||||||
Browser = loginOutput.LastLoginBrowser,
|
Browser = loginOutput.LastLoginBrowser,
|
||||||
@@ -179,7 +179,7 @@ namespace Ewide.Core.Service
|
|||||||
await new SysLogVis
|
await new SysLogVis
|
||||||
{
|
{
|
||||||
Name = "退出",
|
Name = "退出",
|
||||||
Success = YesOrNot.Y.ToString(),
|
Success = true,
|
||||||
Message = "退出成功",
|
Message = "退出成功",
|
||||||
VisType = 2
|
VisType = 2
|
||||||
}.InsertAsync();
|
}.InsertAsync();
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ namespace Ewide.Core.Service
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否执行成功(Y-是,N-否)
|
/// 是否执行成功(Y-是,N-否)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Success { get; set; }
|
public bool? Success { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 具体消息
|
/// 具体消息
|
||||||
|
|||||||
@@ -33,12 +33,12 @@ namespace Ewide.Core.Service
|
|||||||
public async Task<dynamic> QueryVisLogPageList([FromQuery] VisLogInput input)
|
public async Task<dynamic> QueryVisLogPageList([FromQuery] VisLogInput input)
|
||||||
{
|
{
|
||||||
var name = !string.IsNullOrEmpty(input.Name?.Trim());
|
var name = !string.IsNullOrEmpty(input.Name?.Trim());
|
||||||
var success = !string.IsNullOrEmpty(input.Success?.Trim());
|
var success = input.Success.HasValue;
|
||||||
var searchBeginTime = !string.IsNullOrEmpty(input.SearchBeginTime?.Trim());
|
var searchBeginTime = !string.IsNullOrEmpty(input.SearchBeginTime?.Trim());
|
||||||
var visLogs = await _sysVisLogRep.DetachedEntities
|
var visLogs = await _sysVisLogRep.DetachedEntities
|
||||||
.Where((name, u => EF.Functions.Like(u.Name, $"%{input.Name.Trim()}%")))
|
.Where((name, u => EF.Functions.Like(u.Name, $"%{input.Name.Trim()}%")))
|
||||||
.Where(input.VisType > 0, u => u.VisType == input.VisType)
|
.Where(input.VisType > 0, u => u.VisType == input.VisType)
|
||||||
.Where(success, u => u.Success == input.Success.Trim())
|
.Where(success, u => u.Success == input.Success.Value)
|
||||||
.Where(searchBeginTime, u => u.VisTime >= DateTime.Parse(input.SearchBeginTime.Trim()) &&
|
.Where(searchBeginTime, u => u.VisTime >= DateTime.Parse(input.SearchBeginTime.Trim()) &&
|
||||||
u.VisTime <= DateTime.Parse(input.SearchEndTime.Trim()))
|
u.VisTime <= DateTime.Parse(input.SearchEndTime.Trim()))
|
||||||
.OrderByDescending(u => u.Id)
|
.OrderByDescending(u => u.Id)
|
||||||
|
|||||||
6725
Api/Ewide.Database.Migrations/Migrations/20210425124043_Init20210425a.Designer.cs
generated
Normal file
6725
Api/Ewide.Database.Migrations/Migrations/20210425124043_Init20210425a.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,56 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
namespace Ewide.Database.Migrations.Migrations
|
||||||
|
{
|
||||||
|
public partial class Init20210425a : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AlterColumn<bool>(
|
||||||
|
name: "Success",
|
||||||
|
table: "sys_log_vis",
|
||||||
|
type: "tinyint(1)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: false,
|
||||||
|
comment: "是否执行成功",
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "longtext CHARACTER SET utf8mb4",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "是否执行成功");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "ewide_area_number",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Code = table.Column<string>(type: "varchar(10) CHARACTER SET utf8mb4", maxLength: 10, nullable: false, comment: "系统使用的区域代码"),
|
||||||
|
ShowCode = table.Column<string>(type: "varchar(10) CHARACTER SET utf8mb4", maxLength: 10, nullable: true, comment: "对外使用的区域代码"),
|
||||||
|
Name = table.Column<string>(type: "varchar(10) CHARACTER SET utf8mb4", maxLength: 10, nullable: false, comment: "名称"),
|
||||||
|
Note = table.Column<string>(type: "longtext CHARACTER SET utf8mb4", nullable: true, comment: "备注"),
|
||||||
|
LevelType = table.Column<int>(type: "int", nullable: false, comment: "类别"),
|
||||||
|
ParentCode = table.Column<string>(type: "varchar(10) CHARACTER SET utf8mb4", maxLength: 10, nullable: true, comment: "父级区域代码"),
|
||||||
|
Sort = table.Column<int>(type: "int", nullable: false, comment: "排序")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_ewide_area_number", x => x.Code);
|
||||||
|
},
|
||||||
|
comment: "区域表");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "ewide_area_number");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "Success",
|
||||||
|
table: "sys_log_vis",
|
||||||
|
type: "longtext CHARACTER SET utf8mb4",
|
||||||
|
nullable: true,
|
||||||
|
comment: "是否执行成功",
|
||||||
|
oldClrType: typeof(bool),
|
||||||
|
oldType: "tinyint(1)",
|
||||||
|
oldComment: "是否执行成功");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -81,6 +81,49 @@ namespace Ewide.Database.Migrations.Migrations
|
|||||||
.HasComment("代码生成业务");
|
.HasComment("代码生成业务");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Ewide.Core.Entity.AreaNumber", b =>
|
||||||
|
{
|
||||||
|
b.Property<string>("Code")
|
||||||
|
.HasMaxLength(10)
|
||||||
|
.HasColumnType("varchar(10) CHARACTER SET utf8mb4")
|
||||||
|
.HasComment("系统使用的区域代码");
|
||||||
|
|
||||||
|
b.Property<int>("LevelType")
|
||||||
|
.HasColumnType("int")
|
||||||
|
.HasComment("类别");
|
||||||
|
|
||||||
|
b.Property<string>("Name")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(10)
|
||||||
|
.HasColumnType("varchar(10) CHARACTER SET utf8mb4")
|
||||||
|
.HasComment("名称");
|
||||||
|
|
||||||
|
b.Property<string>("Note")
|
||||||
|
.HasColumnType("longtext CHARACTER SET utf8mb4")
|
||||||
|
.HasComment("备注");
|
||||||
|
|
||||||
|
b.Property<string>("ParentCode")
|
||||||
|
.HasMaxLength(10)
|
||||||
|
.HasColumnType("varchar(10) CHARACTER SET utf8mb4")
|
||||||
|
.HasComment("父级区域代码");
|
||||||
|
|
||||||
|
b.Property<string>("ShowCode")
|
||||||
|
.HasMaxLength(10)
|
||||||
|
.HasColumnType("varchar(10) CHARACTER SET utf8mb4")
|
||||||
|
.HasComment("对外使用的区域代码");
|
||||||
|
|
||||||
|
b.Property<int>("Sort")
|
||||||
|
.HasColumnType("int")
|
||||||
|
.HasComment("排序");
|
||||||
|
|
||||||
|
b.HasKey("Code");
|
||||||
|
|
||||||
|
b.ToTable("ewide_area_number");
|
||||||
|
|
||||||
|
b
|
||||||
|
.HasComment("区域表");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Ewide.Core.SysApp", b =>
|
modelBuilder.Entity("Ewide.Core.SysApp", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("Id")
|
b.Property<string>("Id")
|
||||||
@@ -2688,8 +2731,8 @@ namespace Ewide.Database.Migrations.Migrations
|
|||||||
.HasColumnType("longtext CHARACTER SET utf8mb4")
|
.HasColumnType("longtext CHARACTER SET utf8mb4")
|
||||||
.HasComment("操作系统");
|
.HasComment("操作系统");
|
||||||
|
|
||||||
b.Property<string>("Success")
|
b.Property<bool>("Success")
|
||||||
.HasColumnType("longtext CHARACTER SET utf8mb4")
|
.HasColumnType("tinyint(1)")
|
||||||
.HasComment("是否执行成功");
|
.HasComment("是否执行成功");
|
||||||
|
|
||||||
b.Property<DateTimeOffset>("VisTime")
|
b.Property<DateTimeOffset>("VisTime")
|
||||||
|
|||||||
Reference in New Issue
Block a user