sunpengfei
1 天以前 285404b0f7161ceca8621e61026682bbbb3f71aa
FlexJobApi.UserServer.Application/Auths/Commands/LoginCommandHandler.cs
@@ -23,6 +23,7 @@
    /// </summary>
    public class LoginCommandHandler(
        IRepository<User> rep,
        IRepository<UserWallet> repUserWallet,
        SmsUtils smsUtils,
        WxmpUtils wxmpUtils) :
        IRequestHandler<PasswordLoginCommand, LoginCommandCallback>,
@@ -35,6 +36,7 @@
        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;
@@ -283,6 +285,10 @@
                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;
        }