From 5c45bc53e2c18e45130c21048df4af4896455c6d Mon Sep 17 00:00:00 2001
From: sunpengfei <i@angelzzz.com>
Date: 星期五, 12 九月 2025 15:58:48 +0800
Subject: [PATCH] feat:开发

---
 FlexJobApi.UserServer.Application/Auths/Commands/LoginCommandHandler.cs |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/FlexJobApi.UserServer.Application/Auths/Commands/LoginCommandHandler.cs b/FlexJobApi.UserServer.Application/Auths/Commands/LoginCommandHandler.cs
index a5c010d..c8116c9 100644
--- a/FlexJobApi.UserServer.Application/Auths/Commands/LoginCommandHandler.cs
+++ b/FlexJobApi.UserServer.Application/Auths/Commands/LoginCommandHandler.cs
@@ -23,6 +23,7 @@
     /// </summary>
     public class LoginCommandHandler(
         IRepository<User> rep,
+        IRepository<UserAuth> repUserAuth,
         IRepository<UserWallet> repUserWallet,
         SmsUtils smsUtils,
         WxmpUtils wxmpUtils) :
@@ -36,6 +37,7 @@
         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;
@@ -257,7 +259,7 @@
                 ContactPhoneNumber = request.PhoneNumber,
                 IsCheckPhoneNumber = true,
                 Level = 1,
-                Status = EnumUserStatus.Normal
+                Status = EnumUserStatus.Normal,
             };
             await rep.InsertAsync(user);
 
@@ -289,6 +291,16 @@
                 .Where(it => it.UserId == model.Id)
                 .Select(it => it.Balance)
                 .FirstOrDefaultAsync();
+            var auth = await repUserAuth.AsQueryable().AsNoTracking()
+                .Where(it => it.Id == model.Id)
+                .Select(it => new
+                {
+                    it.RealStatus,
+                    it.RealFailMessage
+                })
+                .FirstOrDefaultAsync();
+            model.RealStatus = auth?.RealStatus ?? EnumPersonalUserRealStatus.UnReal;
+            model.RealFailMessage = auth?.RealFailMessage;
             return model;
         }
 

--
Gitblit v1.9.1