lihao пре 4 година
родитељ
комит
86d20d7491

+ 12 - 0
gx_api/GxPress/Repository/GxPress.Repository.Implement/GroupRepository.cs

@@ -473,6 +473,18 @@ namespace GxPress.Repository.Implement
                                     FROM
                                         tede_group_user
                                     WHERE
+                                        GroupId = a.Id) AS UserCount,
+                                (SELECT 
+                                        COUNT(1)
+                                    FROM
+                                        tede_topic
+                                    WHERE
+                                    GroupId = a.Id) AS TopicCount,
+                                (SELECT 
+                                        COUNT(1)
+                                    FROM
+                                        tede_group_user
+                                    WHERE
                                         GroupId = a.Id AND UserId = {userId}
                                     LIMIT 1) AS IsUser,
                                 (SELECT