|
@@ -660,8 +660,9 @@ namespace GxPress.Service.Implement.Middle
|
|
|
public async Task<List<MiddleSearchFolderResult>> SearchNoteFolderAsync(MiddleSearchFolderRequest request)
|
|
|
{
|
|
|
var query = Q.NewQuery();
|
|
|
- query.Where(nameof(Entity.Middle.Middle.ParentId), request.ParentId)
|
|
|
- .Where(nameof(Entity.Middle.Middle.AttributeValue), 2)
|
|
|
+ if (request.ParentId >= 0)
|
|
|
+ query.Where(nameof(Entity.Middle.Middle.ParentId), request.ParentId);
|
|
|
+ query.Where(nameof(Entity.Middle.Middle.AttributeValue), 2)
|
|
|
.Where(nameof(Entity.Middle.Middle.FolderType), request.TypeId)
|
|
|
.Where(nameof(Entity.Middle.Middle.UserId), request.UserId)
|
|
|
.Where(nameof(Entity.Middle.Middle.IsDelete), false);
|