From ff53958f7e65c505f9a839497d9736654336689f Mon Sep 17 00:00:00 2001 From: jsonwan Date: Mon, 19 Jul 2021 14:48:31 +0800 Subject: [PATCH] =?UTF-8?q?feature:=20=E6=8F=90=E4=BE=9B=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E6=BA=90=E7=AE=A1=E7=90=86=E3=80=81=E5=87=AD=E6=8D=AE=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E7=9B=B8=E5=85=B3ESB=20API=20#92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../esb/v3/request/EsbCreateOrUpdateCredentialV3Req.java | 6 ++++-- .../api/esb/impl/v3/EsbCredentialResourceV3Impl.java | 8 ++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/esb/v3/request/EsbCreateOrUpdateCredentialV3Req.java b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/esb/v3/request/EsbCreateOrUpdateCredentialV3Req.java index 89c3a6862f..47b99ce4df 100644 --- a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/esb/v3/request/EsbCreateOrUpdateCredentialV3Req.java +++ b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/model/esb/v3/request/EsbCreateOrUpdateCredentialV3Req.java @@ -76,10 +76,12 @@ public class EsbCreateOrUpdateCredentialV3Req extends EsbReq { /** * Username */ - private String username; + @JsonProperty("username") + private String credentialUsername; /** * Password */ - private String password; + @JsonProperty("password") + private String credentialPassword; } diff --git a/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/api/esb/impl/v3/EsbCredentialResourceV3Impl.java b/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/api/esb/impl/v3/EsbCredentialResourceV3Impl.java index 7d07f44fcc..66f49bccc4 100644 --- a/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/api/esb/impl/v3/EsbCredentialResourceV3Impl.java +++ b/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/api/esb/impl/v3/EsbCredentialResourceV3Impl.java @@ -73,7 +73,7 @@ private EsbResp saveCredential(EsbCreateOrUpdateCr CredentialCreateUpdateReq createUpdateReq = convertToCreateUpdateReq(req); InnerServiceResponse resp = credentialService.createCredential( - req.getUsername(), + req.getUserName(), req.getAppId(), createUpdateReq ); @@ -104,13 +104,13 @@ private CredentialCreateUpdateReq convertToCreateUpdateReq( if (SECRET_KEY.name().equals(type)) { createUpdateReq.setValue1(req.getSecretKey()); } else if (PASSWORD.name().equals(type)) { - createUpdateReq.setValue1(req.getPassword()); + createUpdateReq.setValue1(req.getCredentialPassword()); } else if (APP_ID_SECRET_KEY.name().equals(type)) { createUpdateReq.setValue1(req.getAccessKey()); createUpdateReq.setValue2(req.getSecretKey()); } else if (USERNAME_PASSWORD.name().equals(type)) { - createUpdateReq.setValue1(req.getUsername()); - createUpdateReq.setValue2(req.getPassword()); + createUpdateReq.setValue1(req.getCredentialUsername()); + createUpdateReq.setValue2(req.getCredentialPassword()); } else { throw new InvalidParamException( "type",