using Hotline.CallCenter.Tels; using Hotline.Repository.SqlSugar.DataPermissions; using SqlSugar; using XF.Domain.Dependency; namespace Hotline.Repository.SqlSugar.CallCenter; public class TelGroupRepository : BaseRepository, ITelGroupRepository, IScopeDependency { public TelGroupRepository(ISugarUnitOfWork uow, IDataPermissionFilterBuilder dataPermissionFilterBuilder) : base(uow, dataPermissionFilterBuilder) { } public async Task UpdateNavTelsAsync(TelGroup group, CancellationToken cancellationToken = default) { await Db.UpdateNav(group) .Include(d => d.Tels, new UpdateNavOptions { ManyToManyIsUpdateA = true }) .ExecuteCommandAsync(); } public async Task AddNavTelsAsync(TelGroup group, CancellationToken cancellationToken = default) { await Db.InsertNav(group).Include(d => d.Tels).ExecuteCommandAsync(); } }