|
@@ -82,13 +82,17 @@ namespace GxPress.Repository.Implement
|
|
|
{
|
|
|
var list = await _repository.GetAllAsync(Q.Where(nameof(ArticleGroupUser.UserId), request.UserId));
|
|
|
var listArray = list.Select(n => _mapper.Map<ArticleGroupUserListResult>(n)).ToList();
|
|
|
+ var articleGroups = await _articleGroupRepository.GetAllAsync(Q.Where(nameof(ArticleGroup.IsSystemDefault), true));
|
|
|
+ foreach (var item in articleGroups)
|
|
|
+ {
|
|
|
+ listArray.Add(new ArticleGroupUserListResult() { Id = 0, UserId = request.UserId, ArticleGroupId = item.Id, ArticleGroupName = item.Name, StyleCss = item.StyleCss });
|
|
|
+ }
|
|
|
foreach (var item in listArray)
|
|
|
{
|
|
|
var articleGroup = await _articleGroupRepository.GetAsync(item.ArticleGroupId);
|
|
|
item.ArticleGroupName = articleGroup.Name;
|
|
|
item.StyleCss = articleGroup.StyleCss;
|
|
|
}
|
|
|
-
|
|
|
return listArray;
|
|
|
}
|
|
|
}
|