| | |
| | | /// </summary> |
| | | public class LoginCommandHandler( |
| | | IRepository<User> rep, |
| | | IRepository<UserWallet> repUserWallet, |
| | | SmsUtils smsUtils, |
| | | WxmpUtils wxmpUtils) : |
| | | IRequestHandler<PasswordLoginCommand, LoginCommandCallback>, |
| | |
| | | IRequestHandler<GetEnterpriseLoginInfoQuery, GetEnterpriseLoginInfoQueryResult> |
| | | { |
| | | private readonly IRepository<User> rep = rep; |
| | | private readonly IRepository<UserWallet> repUserWallet = repUserWallet; |
| | | private readonly SmsUtils smsUtils = smsUtils; |
| | | private readonly WxmpUtils wxmpUtils = wxmpUtils; |
| | | |
| | |
| | | tu.HireStatus == EnumTaskUserHireStatus.Refuse |
| | | || tu.EnterpriseEmployee.UserSignContractStatus == EnumTaskUserSignContractStatus.Refuse |
| | | || tu.EnterpriseEmployee.EnterpriseSignContractStatus == EnumTaskUserSignContractStatus.Refuse); |
| | | model.Balance = await repUserWallet.AsQueryable().AsNoTracking() |
| | | .Where(it => it.UserId == model.Id) |
| | | .Select(it => it.Balance) |
| | | .FirstOrDefaultAsync(); |
| | | return model; |
| | | } |
| | | |