李昊 4 anos atrás
pai
commit
0bb4977b7e

+ 2 - 2
gx_api/GxPress/Repository/GxPress.Repository.Implement/Note/NoteRepository.cs

@@ -321,9 +321,9 @@ namespace GxPress.Repository.Implement.Note
                 sql =
                     $@"SELECT  count(1) FROM tede_middle a LEFT JOIN tede_note b ON a.MiddleId = b.Id left join tede_user c on c.Id=b.UserId left join tede_department d on d.Id=c.DepartmentId WHERE a.UserId = {request.UserId} AND a.FolderType = 4 AND a.IsDelete = 0";
                 if (request.TypeValue == 0)
-                    sql += "and  (a.RoleId in(2) or a.AttributeValue=1)";
+                    sql += " and  (a.RoleId in(2) or a.AttributeValue=1)";
                 else
-                    sql += "and  (a.RoleId in(1,3) or a.AttributeValue=1)";
+                    sql += " and  (a.RoleId in(1,3) or a.AttributeValue=1)";
                 if (request.FolderId == 0 && !string.IsNullOrEmpty(request.SearchKey))
                     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))