李昊 4 年之前
父节点
当前提交
d4080ebad6

+ 4 - 4
gx_api/GxPress/Model/GxPress.Result/User/UserResult.cs

@@ -1,7 +1,3 @@
-using GxPress.EnumConst;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Converters;
-
 namespace GxPress.Result.User
 {
     /// <summary>
@@ -50,5 +46,9 @@ namespace GxPress.Result.User
         /// 角色ID
         /// </summary>
         public int RoleId { get; set; }
+         /// <summary>
+        /// 头像地址
+        /// </summary>
+        public string AvatarUrl { get; set; }
     }
 }

+ 4 - 1
gx_api/GxPress/Model/GxPress.Result/User/UserSignInResult.cs

@@ -21,7 +21,10 @@ namespace GxPress.Result.User
         /// token
         /// </summary>
         public TokenResult Token { get; set; }
-
+        /// <summary>
+        /// 用户
+        /// </summary>
+        /// <value></value>
         public UserResult User { get; set; }
     }
 }

+ 2 - 0
gx_api/GxPress/Repository/GxPress.Repository.Implement/UserRepository.cs

@@ -318,6 +318,8 @@ namespace GxPress.Repository.Implement
                 result.UserId = user.Id;
                 result.DepartmentId = user.DepartmentId;
                 result.User = _mapper.Map<UserResult>(user);
+                if (result.User != null)
+                    result.User.AvatarUrl = StringUtils.AddDomain(result.User.AvatarUrl);
                 //修改登录时间
                 user.LoginTime = DateTime.Now;
                 await _repository.UpdateAsync(user);