|
@@ -254,7 +254,6 @@ namespace GxPress.Repository.Implement.Note
|
|
|
left join tede_department d on d.Id=c.DepartmentId
|
|
|
WHERE
|
|
|
a.FolderType = {noteTypeId} AND a.userId = {request.VisitUserId}
|
|
|
- AND a.ParentId = 0
|
|
|
AND a.IsDelete = 0
|
|
|
AND (a.UserId IN (SELECT
|
|
|
Id
|
|
@@ -276,8 +275,6 @@ namespace GxPress.Repository.Implement.Note
|
|
|
sql += $@" AND(b.Title LIKE '%{request.SearchKey}%' OR a.FolderName LIKE '%{request.SearchKey}%' or b.Content LIKE '%{request.SearchKey}%' or b.UserId in (select Id from tede_user where name like '%{request.SearchKey}%'))";
|
|
|
else if (!string.IsNullOrEmpty(request.SearchKey))
|
|
|
sql += $@" and a.ParentId={request.FolderId} AND(b.Title LIKE '%{request.SearchKey}%' OR a.FolderName LIKE '%{request.SearchKey}%' or b.Content LIKE '%{request.SearchKey}%')";
|
|
|
- else
|
|
|
- sql += $" and a.ParentId={request.FolderId}";
|
|
|
sql +=
|
|
|
$@" ORDER BY a.IsSystemDefault desc,a.AttributeValue desc,a.IsTop DESC,a.Sort DESC , a.LastModifiedDate DESC";
|
|
|
if (request.Page > 0)
|
|
@@ -418,7 +415,6 @@ namespace GxPress.Repository.Implement.Note
|
|
|
left join tede_department d on d.Id=c.DepartmentId
|
|
|
WHERE
|
|
|
a.FolderType = {noteTypeId} AND a.userId = {request.VisitUserId}
|
|
|
- AND a.ParentId = 0
|
|
|
AND a.IsDelete = 0
|
|
|
AND (a.UserId IN (SELECT
|
|
|
Id
|