| | |
| | | var query = from cc in lifePayChannelConsultationRepository |
| | | join p in lifePayPromoterRepository on cc.PromoterId equals p.Id into pg |
| | | from pgd in pg.DefaultIfEmpty() |
| | | where cc.Id == id |
| | | select new ChannelConsultationDto |
| | | { |
| | | Id = cc.Id, |
| | |
| | | var exist = await lifePayPromoterRepository.FirstOrDefaultAsync(it => it.IdNumber == input.IdNumber || it.PhoneNumber == input.PhoneNumber); |
| | | if (exist != null) |
| | | { |
| | | if (exist.IdNumber == input.IdNumber) |
| | | { |
| | | throw new FormatException("该ID已存在"); |
| | | } |
| | | |
| | | if (exist.PhoneNumber == input.PhoneNumber) |
| | | { |
| | | throw new FormatException("该手机号已申请"); |
| | | } |
| | | CheckExtensions.IfTrueThrowUserFriendlyException(exist.IdNumber == input.IdNumber, "该ID已存在"); |
| | | CheckExtensions.IfTrueThrowUserFriendlyException(exist.PhoneNumber == input.PhoneNumber, "该手机号已申请"); |
| | | } |
| | | } |
| | | |