修复批量导入房间管理员角色问题

This commit is contained in:
youngq 2024-09-15 00:05:38 +08:00
parent aad7f3df40
commit 11faabf5f9
1 changed files with 8 additions and 1 deletions

View File

@ -206,7 +206,14 @@ namespace WGShare.API.Controllers.Frontend
x.Pwd = x.Pwd.MDString();
x.ScreenShareId = UserShareIdHelper.GenerateUnique8DigitNumber();
x.TenantId = TenantId;
x.RoleId = x.RoleId == "管理员" ? "1" : "2";
var roleId = "2";
if (x.RoleId == "管理员")
roleId = "1";
else if (x.RoleId == "房间管理员")
roleId = "3";
x.RoleId = roleId;
});
await _sqlSugar.Insertable(users).ExecuteCommandAsync();