| | |
| | | { |
| | | await _distributedCache.SetAsync(code, res.OpenId, options: new Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions() |
| | | { |
| | | AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(5) |
| | | AbsoluteExpirationRelativeToNow = TimeSpan.FromHours(24) |
| | | }); |
| | | } |
| | | |
| | |
| | | |
| | | public async Task<Guid> CreateAccount(CreateAccountInput input, bool isSend, bool isAdminCreate = false) |
| | | { |
| | | if (input.ClientId == LifePaymentConstant.ClientId.Back) |
| | | { |
| | | CheckExtensions.IfTrueThrowUserFriendlyException(!input.CompanyOrgId.HasValue || !input.DepartmentOrgId.HasValue, |
| | | "所属公司和部门不能为空"); |
| | | } |
| | | //if (input.ClientId == LifePaymentConstant.ClientId.Back) |
| | | //{ |
| | | // CheckExtensions.IfTrueThrowUserFriendlyException(!input.CompanyOrgId.HasValue || !input.DepartmentOrgId.HasValue, |
| | | // "所属公司和部门不能为空"); |
| | | //} |
| | | |
| | | var any = await _userRepository.Where(x => x.PhoneNumber == input.PhoneNumber && x.ClientId == input.ClientId).AnyAsync(); |
| | | CheckExtensions.IfTrueThrowUserFriendlyException(any, |