Bladeren bron

Merge branch 'feature-crowd-json' into 'Develop'

feature-crowd-json



See merge request !1018

menduo 6 jaren geleden
bovenliggende
commit
4e7bf6d69d

+ 14 - 2
mooctest-site-server/src/main/java/cn/iselab/mooctest/site/web/logic/impl/CaseLogicImpl.java

@@ -326,8 +326,20 @@ public class CaseLogicImpl implements CaseLogic {
         if(excelUrl != null){
             String category = targetService.getTargetProperty(savedCase.getAppId(),
                     "category").getPropertyValue();
-            save2crowdPlatform(excelUrl, "", category, savedCase.getDescription(), savedCase.getId()
-                    , savedCase.getName());
+            String paperType = properties.get("paperType");
+            if(paperType == null){
+                paperType = "{"
+                        + "\"title\":\"测试报告名称\","
+                        + "\"subTitles\":[{\"name\":\"设备名称\", \"type\":\"text\"},{\"name\":\"设备品牌\",\"type\":\"text\"},{\"name\":\"操作系统\",\"type\":\"enum\",\"value\":[\"windows\",\"linux\",\"macos\"]}],"
+                        + "\"caseList\":true,"
+                        + "\"bugList\": true,"
+                        + "\"testScript\":false,"
+                        + "\"suppleReport\":false,"
+                        + "\"testLog\":false"
+                        + "}";
+            }
+            save2crowdPlatform(excelUrl, paperType, category, savedCase.getDescription(),
+                    savedCase.getId(), savedCase.getName());
         }else{
             throw new ServerException(60000, "未上传excel文件!");
         }