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",