lihao 4 anni fa
parent
commit
726795ec12

+ 14 - 1
gx_api/GxPress/Repository/GxPress.Repository.Implement/NoticeRepository.cs

@@ -369,7 +369,20 @@ namespace GxPress.Repository.Implement
                     sb += " AND a.ParentId = " + request.NoticeFolderId;
             }
             var noticeTypeValue = GxPress.EnumConst.AllTypeConst.Inbox.GetHashCode();
-            var sql = $@"SELECT a.*,(select count(1) from tede_flow where id=b.SourceId and UserId={request.UserId}) as IsAdmin,(SELECT GROUP_CONCAT(SourceName Separator'、') from tede_user_middle where MiddleType=10 and DataSourceId=a.MiddleId) as EnjoyUser,(SELECT 
+            var sql = $@"SELECT a.*,(select count(1) from tede_flow where id=b.SourceId and UserId={request.UserId}) as IsAdmin,
+                         (SELECT 
+                            Name
+                        FROM
+                            tede_user
+                        WHERE
+                            id = (SELECT 
+                                    userId
+                                FROM
+                                    tede_flow
+                                WHERE
+                                    id = b.SourceId)) as UserName,
+                         (SELECT GROUP_CONCAT(SourceName Separator'、') from tede_user_middle where MiddleType=10 and DataSourceId=a.MiddleId) as EnjoyUser,
+                         (SELECT 
                                                         GROUP_CONCAT(Name
                                                                 SEPARATOR '、')
                                                     FROM