李昊 4 years ago
parent
commit
3811b9fc0f

+ 7 - 2
gx_api/GxPress/Service/GxPress.Service.Implement/UserMiddle/UserMiddleService.cs

@@ -126,15 +126,20 @@ namespace GxPress.Service.Implement.UserMiddle
                     //系统
                     if (userMiddle.SourceType == UserlinkConst.System.GetHashCode())
                     {
+                        if (userMiddle.SourceTypeValue == 0 && userMiddle.SourceId == 0)
+                        {
+                            userIds.AddRange(await groupUserRepository.GetGroupUserByUserIdAsync(userId));
+                        }
                         /// <summary>
                         /// 我的小组
                         /// </summary>
                         /// <value></value>
-                        if (userMiddle.SourceTypeValue == UserlinkConst.MyGroup.GetHashCode())
+                        else if (userMiddle.SourceTypeValue == UserlinkConst.MyGroup.GetHashCode())
                         {
                             if (userMiddle.SourceId == 0)
                             {
                                 userIds.AddRange(await groupUserRepository.GetGroupUserByUserIdAsync(userId));
+                                userIds.AddRange(await groupChatUserRepository.GetUserIdsAsync(userId));
                             }
                             else
                             {
@@ -146,7 +151,7 @@ namespace GxPress.Service.Implement.UserMiddle
                         /// 我的群聊
                         /// </summary>
                         /// <value></value>
-                        if (userMiddle.SourceTypeValue == UserlinkConst.MyGroupChat.GetHashCode())
+                        else if (userMiddle.SourceTypeValue == UserlinkConst.MyGroupChat.GetHashCode())
                         {
                             if (userMiddle.SourceId == 0)
                             {