|
@@ -417,8 +417,20 @@ namespace GxPress.Repository.Implement
|
|
|
tede_group b ON a.GroupId = b.id
|
|
|
INNER JOIN
|
|
|
tede_user c ON a.UserId = c.Id
|
|
|
- WHERE
|
|
|
- a.GroupId > 0";
|
|
|
+ WHERE 1=1 ";
|
|
|
+ if (request.TopicGroupIds.Count > 0)
|
|
|
+ {
|
|
|
+ var groupStr = "(";
|
|
|
+ foreach (var item in request.TopicGroupIds)
|
|
|
+ {
|
|
|
+ groupStr += "{item},";
|
|
|
+ }
|
|
|
+ groupStr = groupStr.Remove(groupStr.Length - 1, 1);
|
|
|
+ groupStr += ")";
|
|
|
+ sql += $@" and a.GroupId IN {groupStr}";
|
|
|
+ }
|
|
|
+ else
|
|
|
+ sql += $@" and a.GroupId > 0";
|
|
|
if (request.IsAdmin)
|
|
|
{
|
|
|
sql += $@" AND a.UserId={request.UserId}";
|