Jelajahi Sumber

feat:代码作业统计信息api

YPLee 6 tahun lalu
induk
melakukan
c1aeb59018

+ 14 - 2
routes/statistics/statistics.raml

@@ -1,6 +1,6 @@
 #%RAML 1.0
 #%RAML 1.0
 /code:
 /code:
-  /commit:
+  /commitStatistics:
     get:
     get:
       displayName: 获取关于某次代码作业的全部git提交记录信息
       displayName: 获取关于某次代码作业的全部git提交记录信息
       queryParameters:
       queryParameters:
@@ -10,7 +10,19 @@
         groupId:
         groupId:
           type: integer
           type: integer
           description: 小组id
           description: 小组id
-      is: [response: { typeName: 'CommitDetails[]' }]    
+      is: [response: { typeName: 'CommitDetails[]' }] 
+  /{codeworkId}/process:
+    uriParameters:
+      courseId: 
+        type: integer
+        description: 代码作业id
+    get:
+       description: 获取关于某次代码作业的全部统计信息
+       queryParameters:
+         groupId:
+           type: integer
+           description: 小组id
+       is: [response: { typeName: 'CodeWorkProcessDataVO'}]
 
 
 
 
 /course/{courseId}:
 /course/{courseId}:

+ 55 - 0
types/assignment/codework/CodeWorkProcessDataVO.raml

@@ -0,0 +1,55 @@
+#%RAML 1.0 DataType
+# CodeWorkProcessDataVO
+type: object
+properties:
+  codeWorkId:
+    type: integer
+    description: 代码作业id
+  groupId:
+    type: integer
+    description: 小组id
+  tolerateCommit:
+    type: integer
+    description: 目前还可以允许的不规范git提交次数
+  branch:
+    type: integer
+    description: git分支部分的规范情况得分
+  commitMessage:
+    type: integer
+    description: git提交部分的规范情况得分
+  buildSuccess:
+    type: integer
+    description: 构建成功次数
+  buildFailure:
+    type: integer
+    description: 构建失败次数
+  prodUnitTestSuccess:
+    type: integer
+    description: 生产环境下单元测试(包含生产环境的隐藏用例)成功次数
+  prodUnitTestFailure:
+    type: integer
+    description: 生产环境下单元测试(包含生产环境的隐藏用例)失败次数
+  otherUnitTestSuccess:
+    type: integer
+    description: 其他环境下单元测试成功次数
+  otherUnitTestFailure:
+    type: integer
+    description: 其他环境下单元测试失败次数
+  functionalTestSuccess:
+    type: integer
+    description: 功能测试成功次数
+  functionalTestFail:
+    type: integer
+    description: 功能测试失败次数
+  prodUnitTestRecords:
+    type: UnitTestRecord[] | nil
+    description: 生产环境单元测试记录
+  otherUnitTestRecords:
+    type: UnitTestRecord[] | nil  
+    description: 其他环境单元测试记录
+  functionTestRecords:
+    type: FunctionTestRecord[] | nil
+    description: 功能测试记录
+  buildRecords:
+    type: BuildRecordDTO[] | nil
+    description: 构建记录列表