|
@@ -2,6 +2,7 @@ package com.mooctest.crowd.site.command;
|
|
|
|
|
|
import com.mooctest.crowd.domain.domainobject.CrowdTestTask;
|
|
import com.mooctest.crowd.domain.domainobject.CrowdTestTask;
|
|
import com.mooctest.crowd.domain.domainobject.EndPoint;
|
|
import com.mooctest.crowd.domain.domainobject.EndPoint;
|
|
|
|
+import com.mooctest.crowd.domain.exception.BaseException;
|
|
import lombok.Data;
|
|
import lombok.Data;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
|
|
@@ -75,31 +76,10 @@ public class CrowdTestTaskCommand {
|
|
crowdTestTask.setFixedPrice(fixedPrice);
|
|
crowdTestTask.setFixedPrice(fixedPrice);
|
|
crowdTestTask.setRequirementFile(requirementFile);
|
|
crowdTestTask.setRequirementFile(requirementFile);
|
|
crowdTestTask.setParticipantCount(participantCount);
|
|
crowdTestTask.setParticipantCount(participantCount);
|
|
|
|
+ if(endPoint.getThreePageUrl() == ""){
|
|
|
|
+ throw new BaseException("测试大纲不能为空!");
|
|
|
|
+ }
|
|
crowdTestTask.setEndPoint(endPoint);
|
|
crowdTestTask.setEndPoint(endPoint);
|
|
-// if(endPoint.getServerCode() != null && endPoint.getServerCode() != ""){
|
|
|
|
-// String serverCode = endPoint.getServerCode();
|
|
|
|
-// try {
|
|
|
|
-// String decodeUrl;
|
|
|
|
-// decodeUrl = URLDecoder.decode(serverCode,"UTF-8");
|
|
|
|
-// byte[] decodedBytes = Base64.getDecoder().decode(decodeUrl);
|
|
|
|
-// String url = new String(decodedBytes);
|
|
|
|
-//
|
|
|
|
-// if(url.contains("examId_")){
|
|
|
|
-// endPoint.setExamId(url.split("examId_")[1].split("/")[0]);
|
|
|
|
-// url = url.replaceFirst("examId_","");
|
|
|
|
-// }
|
|
|
|
-// if(url.contains("caseId_")){
|
|
|
|
-// endPoint.setCaseId(url.split("caseId_")[1].split("/")[0]);
|
|
|
|
-// url = url.replaceFirst("caseId_","");
|
|
|
|
-// }
|
|
|
|
-// endPoint.setUrl(url);
|
|
|
|
-// crowdTestTask.setEndPoint(endPoint);
|
|
|
|
-// }catch (IllegalArgumentException e){
|
|
|
|
-// throw new CrowdTestEndPointException();
|
|
|
|
-// }catch (UnsupportedEncodingException e){
|
|
|
|
-// e.printStackTrace();
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
return crowdTestTask;
|
|
return crowdTestTask;
|
|
}
|
|
}
|
|
|
|
|