回滚合并
This commit is contained in:
@@ -61,6 +61,7 @@ namespace Yi.Framework.Common.Helper
|
|||||||
request.ContentType = "application/x-www-form-urlencoded";
|
request.ContentType = "application/x-www-form-urlencoded";
|
||||||
request.ContentLength = Encoding.UTF8.GetByteCount(postDataStr);
|
request.ContentLength = Encoding.UTF8.GetByteCount(postDataStr);
|
||||||
request.CookieContainer = cookie;
|
request.CookieContainer = cookie;
|
||||||
|
|
||||||
Stream myRequestStream = request.GetRequestStream();
|
Stream myRequestStream = request.GetRequestStream();
|
||||||
StreamWriter myStreamWriter = new StreamWriter(myRequestStream, Encoding.GetEncoding("gb2312"));
|
StreamWriter myStreamWriter = new StreamWriter(myRequestStream, Encoding.GetEncoding("gb2312"));
|
||||||
myStreamWriter.Write(postDataStr);
|
myStreamWriter.Write(postDataStr);
|
||||||
|
|||||||
@@ -1,48 +0,0 @@
|
|||||||
using SqlSugar;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Yi.Framework.Model.Models
|
|
||||||
{
|
|
||||||
public abstract class BaseModelEntity
|
|
||||||
{
|
|
||||||
public BaseModelEntity()
|
|
||||||
{
|
|
||||||
this.IsDeleted = false;
|
|
||||||
this.CreateTime = DateTime.Now;
|
|
||||||
}
|
|
||||||
/// <summary>
|
|
||||||
/// 1
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
|
|
||||||
public long Id { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 创建者
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "CreateUser")]
|
|
||||||
public long? CreateUser { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 修改者
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "ModifyUser")]
|
|
||||||
public long? ModifyUser { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 创建时间
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "CreateTime")]
|
|
||||||
public DateTime? CreateTime { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 修改时间
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "ModifyTime")]
|
|
||||||
public DateTime? ModifyTime { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 是否删除
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "IsDeleted")]
|
|
||||||
public bool? IsDeleted { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
using SqlSugar;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Yi.Framework.Model.Models
|
||||||
|
{
|
||||||
|
public interface IBaseModelEntity
|
||||||
|
{
|
||||||
|
public long Id { get; set; }
|
||||||
|
|
||||||
|
public long? CreateUser { get; set; }
|
||||||
|
|
||||||
|
public long? ModifyUser { get; set; }
|
||||||
|
|
||||||
|
public DateTime? CreateTime { get; set; }
|
||||||
|
|
||||||
|
public DateTime? ModifyTime { get; set; }
|
||||||
|
public bool? IsDeleted { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
59
Yi.Framework.Net6/Yi.Framework.Model/Models/RoleEntity.cs
Normal file
59
Yi.Framework.Net6/Yi.Framework.Model/Models/RoleEntity.cs
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using SqlSugar;
|
||||||
|
namespace Yi.Framework.Model.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
///</summary>
|
||||||
|
[SugarTable("Role")]
|
||||||
|
public partial class RoleEntity:IBaseModelEntity
|
||||||
|
{
|
||||||
|
public BaseModelEntity()
|
||||||
|
{
|
||||||
|
this.IsDeleted = false;
|
||||||
|
this.CreateTime = DateTime.Now;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 1
|
||||||
|
///</summary>
|
||||||
|
[SugarColumn(ColumnName="Id" ,IsPrimaryKey = true )]
|
||||||
|
public long Id { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
///</summary>
|
||||||
|
[SugarColumn(ColumnName="RoleName" )]
|
||||||
|
public string RoleName { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 创建者
|
||||||
|
///</summary>
|
||||||
|
[SugarColumn(ColumnName="CreateUser" )]
|
||||||
|
public long? CreateUser { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 创建时间
|
||||||
|
///</summary>
|
||||||
|
[SugarColumn(ColumnName="CreateTime" )]
|
||||||
|
public DateTime? CreateTime { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 修改时间
|
||||||
|
///</summary>
|
||||||
|
[SugarColumn(ColumnName="ModifyTime" )]
|
||||||
|
public DateTime? ModifyTime { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 是否删除
|
||||||
|
///</summary>
|
||||||
|
[SugarColumn(ColumnName="IsDeleted" )]
|
||||||
|
public bool? IsDeleted { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 租户Id
|
||||||
|
///</summary>
|
||||||
|
[SugarColumn(ColumnName="TenantId" )]
|
||||||
|
public long? TenantId { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 修改者
|
||||||
|
///</summary>
|
||||||
|
[SugarColumn(ColumnName="ModifyUser" )]
|
||||||
|
public long? ModifyUser { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
79
Yi.Framework.Net6/Yi.Framework.Model/Models/UserEntity.cs
Normal file
79
Yi.Framework.Net6/Yi.Framework.Model/Models/UserEntity.cs
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using SqlSugar;
|
||||||
|
namespace Yi.Framework.Model.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
///</summary>
|
||||||
|
[SugarTable("User")]
|
||||||
|
public partial class UserEntity:IBaseModelEntity
|
||||||
|
{
|
||||||
|
public BaseModelEntity()
|
||||||
|
{
|
||||||
|
this.IsDeleted = false;
|
||||||
|
this.CreateTime = DateTime.Now;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
///</summary>
|
||||||
|
[SugarColumn(ColumnName="Id" ,IsPrimaryKey = true )]
|
||||||
|
public long Id { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
///</summary>
|
||||||
|
[SugarColumn(ColumnName="Name" )]
|
||||||
|
public string Name { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
///</summary>
|
||||||
|
[SugarColumn(ColumnName="Age" )]
|
||||||
|
public int? Age { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
///</summary>
|
||||||
|
[SugarColumn(ColumnName="CreateUser" )]
|
||||||
|
public long? CreateUser { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
///</summary>
|
||||||
|
[SugarColumn(ColumnName="CreateTime" )]
|
||||||
|
public DateTime? CreateTime { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
///</summary>
|
||||||
|
[SugarColumn(ColumnName="ModifyUser" )]
|
||||||
|
public long? ModifyUser { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
///</summary>
|
||||||
|
[SugarColumn(ColumnName="ModifyTime" )]
|
||||||
|
public DateTime? ModifyTime { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
///</summary>
|
||||||
|
[SugarColumn(ColumnName="IsDeleted" )]
|
||||||
|
public bool? IsDeleted { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
///</summary>
|
||||||
|
[SugarColumn(ColumnName="TenantId" )]
|
||||||
|
public long? TenantId { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
///</summary>
|
||||||
|
[SugarColumn(ColumnName="UserName" )]
|
||||||
|
public string UserName { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
///</summary>
|
||||||
|
[SugarColumn(ColumnName="Password" )]
|
||||||
|
public string Password { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
///</summary>
|
||||||
|
[SugarColumn(ColumnName="Salt" )]
|
||||||
|
public string Salt { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using SqlSugar;
|
||||||
|
namespace Yi.Framework.Model.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
///</summary>
|
||||||
|
[SugarTable("UserRole")]
|
||||||
|
public partial class UserRoleEntity:IBaseModelEntity
|
||||||
|
{
|
||||||
|
public BaseModelEntity()
|
||||||
|
{
|
||||||
|
this.IsDeleted = false;
|
||||||
|
this.CreateTime = DateTime.Now;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 1
|
||||||
|
///</summary>
|
||||||
|
[SugarColumn(ColumnName="Id" ,IsPrimaryKey = true )]
|
||||||
|
public long Id { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
///</summary>
|
||||||
|
[SugarColumn(ColumnName="RoleId" )]
|
||||||
|
public long? RoleId { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
///</summary>
|
||||||
|
[SugarColumn(ColumnName="UserId" )]
|
||||||
|
public long? UserId { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 创建者
|
||||||
|
///</summary>
|
||||||
|
[SugarColumn(ColumnName="CreateUser" )]
|
||||||
|
public long? CreateUser { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 创建时间
|
||||||
|
///</summary>
|
||||||
|
[SugarColumn(ColumnName="CreateTime" )]
|
||||||
|
public DateTime? CreateTime { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 修改时间
|
||||||
|
///</summary>
|
||||||
|
[SugarColumn(ColumnName="ModifyTime" )]
|
||||||
|
public DateTime? ModifyTime { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 是否删除
|
||||||
|
///</summary>
|
||||||
|
[SugarColumn(ColumnName="IsDeleted" )]
|
||||||
|
public bool? IsDeleted { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 租户Id
|
||||||
|
///</summary>
|
||||||
|
[SugarColumn(ColumnName="TenantId" )]
|
||||||
|
public long? TenantId { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 修改者
|
||||||
|
///</summary>
|
||||||
|
[SugarColumn(ColumnName="ModifyUser" )]
|
||||||
|
public long? ModifyUser { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
using Yi.Framework.Common.Models;
|
using Yi.Framework.Common.Models;
|
||||||
|
using Yi.Framework.Model.Models;
|
||||||
|
|
||||||
namespace Yi.Framework.Repository
|
namespace Yi.Framework.Repository
|
||||||
{
|
{
|
||||||
public class DataContext<T> : SimpleClient<T> where T : class, new()
|
public class DataContext<T> : SimpleClient<T> where T : class, BaseModelEntity, new()
|
||||||
{
|
{
|
||||||
public DataContext(ISqlSugarClient context) : base(context)
|
public DataContext(ISqlSugarClient context) : base(context)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user