소스 검색

Merge branch 'develop5.0-tmd' of http://106.12.23.251:10000/TEAMMODEL/TEAMModelOS into develop5.0-tmd

liqk 4 년 전
부모
커밋
a09dec0583
1개의 변경된 파일148개의 추가작업 그리고 85개의 파일을 삭제
  1. 148 85
      TEAMModelOS/Controllers/Syllabus/SyllabusController.cs

+ 148 - 85
TEAMModelOS/Controllers/Syllabus/SyllabusController.cs

@@ -37,88 +37,152 @@ namespace TEAMModelOS.Controllers
 
         /*
         {
-          "id": "hbcn108774752059002880",
-          "code": "Syllabus-hbcn",
-          "scope":"school/private",
-          "trees": [
-              {
-                  "id": "111111-111-44E7-8DD9-A6CB6D0D52F2",
-                  "pid": "hbcn108515325535981568",
-                  "title": "第一章",
-                  "order": 0,
-                  "type": tree,
-                  "rnodes":[
-                      {
-                            "type":"item/paper/image/video/pptx.../link"//试题 ,试卷,内容资源,外部链接(只有link,和name)
-                            "title":"显示名称",
-                            "id":"关联资源的id",
-                            "code":"关联资源的code",
-                            "link":["https;//www.xxx.com/xxx.json"],
-                            "cntr":"blob的容器名"
-                      }
-                   ],
-                  "children": [
-                      {
-                          "id": "22222-111-447E-8A52-BFCD63E61D33",
-                          "pid": "111111-111-44E7-8DD9-A6CB6D0D52F2",
-                          "title": "第一节333",
-                          "order": 0,
-                          "type": 1,
-                          "children": [
-                              {
-                                  "id": "3333-111-447E-8A52-BFCD63E61D33",
-                                  "pid": "22222-111-447E-8A52-BFCD63E61D33",
-                                  "title": "第一节333",
-                                  "order": 0,
-                                  "type": 1
-                              },
-                              {
-                                  "id": "4444-111-447E-8A52-BFCD63E61D33",
-                                  "pid": "22222-111-447E-8A52-BFCD63E61D33",
-                                  "title": "第一节333",
-                                  "order": 0,
-                                  "type": 1
-                              }
-                          ]
-                      }
-                  ]
-              },
-              {
-                  "id": "111111-222-44E7-8DD9-A6CB6D0D52F2",
-                  "pid": "hbcn108515325535981568",
-                  "title": "第一章",
-                  "order": 0,
-                  "type": 1,
-                  "children": [
-                      {
-                          "id": "22222-222-447E-8A52-BFCD63E61D33",
-                          "pid": "111111-222-44E7-8DD9-A6CB6D0D52F2",
-                          "title": "第一节333",
-                          "order": 0,
-                          "type": 1,
-                          "children": [
-                              {
-                                  "id": "3333-222-447E-8A52-BFCD63E61D33",
-                                  "pid": "22222-222-447E-8A52-BFCD63E61D33",
-                                  "title": "第一节333",
-                                  "order": 0,
-                                  "type": 1
-                              }
-                          ]
-                      },
-                      {
-                          "id": "5555-222-447E-8A52-BFCD63E61D33",
-                          "pid": "111111-222-44E7-8DD9-A6CB6D0D52F2",
-                          "title": "第一节333",
-                          "order": 0,
-                          "type": 1,
-                          "children": []
-                      }
-                  ]
-              }
-          ]
+    "id": "0baf00db-0768-4b62-a8f7-280f6bcebf71",
+    "scope": "school",
+    "trees": [
+        {
+            "children": [
+                {
+                    "children": [],
+                    "id": "AC4BA269-541B-4DFC-92A5-D773068A6439",
+                    "pid": "2dfcc62e-8eea-9881-dc79-384b2f0afbec",
+                    "order": 0,
+                    "rnodes": [
+                        {
+                            "type": "doc",
+                            "id": "a2bee388-5584-72cc-1d9a-d8a77d255364",
+                            "code": "hbcn",
+                            "scope": "private",
+                            "cntr": "1595321354",
+                            "link": [
+                                "https://teammodelstorage.blob.core.chinacloudapi.cn/1595321354/doc/2020智慧課堂與智慧教研.pptx"
+                            ],
+                            "title": "2020智慧課堂與智慧教研.pptx"
+                        }
+                    ],
+                    "cids": [],
+                    "creatorId": null,
+                    "updateTime": 0,
+                    "title": "1-1 新冠疫情小贴士"
+                }
+            ],
+            "id": "2dfcc62e-8eea-9881-dc79-384b2f0afbec",
+            "pid": "0baf00db-0768-4b62-a8f7-280f6bcebf71",
+            "order": 0,
+            "rnodes": [
+                {
+                    "type": "doc",
+                    "id": "cf1b4d21-66e1-e6c7-c944-30a03e419fa6",
+                    "code": "hbcn",
+                    "scope": "school",
+                    "cntr": "hbcn",
+                    "link": [
+                        "https://teammodelstorage.blob.core.chinacloudapi.cn/hbcn/syllabus/IES5试卷模板制作说明(终).pdf"
+                    ],
+                    "title": "IES5试卷模板制作说明(终).pdf"
+                },
+                {
+                    "type": "doc",
+                    "id": "f3e82595-7340-a5fe-1004-04538ca09b86",
+                    "code": "hbcn",
+                    "scope": "school",
+                    "cntr": "hbcn",
+                    "link": [
+                        "https://teammodelstorage.blob.core.chinacloudapi.cn/hbcn/syllabus/111.pdf"
+                    ],
+                    "title": "111.pdf"
+                },
+                {
+                    "type": "doc",
+                    "id": "e1b31639-dad9-9efb-020b-159dd045f238",
+                    "code": "hbcn",
+                    "scope": "school",
+                    "cntr": "hbcn",
+                    "link": [
+                        "https://teammodelstorage.blob.core.chinacloudapi.cn/hbcn/doc/6789.pdf"
+                    ],
+                    "title": "6789.pdf"
+                },
+                {
+                    "type": "doc",
+                    "id": "aaeb4b5c-0450-cb4d-a1ac-244f3d115c4a",
+                    "code": "hbcn",
+                    "scope": "private",
+                    "cntr": "1595321354",
+                    "link": [
+                        "https://teammodelstorage.blob.core.chinacloudapi.cn/1595321354/doc/422北京培新活动邀请函.pdf"
+                    ],
+                    "title": "422北京培新活动邀请函.pdf"
+                },
+                {
+                    "type": "doc",
+                    "id": "c5f5838c-5c2f-5e9b-a734-a473cd2cad2e",
+                    "code": "hbcn",
+                    "scope": "school",
+                    "cntr": "hbcn",
+                    "link": [
+                        "https://teammodelstorage.blob.core.chinacloudapi.cn/hbcn/doc/6666.pdf"
+                    ],
+                    "title": "6666.pdf"
+                },
+                {
+                    "type": "doc",
+                    "id": "4a106c8e-6831-5f4b-4ec3-3c18f778cab2",
+                    "code": "hbcn",
+                    "scope": "school",
+                    "cntr": "hbcn",
+                    "link": [
+                        "https://teammodelstorage.blob.core.chinacloudapi.cn/hbcn/doc/6.pdf"
+                    ],
+                    "title": "6.pdf"
+                }
+            ],
+            "cids": [
+                "AC4BA269-541B-4DFC-92A5-D773068A6439"
+            ],
+            "creatorId": null,
+            "updateTime": 0,
+            "title": "第一单元 新冠疫情防控"
+        },
+        {
+            "children": [
+                {
+                    "children": [],
+                    "id": "FC5132E1-9723-4875-B3B5-D3DC98D194FA",
+                    "pid": "4f12752c-852f-6e90-a3df-1f1f710af23d",
+                    "order": 0,
+                    "rnodes": [],
+                    "cids": [],
+                    "creatorId": null,
+                    "updateTime": 0,
+                    "title": "2-1 全球醍摩豆智慧教育研究院"
+                },
+                {
+                    "children": [],
+                    "id": "3CAD52BE-67B6-4EDB-8EFB-9122960D816A",
+                    "pid": "4f12752c-852f-6e90-a3df-1f1f710af23d",
+                    "order": 1,
+                    "rnodes": [],
+                    "cids": [],
+                    "creatorId": null,
+                    "updateTime": 0,
+                    "title": "2-2 醍摩豆研究院课程体系"
+                }
+            ],
+            "id": "4f12752c-852f-6e90-a3df-1f1f710af23d",
+            "pid": "0baf00db-0768-4b62-a8f7-280f6bcebf71",
+            "order": 1,
+            "rnodes": [],
+            "cids": [
+                "FC5132E1-9723-4875-B3B5-D3DC98D194FA",
+                "3CAD52BE-67B6-4EDB-8EFB-9122960D816A"
+            ],
+            "creatorId": null,
+            "updateTime": 0,
+            "title": "第二单元 醍摩豆手册学习"
         }
-
+    ]
+}
               */
 
         /// <summary>
@@ -206,9 +270,8 @@ namespace TEAMModelOS.Controllers
                 return Ok(new { tree});
             }
         }
-
         /// <summary>
-        /// 删除课纲
+        /// 删除章节
         /// </summary>
         /// <param name="request"></param>
         /// <returns></returns>
@@ -222,12 +285,12 @@ namespace TEAMModelOS.Controllers
             var client = _azureCosmos.GetCosmosClient();
             if (scope.ToString().Equals("school"))
             {
-                var response = await client.GetContainer("TEAMModelOS", "School").DeleteItemStreamAsync(id.ToString(), new PartitionKey($"Volume-{code}"));
+                var response = await client.GetContainer("TEAMModelOS", "School").DeleteItemStreamAsync(id.ToString(), new PartitionKey($"Syllabus-{code}"));
                 return Ok(new { code = response.Status });
             }
             else
             {
-                var response = await client.GetContainer("TEAMModelOS", "Teacher").DeleteItemStreamAsync(id.ToString(), new PartitionKey($"Volume-{code}"));
+                var response = await client.GetContainer("TEAMModelOS", "Teacher").DeleteItemStreamAsync(id.ToString(), new PartitionKey($"Syllabus-{code}"));
                 return Ok(new { code = response.Status });
             }
         }