diff --git a/ZR.Model/System/SysLogininfor.cs b/ZR.Model/System/SysLogininfor.cs index e1ea472..4cd080d 100644 --- a/ZR.Model/System/SysLogininfor.cs +++ b/ZR.Model/System/SysLogininfor.cs @@ -11,7 +11,7 @@ namespace ZR.Model.System public class SysLogininfor: SysBase { //[Key] - [SugarColumn(IsPrimaryKey = true)] + [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] public long infoId { get; set; } /// diff --git a/ZR.Model/System/SysOperLog.cs b/ZR.Model/System/SysOperLog.cs index 3a04de5..93a8830 100644 --- a/ZR.Model/System/SysOperLog.cs +++ b/ZR.Model/System/SysOperLog.cs @@ -8,7 +8,7 @@ namespace ZR.Model.System [SqlSugar.SugarTable("sys_oper_log")] public class SysOperLog { - [SqlSugar.SugarColumn(IsPrimaryKey = true)] + [SqlSugar.SugarColumn(IsPrimaryKey = true, IsIdentity = true)] public long OperId { get; set; } /** 操作模块 */ //@Excel(name = "操作模块") diff --git a/ZR.Repository/System/SysUserRoleRepository.cs b/ZR.Repository/System/SysUserRoleRepository.cs index d64bb93..f63d296 100644 --- a/ZR.Repository/System/SysUserRoleRepository.cs +++ b/ZR.Repository/System/SysUserRoleRepository.cs @@ -67,10 +67,10 @@ namespace ZR.Repository.System /// public List GetSysUsersByRoleId(long roleId) { - return Db.Queryable((t1, user) => new JoinQueryInfos( - JoinType.Left, t1.UserId == user.UserId)) - .Where((t1, user) => t1.RoleId == roleId && user.DelFlag == "0") - .Select((t1, user) => user) + return Db.Queryable((t1, u) => new JoinQueryInfos( + JoinType.Left, t1.UserId == u.UserId)) + .Where((t1, u) => t1.RoleId == roleId && u.DelFlag == "0") + .Select((t1, u) => u) .ToList(); } }