This commit is contained in:
chenjianxing 2021-02-05 18:52:00 +08:00
commit b2bd89f986
11 changed files with 19 additions and 10 deletions

View File

@ -1,8 +1,8 @@
package io.metersphere.track.controller;
import io.metersphere.base.domain.Issues;
import io.metersphere.track.issue.PlatformUser;
import io.metersphere.track.issue.ZentaoBuild;
import io.metersphere.track.issue.domain.PlatformUser;
import io.metersphere.track.issue.domain.ZentaoBuild;
import io.metersphere.track.service.IssuesService;
import io.metersphere.track.request.testcase.IssuesRequest;
import org.springframework.web.bind.annotation.*;

View File

@ -1,6 +1,7 @@
package io.metersphere.track.issue;
import io.metersphere.base.domain.Issues;
import io.metersphere.track.issue.domain.PlatformUser;
import io.metersphere.track.request.testcase.IssuesRequest;
import java.util.List;

View File

@ -7,6 +7,7 @@ import io.metersphere.commons.constants.IssuesManagePlatform;
import io.metersphere.commons.exception.MSException;
import io.metersphere.commons.utils.EncryptUtils;
import io.metersphere.commons.utils.LogUtil;
import io.metersphere.track.issue.domain.PlatformUser;
import io.metersphere.track.request.testcase.IssuesRequest;
import org.apache.commons.lang3.StringUtils;
import org.commonmark.node.Node;

View File

@ -5,6 +5,7 @@ import io.metersphere.base.domain.TestCaseIssues;
import io.metersphere.commons.constants.IssuesManagePlatform;
import io.metersphere.commons.user.SessionUser;
import io.metersphere.commons.utils.SessionUtils;
import io.metersphere.track.issue.domain.PlatformUser;
import io.metersphere.track.request.testcase.IssuesRequest;
import java.util.List;

View File

@ -7,9 +7,9 @@ import io.metersphere.base.domain.*;
import io.metersphere.commons.constants.IssuesManagePlatform;
import io.metersphere.commons.exception.MSException;
import io.metersphere.commons.utils.LogUtil;
import io.metersphere.commons.utils.RestTemplateUtils;
import io.metersphere.commons.utils.SessionUtils;
import io.metersphere.controller.ResultHolder;
import io.metersphere.track.issue.domain.PlatformUser;
import io.metersphere.track.request.testcase.IssuesRequest;
import org.apache.commons.lang3.StringUtils;
import org.springframework.http.HttpEntity;
@ -194,9 +194,9 @@ public class TapdPlatform extends AbstractIssuePlatform {
HttpHeaders header = auth(account, password);
if (httpMethod.equals(HttpMethod.GET)) {
responseJson = RestTemplateUtils.get(url, header);
responseJson = TapdRestUtils.get(url, header);
} else {
responseJson = RestTemplateUtils.post(url, params, header);
responseJson = TapdRestUtils.post(url, params, header);
}
ResultHolder result = JSON.parseObject(responseJson, ResultHolder.class);

View File

@ -1,6 +1,8 @@
package io.metersphere.commons.utils;
package io.metersphere.track.issue;
import io.metersphere.commons.exception.MSException;
import io.metersphere.commons.utils.CommonBeanFactory;
import io.metersphere.commons.utils.LogUtil;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
@ -8,7 +10,7 @@ import org.springframework.http.ResponseEntity;
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestTemplate;
public class RestTemplateUtils {
public class TapdRestUtils {
private static RestTemplate restTemplate;

View File

@ -7,6 +7,8 @@ import io.metersphere.base.domain.*;
import io.metersphere.commons.constants.IssuesManagePlatform;
import io.metersphere.commons.exception.MSException;
import io.metersphere.commons.utils.LogUtil;
import io.metersphere.track.issue.domain.PlatformUser;
import io.metersphere.track.issue.domain.ZentaoBuild;
import io.metersphere.track.request.testcase.IssuesRequest;
import org.apache.commons.lang3.StringUtils;
import org.springframework.http.HttpEntity;

View File

@ -1,4 +1,4 @@
package io.metersphere.track.issue;
package io.metersphere.track.issue.domain;
import lombok.Data;

View File

@ -1,4 +1,4 @@
package io.metersphere.track.domain;
package io.metersphere.track.issue.domain;
import lombok.Data;
import java.io.Serializable;

View File

@ -1,4 +1,4 @@
package io.metersphere.track.issue;
package io.metersphere.track.issue.domain;
import lombok.Data;

View File

@ -16,6 +16,8 @@ import io.metersphere.notice.service.NoticeSendService;
import io.metersphere.service.IntegrationService;
import io.metersphere.service.ProjectService;
import io.metersphere.track.issue.*;
import io.metersphere.track.issue.domain.PlatformUser;
import io.metersphere.track.issue.domain.ZentaoBuild;
import io.metersphere.track.request.testcase.IssuesRequest;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;