Insight
continue 2024-11-21 14:08:04 +08:00
commit a47d0b8ffe
1 changed files with 1 additions and 1 deletions

View File

@ -193,7 +193,7 @@ namespace OpenAuth.App.BaseApp.SysGroupManager
throw new Exception("成员" + names + "已分配小组,勿重复分配");
}
await uwo.SysGroupuser.DeleteAsync(r => r.GroupId == model.GroupId);
await uwo.SysGroupuser.InsertRangeAsync(model.UserIds.Select(a => new SysGroupuser { GroupId = model.GroupId, UserId = a }).ToList());
await uwo.SysGroupuser.InsertRangeAsync(model.UserIds.Distinct().Select(a => new SysGroupuser { GroupId = model.GroupId, UserId = a }).ToList());
var flag = uwo.Commit();
return new Response<bool>
{