| | |
| | | /// </summary> |
| | | public class LoginCommandHandler( |
| | | IRepository<User> rep, |
| | | IRepository<UserAuth> repUserAuth, |
| | | IRepository<UserWallet> repUserWallet, |
| | | SmsUtils smsUtils, |
| | | WxmpUtils wxmpUtils) : |
| | |
| | | IRequestHandler<GetEnterpriseLoginInfoQuery, GetEnterpriseLoginInfoQueryResult> |
| | | { |
| | | private readonly IRepository<User> rep = rep; |
| | | private readonly IRepository<UserAuth> repUserAuth = repUserAuth; |
| | | private readonly IRepository<UserWallet> repUserWallet = repUserWallet; |
| | | private readonly SmsUtils smsUtils = smsUtils; |
| | | private readonly WxmpUtils wxmpUtils = wxmpUtils; |
| | |
| | | ContactPhoneNumber = request.PhoneNumber, |
| | | IsCheckPhoneNumber = true, |
| | | Level = 1, |
| | | Status = EnumUserStatus.Normal |
| | | Status = EnumUserStatus.Normal, |
| | | }; |
| | | await rep.InsertAsync(user); |
| | | |
| | |
| | | .Where(it => it.UserId == model.Id) |
| | | .Select(it => it.Balance) |
| | | .FirstOrDefaultAsync(); |
| | | model.RealStatus = await repUserAuth.AsQueryable().AsNoTracking() |
| | | .Where(it => it.Id == model.Id) |
| | | .Select(it => it.RealStatus) |
| | | .FirstOrDefaultAsync(); |
| | | return model; |
| | | } |
| | | |