123456789101112131415161718192021222324252627282930313233 |
- using Hotline.Repository.SqlSugar.DataPermissions;
- using Hotline.Share.Tools;
- using Hotline.Snapshot;
- using Hotline.Snapshot.Interfaces;
- using Hotline.Snapshot;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using XF.Domain.Dependency;
- using SqlSugar;
- using Hotline.Repository.SqlSugar.DataPermissions;
- namespace Hotline.Repository.SqlSugar.Snapshot;
- public class SnapshotUserInfoRepository : BaseRepository<SnapshotUserInfo>, ISnapshotUserInfoRepository, IScopeDependency
- {
- public SnapshotUserInfoRepository(ISugarUnitOfWork<HotlineDbContext> uow, IDataPermissionFilterBuilder dataPermissionFilterBuilder, IServiceProvider serviceProvider) : base(uow, dataPermissionFilterBuilder, serviceProvider)
- {
- }
- public async Task<SnapshotUserInfo?> GetByPhoneNumberAsync(string? phoneNumber)
- {
- if (phoneNumber.IsNullOrEmpty()) return null;
- return await Queryable().Where(m => m.PhoneNumber == phoneNumber).FirstAsync();
- }
- public async Task<SnapshotUserInfo> GetByThirdIdAsync(string id)
- {
- return await Queryable().Where(m => m.ThirdAccountId == id).FirstAsync();
- }
- }
|