|
@@ -49,10 +49,10 @@ namespace GxPress.Repository.Implement.RecordFolder
|
|
|
query.Where(nameof(Entity.Middle.Middle.Id), recordFolder.FolderId);
|
|
|
query.Where(nameof(Entity.Middle.Middle.IsDelete), false);
|
|
|
if (folderType == GxPress.EnumConst.AllTypeConst.TopicNote.GetHashCode())
|
|
|
- query.Where(nameof(Entity.Middle.Middle.RoleId), 2);
|
|
|
- if (folderType == GxPress.EnumConst.AllTypeConst.Note.GetHashCode())
|
|
|
query.WhereIn(nameof(Entity.Middle.Middle.RoleId), new List<int> { 1, 3 });
|
|
|
- var middle = await _middleRepository.GetAsync();
|
|
|
+ if (folderType == GxPress.EnumConst.AllTypeConst.Note.GetHashCode())
|
|
|
+ query.Where(nameof(Entity.Middle.Middle.RoleId), 2);
|
|
|
+ var middle = await _middleRepository.GetAsync(query);
|
|
|
if (folderType == GxPress.EnumConst.AllTypeConst.TopicNote.GetHashCode() && middle == null)
|
|
|
middle = await _middleRepository.GetAsync(Q.Where(nameof(Entity.Middle.Middle.FolderType), folderType).Where(nameof(Entity.Middle.Middle.IsSystemDefault), true));
|
|
|
recordFolder.FolderName = middle != null ? middle.FolderName : "";
|