lihao 4 年之前
父節點
當前提交
2d92a262cf
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      gx_api/GxPress/Service/GxPress.Service.Implement/Note/NoteService.cs

+ 7 - 0
gx_api/GxPress/Service/GxPress.Service.Implement/Note/NoteService.cs

@@ -279,6 +279,13 @@ namespace GxPress.Service.Implement.Note
             parameterQuery.WhereColumns("b.Id", "=", "tede_middle.ParentId");
             parameterQuery.Select("b.Id");
             query.Select(parameterQuery, "FolderId");
+            //文件数量
+            parameterQuery = new SqlKata.Query("tede_middle as e");
+            parameterQuery.WhereColumns("e.ParentId", "=", "tede_middle.Id");
+            parameterQuery.Where("e.IsDelete", false);
+            parameterQuery.Where("e.FolderType", typeValue);
+            parameterQuery.AsCount();
+            query.Select(parameterQuery, "FileCount");
             query.Where("tede_middle.FolderType", typeValue);
             query.Where("tede_middle.IsDelete", false);
             query.Where("tede_middle.UserId", request.VisitUserId > 0 ? request.VisitUserId : request.UserId);