|
@@ -348,6 +348,8 @@ namespace GxPress.Repository.Implement
|
|
|
var topicConst = AllTypeConst.Topic.GetHashCode();
|
|
|
var result = new PagedList<TopicListPageResult>();
|
|
|
var sqlStr = $" and a.IsDraft={(request.IsDraft == true ? 1 : 0)}";
|
|
|
+ if (request.IsDraft)
|
|
|
+ sqlStr += $" and a.UserId={request.UserId}";
|
|
|
if (request.GroupIds.Count() == 0)
|
|
|
{
|
|
|
sqlStr += $@" AND a.GroupId IN (SELECT
|
|
@@ -499,6 +501,7 @@ namespace GxPress.Repository.Implement
|
|
|
var query = Q.NewQuery();
|
|
|
query.WhereIn(nameof(Entity.Topic.Topic.GroupId), request.GroupIds);
|
|
|
query.Where(nameof(Entity.Topic.Topic.IsDraft), true);
|
|
|
+ query.Where(nameof(Entity.Topic.Topic.UserId), request.UserId);
|
|
|
result.DraftCount = await CountAsync(query);
|
|
|
return result;
|
|
|
}
|