|
@@ -525,13 +525,16 @@ namespace GxPress.Repository.Implement
|
|
|
GroupId = a.Id) AS UserCount
|
|
|
FROM
|
|
|
tede_group a
|
|
|
+ INNER JOIN
|
|
|
+ tede_middle b ON a.Id = b.MiddleId
|
|
|
WHERE
|
|
|
- a.Id IN (SELECT
|
|
|
+ b.UserId = userId
|
|
|
+ AND a.Id IN (SELECT
|
|
|
GroupId
|
|
|
FROM
|
|
|
tede_topic
|
|
|
WHERE
|
|
|
- GroupId > 0 AND UserId ={userId}
|
|
|
+ GroupId > 0 AND UserId = {userId}
|
|
|
ORDER BY CreatedDate DESC)";
|
|
|
var databaseType = StringUtils.ToEnum<DatabaseType>(_databaseTypeStr, DatabaseType.MySql);
|
|
|
var database = new Database(databaseType, _connectionString);
|