From 8be3046ae261de70ae7a63448ae377be6ad6ca34 Mon Sep 17 00:00:00 2001 From: izory <791736813@qq.com> Date: Mon, 6 Sep 2021 12:51:17 +0800 Subject: [PATCH] =?UTF-8?q?fix=20sqlserver=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=E4=B8=8Bbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ZR.Model/System/SysLogininfor.cs | 2 +- ZR.Model/System/SysOperLog.cs | 2 +- ZR.Repository/System/SysUserRoleRepository.cs | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) 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(); } }