12345678910111213141516171819202122232425 |
- using Hotline.CallCenter.Tels;
- using Hotline.Repository.SqlSugar.DataPermissions;
- using SqlSugar;
- using XF.Domain.Dependency;
- namespace Hotline.Repository.SqlSugar.CallCenter;
- public class TelGroupRepository : BaseRepository<TelGroup>, ITelGroupRepository, IScopeDependency
- {
- public TelGroupRepository(ISugarUnitOfWork<HotlineDbContext> 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();
- }
- }
|