diff --git a/test-track/backend/src/main/java/io/metersphere/service/issue/client/ZentaoClient.java b/test-track/backend/src/main/java/io/metersphere/service/issue/client/ZentaoClient.java index d5a784055e..230d7cd4e7 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/issue/client/ZentaoClient.java +++ b/test-track/backend/src/main/java/io/metersphere/service/issue/client/ZentaoClient.java @@ -223,7 +223,7 @@ public abstract class ZentaoClient extends BaseClient { try { restTemplate.exchange(requestUrl.getFileUpload(), HttpMethod.POST, requestEntity, - String.class, objectType, objectId, sessionId); + String.class, objectId, sessionId); } catch (Exception e) { LogUtil.info("upload zentao attachment error"); } diff --git a/test-track/backend/src/main/java/io/metersphere/service/issue/client/ZentaoGetClient.java b/test-track/backend/src/main/java/io/metersphere/service/issue/client/ZentaoGetClient.java index e05e2b7482..e3d816200c 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/issue/client/ZentaoGetClient.java +++ b/test-track/backend/src/main/java/io/metersphere/service/issue/client/ZentaoGetClient.java @@ -16,7 +16,7 @@ public class ZentaoGetClient extends ZentaoClient { private static final String STORY_GET="&module=story&methodName=getProductStories¶ms=productID={key}&t=json&zentaosid="; private static final String USER_GET="&module=user&methodName=getList&t=json&zentaosid="; private static final String BUILDS_GET="&module=build&methodName=getProductBuildPairs&productID={0}&zentaosid={1}"; - private static final String FILE_UPLOAD="&module=file&methodName=saveUpload¶ms=objectType=bug&zentaosid={1}"; + private static final String FILE_UPLOAD="&module=file&methodName=saveUpload¶ms=objectType=bug,objectID={1}&zentaosid={2}"; private static final String FILE_DELETE="/?m=file&f=delete&t=json&fileID={1}&confirm=yes&zentaosid={2}"; private static final String FILE_DOWNLOAD="/?m=file&f=download&t=json&fileID={1}&mouse=click&zentaosid={2}"; private static final String CREATE_META_DATA="?m=bug&f=create&productID={0}&t=json&zentaosid={1}"; diff --git a/test-track/backend/src/main/java/io/metersphere/service/issue/client/ZentaoPathInfoClient.java b/test-track/backend/src/main/java/io/metersphere/service/issue/client/ZentaoPathInfoClient.java index b34c54e879..c19f120c04 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/issue/client/ZentaoPathInfoClient.java +++ b/test-track/backend/src/main/java/io/metersphere/service/issue/client/ZentaoPathInfoClient.java @@ -16,7 +16,7 @@ public class ZentaoPathInfoClient extends ZentaoClient { private static final String USER_GET = "/api-getModel-user-getList?zentaosid="; private static final String BUILDS_GET = "/api-getModel-build-getProductBuildPairs-productID={0}?zentaosid={1}"; private static final String CREATE_META_DATA="/bug-create-{0}.json?zentaosid={1}"; - private static final String FILE_UPLOAD = "/api-getModel-file-saveUpload-objectType=bug?zentaosid={1}"; + private static final String FILE_UPLOAD = "/api-getModel-file-saveUpload-objectType=bug,objectID={1}?zentaosid={2}"; private static final String FILE_DELETE = "/file-delete-{1}-.yes.json?zentaosid={2}"; private static final String FILE_DOWNLOAD="/file-download-{1}-.click.json?zentaosid={2}"; private static final String REPLACE_IMG_URL = ""; diff --git a/test-track/backend/src/main/java/io/metersphere/service/issue/platform/ZentaoPlatform.java b/test-track/backend/src/main/java/io/metersphere/service/issue/platform/ZentaoPlatform.java index f153ab516f..758d644fac 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/issue/platform/ZentaoPlatform.java +++ b/test-track/backend/src/main/java/io/metersphere/service/issue/platform/ZentaoPlatform.java @@ -445,7 +445,7 @@ public class ZentaoPlatform extends AbstractIssuePlatform { try { String fileUpload = zentaoClient.requestUrl.getFileUpload(); ResponseEntity responseEntity = restTemplate.exchange(fileUpload, HttpMethod.POST, requestEntity, - String.class, session); + String.class, null, session); String body = responseEntity.getBody(); Map obj = JSON.parseMap(body); Map data = (Map) JSON.parseObject(obj.get("data").toString());