diff --git a/CHANGELOG b/CHANGELOG index f2273f929..07cc57044 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +2021-01-14 Version: patch +- Fixed ListUsers, GetUser, EnableUser, RegisterUser, DisableUser, DeleteUser API parameter of uid data type error, from number into string. +- Supported ListInstances, GetInstance API to return Owner information. +- Supported SetOwners API to set INSTANCE owner. + 2021-01-14 Version: patch - Create Lindorm Open api. diff --git a/dms-enterprise/CMakeLists.txt b/dms-enterprise/CMakeLists.txt index 15373313c..ce755d178 100644 --- a/dms-enterprise/CMakeLists.txt +++ b/dms-enterprise/CMakeLists.txt @@ -23,8 +23,6 @@ set(dms-enterprise_public_header set(dms-enterprise_public_header_model include/alibabacloud/dms-enterprise/model/ApproveOrderRequest.h include/alibabacloud/dms-enterprise/model/ApproveOrderResult.h - include/alibabacloud/dms-enterprise/model/CheckFinishMissionRequest.h - include/alibabacloud/dms-enterprise/model/CheckFinishMissionResult.h include/alibabacloud/dms-enterprise/model/CloseOrderRequest.h include/alibabacloud/dms-enterprise/model/CloseOrderResult.h include/alibabacloud/dms-enterprise/model/CreateOrderRequest.h @@ -136,8 +134,6 @@ set(dms-enterprise_src src/Dms-enterpriseClient.cc src/model/ApproveOrderRequest.cc src/model/ApproveOrderResult.cc - src/model/CheckFinishMissionRequest.cc - src/model/CheckFinishMissionResult.cc src/model/CloseOrderRequest.cc src/model/CloseOrderResult.cc src/model/CreateOrderRequest.cc diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/Dms_enterpriseClient.h b/dms-enterprise/include/alibabacloud/dms-enterprise/Dms_enterpriseClient.h index 633428b1d..871c31355 100644 --- a/dms-enterprise/include/alibabacloud/dms-enterprise/Dms_enterpriseClient.h +++ b/dms-enterprise/include/alibabacloud/dms-enterprise/Dms_enterpriseClient.h @@ -24,8 +24,6 @@ #include "Dms_enterpriseExport.h" #include "model/ApproveOrderRequest.h" #include "model/ApproveOrderResult.h" -#include "model/CheckFinishMissionRequest.h" -#include "model/CheckFinishMissionResult.h" #include "model/CloseOrderRequest.h" #include "model/CloseOrderResult.h" #include "model/CreateOrderRequest.h" @@ -144,9 +142,6 @@ namespace AlibabaCloud typedef Outcome ApproveOrderOutcome; typedef std::future ApproveOrderOutcomeCallable; typedef std::function&)> ApproveOrderAsyncHandler; - typedef Outcome CheckFinishMissionOutcome; - typedef std::future CheckFinishMissionOutcomeCallable; - typedef std::function&)> CheckFinishMissionAsyncHandler; typedef Outcome CloseOrderOutcome; typedef std::future CloseOrderOutcomeCallable; typedef std::function&)> CloseOrderAsyncHandler; @@ -314,9 +309,6 @@ namespace AlibabaCloud ApproveOrderOutcome approveOrder(const Model::ApproveOrderRequest &request)const; void approveOrderAsync(const Model::ApproveOrderRequest& request, const ApproveOrderAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ApproveOrderOutcomeCallable approveOrderCallable(const Model::ApproveOrderRequest& request) const; - CheckFinishMissionOutcome checkFinishMission(const Model::CheckFinishMissionRequest &request)const; - void checkFinishMissionAsync(const Model::CheckFinishMissionRequest& request, const CheckFinishMissionAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; - CheckFinishMissionOutcomeCallable checkFinishMissionCallable(const Model::CheckFinishMissionRequest& request) const; CloseOrderOutcome closeOrder(const Model::CloseOrderRequest &request)const; void closeOrderAsync(const Model::CloseOrderRequest& request, const CloseOrderAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; CloseOrderOutcomeCallable closeOrderCallable(const Model::CloseOrderRequest& request) const; diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/model/CheckFinishMissionRequest.h b/dms-enterprise/include/alibabacloud/dms-enterprise/model/CheckFinishMissionRequest.h deleted file mode 100644 index 95037e6d4..000000000 --- a/dms-enterprise/include/alibabacloud/dms-enterprise/model/CheckFinishMissionRequest.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2009-2017 Alibaba Cloud All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef ALIBABACLOUD_DMS_ENTERPRISE_MODEL_CHECKFINISHMISSIONREQUEST_H_ -#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_CHECKFINISHMISSIONREQUEST_H_ - -#include -#include -#include -#include - -namespace AlibabaCloud -{ - namespace Dms_enterprise - { - namespace Model - { - class ALIBABACLOUD_DMS_ENTERPRISE_EXPORT CheckFinishMissionRequest : public RpcServiceRequest - { - - public: - CheckFinishMissionRequest(); - ~CheckFinishMissionRequest(); - - std::string getMissionType()const; - void setMissionType(const std::string& missionType); - - private: - std::string missionType_; - - }; - } - } -} -#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_CHECKFINISHMISSIONREQUEST_H_ \ No newline at end of file diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/model/CheckFinishMissionResult.h b/dms-enterprise/include/alibabacloud/dms-enterprise/model/CheckFinishMissionResult.h deleted file mode 100644 index d24840f23..000000000 --- a/dms-enterprise/include/alibabacloud/dms-enterprise/model/CheckFinishMissionResult.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2009-2017 Alibaba Cloud All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef ALIBABACLOUD_DMS_ENTERPRISE_MODEL_CHECKFINISHMISSIONRESULT_H_ -#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_CHECKFINISHMISSIONRESULT_H_ - -#include -#include -#include -#include -#include - -namespace AlibabaCloud -{ - namespace Dms_enterprise - { - namespace Model - { - class ALIBABACLOUD_DMS_ENTERPRISE_EXPORT CheckFinishMissionResult : public ServiceResult - { - public: - - - CheckFinishMissionResult(); - explicit CheckFinishMissionResult(const std::string &payload); - ~CheckFinishMissionResult(); - bool getHasFinish()const; - std::string getErrorCode()const; - std::string getErrorMessage()const; - bool getSuccess()const; - - protected: - void parse(const std::string &payload); - private: - bool hasFinish_; - std::string errorCode_; - std::string errorMessage_; - bool success_; - - }; - } - } -} -#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_CHECKFINISHMISSIONRESULT_H_ \ No newline at end of file diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/model/DeleteInstanceRequest.h b/dms-enterprise/include/alibabacloud/dms-enterprise/model/DeleteInstanceRequest.h index c416e15ae..3b5e7d069 100644 --- a/dms-enterprise/include/alibabacloud/dms-enterprise/model/DeleteInstanceRequest.h +++ b/dms-enterprise/include/alibabacloud/dms-enterprise/model/DeleteInstanceRequest.h @@ -35,20 +35,20 @@ namespace AlibabaCloud DeleteInstanceRequest(); ~DeleteInstanceRequest(); - int getPort()const; - void setPort(int port); - std::string getHost()const; - void setHost(const std::string& host); long getTid()const; void setTid(long tid); std::string getSid()const; void setSid(const std::string& sid); + int getPort()const; + void setPort(int port); + std::string getHost()const; + void setHost(const std::string& host); private: - int port_; - std::string host_; long tid_; std::string sid_; + int port_; + std::string host_; }; } diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/model/DeleteUserRequest.h b/dms-enterprise/include/alibabacloud/dms-enterprise/model/DeleteUserRequest.h index bb6226404..84155561d 100644 --- a/dms-enterprise/include/alibabacloud/dms-enterprise/model/DeleteUserRequest.h +++ b/dms-enterprise/include/alibabacloud/dms-enterprise/model/DeleteUserRequest.h @@ -35,13 +35,13 @@ namespace AlibabaCloud DeleteUserRequest(); ~DeleteUserRequest(); - long getUid()const; - void setUid(long uid); + std::string getUid()const; + void setUid(const std::string& uid); long getTid()const; void setTid(long tid); private: - long uid_; + std::string uid_; long tid_; }; diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/model/DisableUserRequest.h b/dms-enterprise/include/alibabacloud/dms-enterprise/model/DisableUserRequest.h index 1b4251164..de891b3d0 100644 --- a/dms-enterprise/include/alibabacloud/dms-enterprise/model/DisableUserRequest.h +++ b/dms-enterprise/include/alibabacloud/dms-enterprise/model/DisableUserRequest.h @@ -35,13 +35,13 @@ namespace AlibabaCloud DisableUserRequest(); ~DisableUserRequest(); - long getUid()const; - void setUid(long uid); + std::string getUid()const; + void setUid(const std::string& uid); long getTid()const; void setTid(long tid); private: - long uid_; + std::string uid_; long tid_; }; diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/model/EnableUserRequest.h b/dms-enterprise/include/alibabacloud/dms-enterprise/model/EnableUserRequest.h index a86fe2b8b..6b3035708 100644 --- a/dms-enterprise/include/alibabacloud/dms-enterprise/model/EnableUserRequest.h +++ b/dms-enterprise/include/alibabacloud/dms-enterprise/model/EnableUserRequest.h @@ -35,13 +35,13 @@ namespace AlibabaCloud EnableUserRequest(); ~EnableUserRequest(); - long getUid()const; - void setUid(long uid); + std::string getUid()const; + void setUid(const std::string& uid); long getTid()const; void setTid(long tid); private: - long uid_; + std::string uid_; long tid_; }; diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/model/GetInstanceRequest.h b/dms-enterprise/include/alibabacloud/dms-enterprise/model/GetInstanceRequest.h index 808cafbb9..8cbb9feb3 100644 --- a/dms-enterprise/include/alibabacloud/dms-enterprise/model/GetInstanceRequest.h +++ b/dms-enterprise/include/alibabacloud/dms-enterprise/model/GetInstanceRequest.h @@ -35,20 +35,20 @@ namespace AlibabaCloud GetInstanceRequest(); ~GetInstanceRequest(); - int getPort()const; - void setPort(int port); - std::string getHost()const; - void setHost(const std::string& host); long getTid()const; void setTid(long tid); std::string getSid()const; void setSid(const std::string& sid); + int getPort()const; + void setPort(int port); + std::string getHost()const; + void setHost(const std::string& host); private: - int port_; - std::string host_; long tid_; std::string sid_; + int port_; + std::string host_; }; } diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/model/GetInstanceResult.h b/dms-enterprise/include/alibabacloud/dms-enterprise/model/GetInstanceResult.h index ced881dca..9668461e8 100644 --- a/dms-enterprise/include/alibabacloud/dms-enterprise/model/GetInstanceResult.h +++ b/dms-enterprise/include/alibabacloud/dms-enterprise/model/GetInstanceResult.h @@ -51,10 +51,12 @@ namespace AlibabaCloud std::string state; std::string ecsRegion; std::string databaseUser; + std::vector ownerNameList; std::string instanceType; std::string dbaNickName; std::string dataLinkName; int queryTimeout; + std::vector ownerIdList; std::string safeRuleId; }; diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/model/GetUserRequest.h b/dms-enterprise/include/alibabacloud/dms-enterprise/model/GetUserRequest.h index 76e75ae71..c5c91d1f0 100644 --- a/dms-enterprise/include/alibabacloud/dms-enterprise/model/GetUserRequest.h +++ b/dms-enterprise/include/alibabacloud/dms-enterprise/model/GetUserRequest.h @@ -35,17 +35,17 @@ namespace AlibabaCloud GetUserRequest(); ~GetUserRequest(); - long getUid()const; - void setUid(long uid); std::string getUserId()const; void setUserId(const std::string& userId); long getTid()const; void setTid(long tid); + std::string getUid()const; + void setUid(const std::string& uid); private: - long uid_; std::string userId_; long tid_; + std::string uid_; }; } diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/model/GetUserResult.h b/dms-enterprise/include/alibabacloud/dms-enterprise/model/GetUserResult.h index fbbb56295..13499d4ed 100644 --- a/dms-enterprise/include/alibabacloud/dms-enterprise/model/GetUserResult.h +++ b/dms-enterprise/include/alibabacloud/dms-enterprise/model/GetUserResult.h @@ -38,7 +38,7 @@ namespace AlibabaCloud std::string nickName; std::string mobile; long maxExecuteCount; - long uid; + std::string uid; std::string lastLoginTime; long curResultCount; std::vector roleIdList; diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/model/ListInstancesResult.h b/dms-enterprise/include/alibabacloud/dms-enterprise/model/ListInstancesResult.h index f809c1d04..5d4c6d678 100644 --- a/dms-enterprise/include/alibabacloud/dms-enterprise/model/ListInstancesResult.h +++ b/dms-enterprise/include/alibabacloud/dms-enterprise/model/ListInstancesResult.h @@ -51,10 +51,12 @@ namespace AlibabaCloud std::string state; std::string ecsRegion; std::string databaseUser; + std::vector ownerNameList; std::string instanceType; std::string dbaNickName; std::string dataLinkName; int queryTimeout; + std::vector ownerIdList; std::string safeRuleId; }; diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/model/ListUsersRequest.h b/dms-enterprise/include/alibabacloud/dms-enterprise/model/ListUsersRequest.h index dc916357f..1be76988a 100644 --- a/dms-enterprise/include/alibabacloud/dms-enterprise/model/ListUsersRequest.h +++ b/dms-enterprise/include/alibabacloud/dms-enterprise/model/ListUsersRequest.h @@ -35,26 +35,26 @@ namespace AlibabaCloud ListUsersRequest(); ~ListUsersRequest(); - std::string getUserState()const; - void setUserState(const std::string& userState); std::string getRole()const; void setRole(const std::string& role); - int getPageSize()const; - void setPageSize(int pageSize); std::string getSearchKey()const; void setSearchKey(const std::string& searchKey); long getTid()const; void setTid(long tid); int getPageNumber()const; void setPageNumber(int pageNumber); + std::string getUserState()const; + void setUserState(const std::string& userState); + int getPageSize()const; + void setPageSize(int pageSize); private: - std::string userState_; std::string role_; - int pageSize_; std::string searchKey_; long tid_; int pageNumber_; + std::string userState_; + int pageSize_; }; } diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/model/ListUsersResult.h b/dms-enterprise/include/alibabacloud/dms-enterprise/model/ListUsersResult.h index 1c12d390d..85cd16513 100644 --- a/dms-enterprise/include/alibabacloud/dms-enterprise/model/ListUsersResult.h +++ b/dms-enterprise/include/alibabacloud/dms-enterprise/model/ListUsersResult.h @@ -38,7 +38,7 @@ namespace AlibabaCloud std::string nickName; std::string mobile; long maxExecuteCount; - long uid; + std::string uid; std::string lastLoginTime; long curResultCount; std::vector roleIdList; @@ -46,7 +46,7 @@ namespace AlibabaCloud std::string userId; std::string state; long curExecuteCount; - long parentUid; + std::string parentUid; }; diff --git a/dms-enterprise/include/alibabacloud/dms-enterprise/model/RegisterUserRequest.h b/dms-enterprise/include/alibabacloud/dms-enterprise/model/RegisterUserRequest.h index 496376539..f5593aebe 100644 --- a/dms-enterprise/include/alibabacloud/dms-enterprise/model/RegisterUserRequest.h +++ b/dms-enterprise/include/alibabacloud/dms-enterprise/model/RegisterUserRequest.h @@ -37,21 +37,21 @@ namespace AlibabaCloud std::string getRoleNames()const; void setRoleNames(const std::string& roleNames); - long getUid()const; - void setUid(long uid); std::string getUserNick()const; void setUserNick(const std::string& userNick); std::string getMobile()const; void setMobile(const std::string& mobile); long getTid()const; void setTid(long tid); + std::string getUid()const; + void setUid(const std::string& uid); private: std::string roleNames_; - long uid_; std::string userNick_; std::string mobile_; long tid_; + std::string uid_; }; } diff --git a/dms-enterprise/src/Dms-enterpriseClient.cc b/dms-enterprise/src/Dms-enterpriseClient.cc index 8b3c12233..2b9ee496f 100644 --- a/dms-enterprise/src/Dms-enterpriseClient.cc +++ b/dms-enterprise/src/Dms-enterpriseClient.cc @@ -87,42 +87,6 @@ Dms_enterpriseClient::ApproveOrderOutcomeCallable Dms_enterpriseClient::approveO return task->get_future(); } -Dms_enterpriseClient::CheckFinishMissionOutcome Dms_enterpriseClient::checkFinishMission(const CheckFinishMissionRequest &request) const -{ - auto endpointOutcome = endpointProvider_->getEndpoint(); - if (!endpointOutcome.isSuccess()) - return CheckFinishMissionOutcome(endpointOutcome.error()); - - auto outcome = makeRequest(endpointOutcome.result(), request); - - if (outcome.isSuccess()) - return CheckFinishMissionOutcome(CheckFinishMissionResult(outcome.result())); - else - return CheckFinishMissionOutcome(outcome.error()); -} - -void Dms_enterpriseClient::checkFinishMissionAsync(const CheckFinishMissionRequest& request, const CheckFinishMissionAsyncHandler& handler, const std::shared_ptr& context) const -{ - auto fn = [this, request, handler, context]() - { - handler(this, request, checkFinishMission(request), context); - }; - - asyncExecute(new Runnable(fn)); -} - -Dms_enterpriseClient::CheckFinishMissionOutcomeCallable Dms_enterpriseClient::checkFinishMissionCallable(const CheckFinishMissionRequest &request) const -{ - auto task = std::make_shared>( - [this, request]() - { - return this->checkFinishMission(request); - }); - - asyncExecute(new Runnable([task]() { (*task)(); })); - return task->get_future(); -} - Dms_enterpriseClient::CloseOrderOutcome Dms_enterpriseClient::closeOrder(const CloseOrderRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/dms-enterprise/src/model/CheckFinishMissionRequest.cc b/dms-enterprise/src/model/CheckFinishMissionRequest.cc deleted file mode 100644 index 47c830106..000000000 --- a/dms-enterprise/src/model/CheckFinishMissionRequest.cc +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2009-2017 Alibaba Cloud All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include - -using AlibabaCloud::Dms_enterprise::Model::CheckFinishMissionRequest; - -CheckFinishMissionRequest::CheckFinishMissionRequest() : - RpcServiceRequest("dms-enterprise", "2018-11-01", "CheckFinishMission") -{ - setMethod(HttpRequest::Method::Get); -} - -CheckFinishMissionRequest::~CheckFinishMissionRequest() -{} - -std::string CheckFinishMissionRequest::getMissionType()const -{ - return missionType_; -} - -void CheckFinishMissionRequest::setMissionType(const std::string& missionType) -{ - missionType_ = missionType; - setParameter("MissionType", missionType); -} - diff --git a/dms-enterprise/src/model/CheckFinishMissionResult.cc b/dms-enterprise/src/model/CheckFinishMissionResult.cc deleted file mode 100644 index 4fad2771e..000000000 --- a/dms-enterprise/src/model/CheckFinishMissionResult.cc +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright 2009-2017 Alibaba Cloud All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include - -using namespace AlibabaCloud::Dms_enterprise; -using namespace AlibabaCloud::Dms_enterprise::Model; - -CheckFinishMissionResult::CheckFinishMissionResult() : - ServiceResult() -{} - -CheckFinishMissionResult::CheckFinishMissionResult(const std::string &payload) : - ServiceResult() -{ - parse(payload); -} - -CheckFinishMissionResult::~CheckFinishMissionResult() -{} - -void CheckFinishMissionResult::parse(const std::string &payload) -{ - Json::Reader reader; - Json::Value value; - reader.parse(payload, value); - setRequestId(value["RequestId"].asString()); - if(!value["Success"].isNull()) - success_ = value["Success"].asString() == "true"; - if(!value["ErrorMessage"].isNull()) - errorMessage_ = value["ErrorMessage"].asString(); - if(!value["ErrorCode"].isNull()) - errorCode_ = value["ErrorCode"].asString(); - if(!value["HasFinish"].isNull()) - hasFinish_ = value["HasFinish"].asString() == "true"; - -} - -bool CheckFinishMissionResult::getHasFinish()const -{ - return hasFinish_; -} - -std::string CheckFinishMissionResult::getErrorCode()const -{ - return errorCode_; -} - -std::string CheckFinishMissionResult::getErrorMessage()const -{ - return errorMessage_; -} - -bool CheckFinishMissionResult::getSuccess()const -{ - return success_; -} - diff --git a/dms-enterprise/src/model/DeleteInstanceRequest.cc b/dms-enterprise/src/model/DeleteInstanceRequest.cc index f5ede0a0a..9da3b9e9d 100644 --- a/dms-enterprise/src/model/DeleteInstanceRequest.cc +++ b/dms-enterprise/src/model/DeleteInstanceRequest.cc @@ -27,28 +27,6 @@ DeleteInstanceRequest::DeleteInstanceRequest() : DeleteInstanceRequest::~DeleteInstanceRequest() {} -int DeleteInstanceRequest::getPort()const -{ - return port_; -} - -void DeleteInstanceRequest::setPort(int port) -{ - port_ = port; - setParameter("Port", std::to_string(port)); -} - -std::string DeleteInstanceRequest::getHost()const -{ - return host_; -} - -void DeleteInstanceRequest::setHost(const std::string& host) -{ - host_ = host; - setParameter("Host", host); -} - long DeleteInstanceRequest::getTid()const { return tid_; @@ -71,3 +49,25 @@ void DeleteInstanceRequest::setSid(const std::string& sid) setParameter("Sid", sid); } +int DeleteInstanceRequest::getPort()const +{ + return port_; +} + +void DeleteInstanceRequest::setPort(int port) +{ + port_ = port; + setParameter("Port", std::to_string(port)); +} + +std::string DeleteInstanceRequest::getHost()const +{ + return host_; +} + +void DeleteInstanceRequest::setHost(const std::string& host) +{ + host_ = host; + setParameter("Host", host); +} + diff --git a/dms-enterprise/src/model/DeleteUserRequest.cc b/dms-enterprise/src/model/DeleteUserRequest.cc index ef7556fad..bd99896ed 100644 --- a/dms-enterprise/src/model/DeleteUserRequest.cc +++ b/dms-enterprise/src/model/DeleteUserRequest.cc @@ -27,15 +27,15 @@ DeleteUserRequest::DeleteUserRequest() : DeleteUserRequest::~DeleteUserRequest() {} -long DeleteUserRequest::getUid()const +std::string DeleteUserRequest::getUid()const { return uid_; } -void DeleteUserRequest::setUid(long uid) +void DeleteUserRequest::setUid(const std::string& uid) { uid_ = uid; - setParameter("Uid", std::to_string(uid)); + setParameter("Uid", uid); } long DeleteUserRequest::getTid()const diff --git a/dms-enterprise/src/model/DisableUserRequest.cc b/dms-enterprise/src/model/DisableUserRequest.cc index f2cbcb0c1..b8a1d0f65 100644 --- a/dms-enterprise/src/model/DisableUserRequest.cc +++ b/dms-enterprise/src/model/DisableUserRequest.cc @@ -27,15 +27,15 @@ DisableUserRequest::DisableUserRequest() : DisableUserRequest::~DisableUserRequest() {} -long DisableUserRequest::getUid()const +std::string DisableUserRequest::getUid()const { return uid_; } -void DisableUserRequest::setUid(long uid) +void DisableUserRequest::setUid(const std::string& uid) { uid_ = uid; - setParameter("Uid", std::to_string(uid)); + setParameter("Uid", uid); } long DisableUserRequest::getTid()const diff --git a/dms-enterprise/src/model/EnableUserRequest.cc b/dms-enterprise/src/model/EnableUserRequest.cc index 1879d5d14..0c63ee5a4 100644 --- a/dms-enterprise/src/model/EnableUserRequest.cc +++ b/dms-enterprise/src/model/EnableUserRequest.cc @@ -27,15 +27,15 @@ EnableUserRequest::EnableUserRequest() : EnableUserRequest::~EnableUserRequest() {} -long EnableUserRequest::getUid()const +std::string EnableUserRequest::getUid()const { return uid_; } -void EnableUserRequest::setUid(long uid) +void EnableUserRequest::setUid(const std::string& uid) { uid_ = uid; - setParameter("Uid", std::to_string(uid)); + setParameter("Uid", uid); } long EnableUserRequest::getTid()const diff --git a/dms-enterprise/src/model/GetInstanceRequest.cc b/dms-enterprise/src/model/GetInstanceRequest.cc index cabe08ef6..fb8e595a4 100644 --- a/dms-enterprise/src/model/GetInstanceRequest.cc +++ b/dms-enterprise/src/model/GetInstanceRequest.cc @@ -27,28 +27,6 @@ GetInstanceRequest::GetInstanceRequest() : GetInstanceRequest::~GetInstanceRequest() {} -int GetInstanceRequest::getPort()const -{ - return port_; -} - -void GetInstanceRequest::setPort(int port) -{ - port_ = port; - setParameter("Port", std::to_string(port)); -} - -std::string GetInstanceRequest::getHost()const -{ - return host_; -} - -void GetInstanceRequest::setHost(const std::string& host) -{ - host_ = host; - setParameter("Host", host); -} - long GetInstanceRequest::getTid()const { return tid_; @@ -71,3 +49,25 @@ void GetInstanceRequest::setSid(const std::string& sid) setParameter("Sid", sid); } +int GetInstanceRequest::getPort()const +{ + return port_; +} + +void GetInstanceRequest::setPort(int port) +{ + port_ = port; + setParameter("Port", std::to_string(port)); +} + +std::string GetInstanceRequest::getHost()const +{ + return host_; +} + +void GetInstanceRequest::setHost(const std::string& host) +{ + host_ = host; + setParameter("Host", host); +} + diff --git a/dms-enterprise/src/model/GetInstanceResult.cc b/dms-enterprise/src/model/GetInstanceResult.cc index cbd9d0ae0..fd1ebaa6f 100644 --- a/dms-enterprise/src/model/GetInstanceResult.cc +++ b/dms-enterprise/src/model/GetInstanceResult.cc @@ -84,6 +84,12 @@ void GetInstanceResult::parse(const std::string &payload) instance_.databasePassword = instanceNode["DatabasePassword"].asString(); if(!instanceNode["InstanceSource"].isNull()) instance_.instanceSource = instanceNode["InstanceSource"].asString(); + auto allOwnerIdList = instanceNode["OwnerIdList"]["OwnerIds"]; + for (auto value : allOwnerIdList) + instance_.ownerIdList.push_back(value.asString()); + auto allOwnerNameList = instanceNode["OwnerNameList"]["OwnerNames"]; + for (auto value : allOwnerNameList) + instance_.ownerNameList.push_back(value.asString()); if(!value["Success"].isNull()) success_ = value["Success"].asString() == "true"; if(!value["ErrorMessage"].isNull()) diff --git a/dms-enterprise/src/model/GetTableDBTopologyResult.cc b/dms-enterprise/src/model/GetTableDBTopologyResult.cc index 7ec970598..c7e4c128c 100644 --- a/dms-enterprise/src/model/GetTableDBTopologyResult.cc +++ b/dms-enterprise/src/model/GetTableDBTopologyResult.cc @@ -56,28 +56,28 @@ void GetTableDBTopologyResult::parse(const std::string &payload) dataSourceObject.dbType = dBTopologyNodeDataSourceListDataSource["DbType"].asString(); if(!dBTopologyNodeDataSourceListDataSource["Sid"].isNull()) dataSourceObject.sid = dBTopologyNodeDataSourceListDataSource["Sid"].asString(); - auto allDatabaseListNode = allDataSourceListNode["DatabaseList"]["Database"]; - for (auto allDataSourceListNodeDatabaseListDatabase : allDatabaseListNode) + auto allDatabaseListNode = dBTopologyNodeDataSourceListDataSource["DatabaseList"]["Database"]; + for (auto dBTopologyNodeDataSourceListDataSourceDatabaseListDatabase : allDatabaseListNode) { DBTopology::DataSource::Database databaseListObject; - if(!allDataSourceListNodeDatabaseListDatabase["DbName"].isNull()) - databaseListObject.dbName = allDataSourceListNodeDatabaseListDatabase["DbName"].asString(); - if(!allDataSourceListNodeDatabaseListDatabase["DbId"].isNull()) - databaseListObject.dbId = allDataSourceListNodeDatabaseListDatabase["DbId"].asString(); - if(!allDataSourceListNodeDatabaseListDatabase["EnvType"].isNull()) - databaseListObject.envType = allDataSourceListNodeDatabaseListDatabase["EnvType"].asString(); - if(!allDataSourceListNodeDatabaseListDatabase["DbType"].isNull()) - databaseListObject.dbType = allDataSourceListNodeDatabaseListDatabase["DbType"].asString(); - auto allTableListNode = allDatabaseListNode["TableList"]["Table"]; - for (auto allDatabaseListNodeTableListTable : allTableListNode) + if(!dBTopologyNodeDataSourceListDataSourceDatabaseListDatabase["DbName"].isNull()) + databaseListObject.dbName = dBTopologyNodeDataSourceListDataSourceDatabaseListDatabase["DbName"].asString(); + if(!dBTopologyNodeDataSourceListDataSourceDatabaseListDatabase["DbId"].isNull()) + databaseListObject.dbId = dBTopologyNodeDataSourceListDataSourceDatabaseListDatabase["DbId"].asString(); + if(!dBTopologyNodeDataSourceListDataSourceDatabaseListDatabase["EnvType"].isNull()) + databaseListObject.envType = dBTopologyNodeDataSourceListDataSourceDatabaseListDatabase["EnvType"].asString(); + if(!dBTopologyNodeDataSourceListDataSourceDatabaseListDatabase["DbType"].isNull()) + databaseListObject.dbType = dBTopologyNodeDataSourceListDataSourceDatabaseListDatabase["DbType"].asString(); + auto allTableListNode = dBTopologyNodeDataSourceListDataSourceDatabaseListDatabase["TableList"]["Table"]; + for (auto dBTopologyNodeDataSourceListDataSourceDatabaseListDatabaseTableListTable : allTableListNode) { DBTopology::DataSource::Database::Table tableListObject; - if(!allDatabaseListNodeTableListTable["TableName"].isNull()) - tableListObject.tableName = allDatabaseListNodeTableListTable["TableName"].asString(); - if(!allDatabaseListNodeTableListTable["TableId"].isNull()) - tableListObject.tableId = allDatabaseListNodeTableListTable["TableId"].asString(); - if(!allDatabaseListNodeTableListTable["TableType"].isNull()) - tableListObject.tableType = allDatabaseListNodeTableListTable["TableType"].asString(); + if(!dBTopologyNodeDataSourceListDataSourceDatabaseListDatabaseTableListTable["TableName"].isNull()) + tableListObject.tableName = dBTopologyNodeDataSourceListDataSourceDatabaseListDatabaseTableListTable["TableName"].asString(); + if(!dBTopologyNodeDataSourceListDataSourceDatabaseListDatabaseTableListTable["TableId"].isNull()) + tableListObject.tableId = dBTopologyNodeDataSourceListDataSourceDatabaseListDatabaseTableListTable["TableId"].asString(); + if(!dBTopologyNodeDataSourceListDataSourceDatabaseListDatabaseTableListTable["TableType"].isNull()) + tableListObject.tableType = dBTopologyNodeDataSourceListDataSourceDatabaseListDatabaseTableListTable["TableType"].asString(); databaseListObject.tableList.push_back(tableListObject); } dataSourceObject.databaseList.push_back(databaseListObject); diff --git a/dms-enterprise/src/model/GetUserRequest.cc b/dms-enterprise/src/model/GetUserRequest.cc index c4c48b6de..179154c27 100644 --- a/dms-enterprise/src/model/GetUserRequest.cc +++ b/dms-enterprise/src/model/GetUserRequest.cc @@ -27,17 +27,6 @@ GetUserRequest::GetUserRequest() : GetUserRequest::~GetUserRequest() {} -long GetUserRequest::getUid()const -{ - return uid_; -} - -void GetUserRequest::setUid(long uid) -{ - uid_ = uid; - setParameter("Uid", std::to_string(uid)); -} - std::string GetUserRequest::getUserId()const { return userId_; @@ -60,3 +49,14 @@ void GetUserRequest::setTid(long tid) setParameter("Tid", std::to_string(tid)); } +std::string GetUserRequest::getUid()const +{ + return uid_; +} + +void GetUserRequest::setUid(const std::string& uid) +{ + uid_ = uid; + setParameter("Uid", uid); +} + diff --git a/dms-enterprise/src/model/GetUserResult.cc b/dms-enterprise/src/model/GetUserResult.cc index 229d591c1..f4d1063dd 100644 --- a/dms-enterprise/src/model/GetUserResult.cc +++ b/dms-enterprise/src/model/GetUserResult.cc @@ -43,7 +43,7 @@ void GetUserResult::parse(const std::string &payload) if(!userNode["UserId"].isNull()) user_.userId = userNode["UserId"].asString(); if(!userNode["Uid"].isNull()) - user_.uid = std::stol(userNode["Uid"].asString()); + user_.uid = userNode["Uid"].asString(); if(!userNode["NickName"].isNull()) user_.nickName = userNode["NickName"].asString(); if(!userNode["Mobile"].isNull()) diff --git a/dms-enterprise/src/model/ListDatabaseUserPermssionsResult.cc b/dms-enterprise/src/model/ListDatabaseUserPermssionsResult.cc index b25df518d..0665b41aa 100644 --- a/dms-enterprise/src/model/ListDatabaseUserPermssionsResult.cc +++ b/dms-enterprise/src/model/ListDatabaseUserPermssionsResult.cc @@ -71,22 +71,22 @@ void ListDatabaseUserPermssionsResult::parse(const std::string &payload) userPermissionsObject.tableId = valueUserPermissionsUserPermission["TableId"].asString(); if(!valueUserPermissionsUserPermission["ColumnName"].isNull()) userPermissionsObject.columnName = valueUserPermissionsUserPermission["ColumnName"].asString(); - auto allPermDetailsNode = allUserPermissionsNode["PermDetails"]["PermDetail"]; - for (auto allUserPermissionsNodePermDetailsPermDetail : allPermDetailsNode) + auto allPermDetailsNode = valueUserPermissionsUserPermission["PermDetails"]["PermDetail"]; + for (auto valueUserPermissionsUserPermissionPermDetailsPermDetail : allPermDetailsNode) { UserPermission::PermDetail permDetailsObject; - if(!allUserPermissionsNodePermDetailsPermDetail["PermType"].isNull()) - permDetailsObject.permType = allUserPermissionsNodePermDetailsPermDetail["PermType"].asString(); - if(!allUserPermissionsNodePermDetailsPermDetail["ExpireDate"].isNull()) - permDetailsObject.expireDate = allUserPermissionsNodePermDetailsPermDetail["ExpireDate"].asString(); - if(!allUserPermissionsNodePermDetailsPermDetail["CreateDate"].isNull()) - permDetailsObject.createDate = allUserPermissionsNodePermDetailsPermDetail["CreateDate"].asString(); - if(!allUserPermissionsNodePermDetailsPermDetail["OriginFrom"].isNull()) - permDetailsObject.originFrom = allUserPermissionsNodePermDetailsPermDetail["OriginFrom"].asString(); - if(!allUserPermissionsNodePermDetailsPermDetail["UserAccessId"].isNull()) - permDetailsObject.userAccessId = allUserPermissionsNodePermDetailsPermDetail["UserAccessId"].asString(); - if(!allUserPermissionsNodePermDetailsPermDetail["ExtraData"].isNull()) - permDetailsObject.extraData = allUserPermissionsNodePermDetailsPermDetail["ExtraData"].asString(); + if(!valueUserPermissionsUserPermissionPermDetailsPermDetail["PermType"].isNull()) + permDetailsObject.permType = valueUserPermissionsUserPermissionPermDetailsPermDetail["PermType"].asString(); + if(!valueUserPermissionsUserPermissionPermDetailsPermDetail["ExpireDate"].isNull()) + permDetailsObject.expireDate = valueUserPermissionsUserPermissionPermDetailsPermDetail["ExpireDate"].asString(); + if(!valueUserPermissionsUserPermissionPermDetailsPermDetail["CreateDate"].isNull()) + permDetailsObject.createDate = valueUserPermissionsUserPermissionPermDetailsPermDetail["CreateDate"].asString(); + if(!valueUserPermissionsUserPermissionPermDetailsPermDetail["OriginFrom"].isNull()) + permDetailsObject.originFrom = valueUserPermissionsUserPermissionPermDetailsPermDetail["OriginFrom"].asString(); + if(!valueUserPermissionsUserPermissionPermDetailsPermDetail["UserAccessId"].isNull()) + permDetailsObject.userAccessId = valueUserPermissionsUserPermissionPermDetailsPermDetail["UserAccessId"].asString(); + if(!valueUserPermissionsUserPermissionPermDetailsPermDetail["ExtraData"].isNull()) + permDetailsObject.extraData = valueUserPermissionsUserPermissionPermDetailsPermDetail["ExtraData"].asString(); userPermissionsObject.permDetails.push_back(permDetailsObject); } userPermissions_.push_back(userPermissionsObject); diff --git a/dms-enterprise/src/model/ListInstancesResult.cc b/dms-enterprise/src/model/ListInstancesResult.cc index dabc08035..662045844 100644 --- a/dms-enterprise/src/model/ListInstancesResult.cc +++ b/dms-enterprise/src/model/ListInstancesResult.cc @@ -87,6 +87,12 @@ void ListInstancesResult::parse(const std::string &payload) instanceListObject.databasePassword = valueInstanceListInstance["DatabasePassword"].asString(); if(!valueInstanceListInstance["InstanceSource"].isNull()) instanceListObject.instanceSource = valueInstanceListInstance["InstanceSource"].asString(); + auto allOwnerIdList = value["OwnerIdList"]["OwnerIds"]; + for (auto value : allOwnerIdList) + instanceListObject.ownerIdList.push_back(value.asString()); + auto allOwnerNameList = value["OwnerNameList"]["OwnerNames"]; + for (auto value : allOwnerNameList) + instanceListObject.ownerNameList.push_back(value.asString()); instanceList_.push_back(instanceListObject); } if(!value["Success"].isNull()) diff --git a/dms-enterprise/src/model/ListUserPermissionsResult.cc b/dms-enterprise/src/model/ListUserPermissionsResult.cc index dbb1fcf3c..00ca18d8d 100644 --- a/dms-enterprise/src/model/ListUserPermissionsResult.cc +++ b/dms-enterprise/src/model/ListUserPermissionsResult.cc @@ -71,22 +71,22 @@ void ListUserPermissionsResult::parse(const std::string &payload) userPermissionsObject.tableId = valueUserPermissionsUserPermission["TableId"].asString(); if(!valueUserPermissionsUserPermission["ColumnName"].isNull()) userPermissionsObject.columnName = valueUserPermissionsUserPermission["ColumnName"].asString(); - auto allPermDetailsNode = allUserPermissionsNode["PermDetails"]["PermDetail"]; - for (auto allUserPermissionsNodePermDetailsPermDetail : allPermDetailsNode) + auto allPermDetailsNode = valueUserPermissionsUserPermission["PermDetails"]["PermDetail"]; + for (auto valueUserPermissionsUserPermissionPermDetailsPermDetail : allPermDetailsNode) { UserPermission::PermDetail permDetailsObject; - if(!allUserPermissionsNodePermDetailsPermDetail["PermType"].isNull()) - permDetailsObject.permType = allUserPermissionsNodePermDetailsPermDetail["PermType"].asString(); - if(!allUserPermissionsNodePermDetailsPermDetail["ExpireDate"].isNull()) - permDetailsObject.expireDate = allUserPermissionsNodePermDetailsPermDetail["ExpireDate"].asString(); - if(!allUserPermissionsNodePermDetailsPermDetail["CreateDate"].isNull()) - permDetailsObject.createDate = allUserPermissionsNodePermDetailsPermDetail["CreateDate"].asString(); - if(!allUserPermissionsNodePermDetailsPermDetail["OriginFrom"].isNull()) - permDetailsObject.originFrom = allUserPermissionsNodePermDetailsPermDetail["OriginFrom"].asString(); - if(!allUserPermissionsNodePermDetailsPermDetail["UserAccessId"].isNull()) - permDetailsObject.userAccessId = allUserPermissionsNodePermDetailsPermDetail["UserAccessId"].asString(); - if(!allUserPermissionsNodePermDetailsPermDetail["ExtraData"].isNull()) - permDetailsObject.extraData = allUserPermissionsNodePermDetailsPermDetail["ExtraData"].asString(); + if(!valueUserPermissionsUserPermissionPermDetailsPermDetail["PermType"].isNull()) + permDetailsObject.permType = valueUserPermissionsUserPermissionPermDetailsPermDetail["PermType"].asString(); + if(!valueUserPermissionsUserPermissionPermDetailsPermDetail["ExpireDate"].isNull()) + permDetailsObject.expireDate = valueUserPermissionsUserPermissionPermDetailsPermDetail["ExpireDate"].asString(); + if(!valueUserPermissionsUserPermissionPermDetailsPermDetail["CreateDate"].isNull()) + permDetailsObject.createDate = valueUserPermissionsUserPermissionPermDetailsPermDetail["CreateDate"].asString(); + if(!valueUserPermissionsUserPermissionPermDetailsPermDetail["OriginFrom"].isNull()) + permDetailsObject.originFrom = valueUserPermissionsUserPermissionPermDetailsPermDetail["OriginFrom"].asString(); + if(!valueUserPermissionsUserPermissionPermDetailsPermDetail["UserAccessId"].isNull()) + permDetailsObject.userAccessId = valueUserPermissionsUserPermissionPermDetailsPermDetail["UserAccessId"].asString(); + if(!valueUserPermissionsUserPermissionPermDetailsPermDetail["ExtraData"].isNull()) + permDetailsObject.extraData = valueUserPermissionsUserPermissionPermDetailsPermDetail["ExtraData"].asString(); userPermissionsObject.permDetails.push_back(permDetailsObject); } userPermissions_.push_back(userPermissionsObject); diff --git a/dms-enterprise/src/model/ListUsersRequest.cc b/dms-enterprise/src/model/ListUsersRequest.cc index 0201a07bb..9233e58f7 100644 --- a/dms-enterprise/src/model/ListUsersRequest.cc +++ b/dms-enterprise/src/model/ListUsersRequest.cc @@ -27,17 +27,6 @@ ListUsersRequest::ListUsersRequest() : ListUsersRequest::~ListUsersRequest() {} -std::string ListUsersRequest::getUserState()const -{ - return userState_; -} - -void ListUsersRequest::setUserState(const std::string& userState) -{ - userState_ = userState; - setParameter("UserState", userState); -} - std::string ListUsersRequest::getRole()const { return role_; @@ -49,17 +38,6 @@ void ListUsersRequest::setRole(const std::string& role) setParameter("Role", role); } -int ListUsersRequest::getPageSize()const -{ - return pageSize_; -} - -void ListUsersRequest::setPageSize(int pageSize) -{ - pageSize_ = pageSize; - setParameter("PageSize", std::to_string(pageSize)); -} - std::string ListUsersRequest::getSearchKey()const { return searchKey_; @@ -93,3 +71,25 @@ void ListUsersRequest::setPageNumber(int pageNumber) setParameter("PageNumber", std::to_string(pageNumber)); } +std::string ListUsersRequest::getUserState()const +{ + return userState_; +} + +void ListUsersRequest::setUserState(const std::string& userState) +{ + userState_ = userState; + setParameter("UserState", userState); +} + +int ListUsersRequest::getPageSize()const +{ + return pageSize_; +} + +void ListUsersRequest::setPageSize(int pageSize) +{ + pageSize_ = pageSize; + setParameter("PageSize", std::to_string(pageSize)); +} + diff --git a/dms-enterprise/src/model/ListUsersResult.cc b/dms-enterprise/src/model/ListUsersResult.cc index abf77ea4a..e17626e93 100644 --- a/dms-enterprise/src/model/ListUsersResult.cc +++ b/dms-enterprise/src/model/ListUsersResult.cc @@ -46,13 +46,13 @@ void ListUsersResult::parse(const std::string &payload) if(!valueUserListUser["UserId"].isNull()) userListObject.userId = valueUserListUser["UserId"].asString(); if(!valueUserListUser["Uid"].isNull()) - userListObject.uid = std::stol(valueUserListUser["Uid"].asString()); + userListObject.uid = valueUserListUser["Uid"].asString(); if(!valueUserListUser["NickName"].isNull()) userListObject.nickName = valueUserListUser["NickName"].asString(); if(!valueUserListUser["Mobile"].isNull()) userListObject.mobile = valueUserListUser["Mobile"].asString(); if(!valueUserListUser["ParentUid"].isNull()) - userListObject.parentUid = std::stol(valueUserListUser["ParentUid"].asString()); + userListObject.parentUid = valueUserListUser["ParentUid"].asString(); if(!valueUserListUser["State"].isNull()) userListObject.state = valueUserListUser["State"].asString(); if(!valueUserListUser["LastLoginTime"].isNull()) diff --git a/dms-enterprise/src/model/ListWorkFlowNodesResult.cc b/dms-enterprise/src/model/ListWorkFlowNodesResult.cc index 9b7bfe839..c777012a2 100644 --- a/dms-enterprise/src/model/ListWorkFlowNodesResult.cc +++ b/dms-enterprise/src/model/ListWorkFlowNodesResult.cc @@ -55,16 +55,16 @@ void ListWorkFlowNodesResult::parse(const std::string &payload) workflowNodesObject.createUserId = std::stol(valueWorkflowNodesWorkflowNode["CreateUserId"].asString()); if(!valueWorkflowNodesWorkflowNode["CreateUserNickName"].isNull()) workflowNodesObject.createUserNickName = valueWorkflowNodesWorkflowNode["CreateUserNickName"].asString(); - auto allAuditUsersNode = allWorkflowNodesNode["AuditUsers"]["AuditUser"]; - for (auto allWorkflowNodesNodeAuditUsersAuditUser : allAuditUsersNode) + auto allAuditUsersNode = valueWorkflowNodesWorkflowNode["AuditUsers"]["AuditUser"]; + for (auto valueWorkflowNodesWorkflowNodeAuditUsersAuditUser : allAuditUsersNode) { WorkflowNode::AuditUser auditUsersObject; - if(!allWorkflowNodesNodeAuditUsersAuditUser["UserId"].isNull()) - auditUsersObject.userId = std::stol(allWorkflowNodesNodeAuditUsersAuditUser["UserId"].asString()); - if(!allWorkflowNodesNodeAuditUsersAuditUser["NickName"].isNull()) - auditUsersObject.nickName = allWorkflowNodesNodeAuditUsersAuditUser["NickName"].asString(); - if(!allWorkflowNodesNodeAuditUsersAuditUser["RealName"].isNull()) - auditUsersObject.realName = allWorkflowNodesNodeAuditUsersAuditUser["RealName"].asString(); + if(!valueWorkflowNodesWorkflowNodeAuditUsersAuditUser["UserId"].isNull()) + auditUsersObject.userId = std::stol(valueWorkflowNodesWorkflowNodeAuditUsersAuditUser["UserId"].asString()); + if(!valueWorkflowNodesWorkflowNodeAuditUsersAuditUser["NickName"].isNull()) + auditUsersObject.nickName = valueWorkflowNodesWorkflowNodeAuditUsersAuditUser["NickName"].asString(); + if(!valueWorkflowNodesWorkflowNodeAuditUsersAuditUser["RealName"].isNull()) + auditUsersObject.realName = valueWorkflowNodesWorkflowNodeAuditUsersAuditUser["RealName"].asString(); workflowNodesObject.auditUsers.push_back(auditUsersObject); } workflowNodes_.push_back(workflowNodesObject); diff --git a/dms-enterprise/src/model/ListWorkFlowTemplatesResult.cc b/dms-enterprise/src/model/ListWorkFlowTemplatesResult.cc index d79bf5ecf..0c607e4e5 100644 --- a/dms-enterprise/src/model/ListWorkFlowTemplatesResult.cc +++ b/dms-enterprise/src/model/ListWorkFlowTemplatesResult.cc @@ -55,24 +55,24 @@ void ListWorkFlowTemplatesResult::parse(const std::string &payload) workFlowTemplatesObject.enabled = valueWorkFlowTemplatesWorkFlowTemplate["Enabled"].asString(); if(!valueWorkFlowTemplatesWorkFlowTemplate["CreateUserId"].isNull()) workFlowTemplatesObject.createUserId = std::stol(valueWorkFlowTemplatesWorkFlowTemplate["CreateUserId"].asString()); - auto allWorkflowNodesNode = allWorkFlowTemplatesNode["WorkflowNodes"]["WorkflowNode"]; - for (auto allWorkFlowTemplatesNodeWorkflowNodesWorkflowNode : allWorkflowNodesNode) + auto allWorkflowNodesNode = valueWorkFlowTemplatesWorkFlowTemplate["WorkflowNodes"]["WorkflowNode"]; + for (auto valueWorkFlowTemplatesWorkFlowTemplateWorkflowNodesWorkflowNode : allWorkflowNodesNode) { WorkFlowTemplate::WorkflowNode workflowNodesObject; - if(!allWorkFlowTemplatesNodeWorkflowNodesWorkflowNode["NodeId"].isNull()) - workflowNodesObject.nodeId = std::stol(allWorkFlowTemplatesNodeWorkflowNodesWorkflowNode["NodeId"].asString()); - if(!allWorkFlowTemplatesNodeWorkflowNodesWorkflowNode["TemplateId"].isNull()) - workflowNodesObject.templateId = std::stol(allWorkFlowTemplatesNodeWorkflowNodesWorkflowNode["TemplateId"].asString()); - if(!allWorkFlowTemplatesNodeWorkflowNodesWorkflowNode["NodeName"].isNull()) - workflowNodesObject.nodeName = allWorkFlowTemplatesNodeWorkflowNodesWorkflowNode["NodeName"].asString(); - if(!allWorkFlowTemplatesNodeWorkflowNodesWorkflowNode["NodeType"].isNull()) - workflowNodesObject.nodeType = allWorkFlowTemplatesNodeWorkflowNodesWorkflowNode["NodeType"].asString(); - if(!allWorkFlowTemplatesNodeWorkflowNodesWorkflowNode["Comment"].isNull()) - workflowNodesObject.comment = allWorkFlowTemplatesNodeWorkflowNodesWorkflowNode["Comment"].asString(); - if(!allWorkFlowTemplatesNodeWorkflowNodesWorkflowNode["Position"].isNull()) - workflowNodesObject.position = std::stoi(allWorkFlowTemplatesNodeWorkflowNodesWorkflowNode["Position"].asString()); - if(!allWorkFlowTemplatesNodeWorkflowNodesWorkflowNode["CreateUserId"].isNull()) - workflowNodesObject.createUserId = std::stol(allWorkFlowTemplatesNodeWorkflowNodesWorkflowNode["CreateUserId"].asString()); + if(!valueWorkFlowTemplatesWorkFlowTemplateWorkflowNodesWorkflowNode["NodeId"].isNull()) + workflowNodesObject.nodeId = std::stol(valueWorkFlowTemplatesWorkFlowTemplateWorkflowNodesWorkflowNode["NodeId"].asString()); + if(!valueWorkFlowTemplatesWorkFlowTemplateWorkflowNodesWorkflowNode["TemplateId"].isNull()) + workflowNodesObject.templateId = std::stol(valueWorkFlowTemplatesWorkFlowTemplateWorkflowNodesWorkflowNode["TemplateId"].asString()); + if(!valueWorkFlowTemplatesWorkFlowTemplateWorkflowNodesWorkflowNode["NodeName"].isNull()) + workflowNodesObject.nodeName = valueWorkFlowTemplatesWorkFlowTemplateWorkflowNodesWorkflowNode["NodeName"].asString(); + if(!valueWorkFlowTemplatesWorkFlowTemplateWorkflowNodesWorkflowNode["NodeType"].isNull()) + workflowNodesObject.nodeType = valueWorkFlowTemplatesWorkFlowTemplateWorkflowNodesWorkflowNode["NodeType"].asString(); + if(!valueWorkFlowTemplatesWorkFlowTemplateWorkflowNodesWorkflowNode["Comment"].isNull()) + workflowNodesObject.comment = valueWorkFlowTemplatesWorkFlowTemplateWorkflowNodesWorkflowNode["Comment"].asString(); + if(!valueWorkFlowTemplatesWorkFlowTemplateWorkflowNodesWorkflowNode["Position"].isNull()) + workflowNodesObject.position = std::stoi(valueWorkFlowTemplatesWorkFlowTemplateWorkflowNodesWorkflowNode["Position"].asString()); + if(!valueWorkFlowTemplatesWorkFlowTemplateWorkflowNodesWorkflowNode["CreateUserId"].isNull()) + workflowNodesObject.createUserId = std::stol(valueWorkFlowTemplatesWorkFlowTemplateWorkflowNodesWorkflowNode["CreateUserId"].asString()); workFlowTemplatesObject.workflowNodes.push_back(workflowNodesObject); } workFlowTemplates_.push_back(workFlowTemplatesObject); diff --git a/dms-enterprise/src/model/RegisterUserRequest.cc b/dms-enterprise/src/model/RegisterUserRequest.cc index 9440c1383..62100cbf2 100644 --- a/dms-enterprise/src/model/RegisterUserRequest.cc +++ b/dms-enterprise/src/model/RegisterUserRequest.cc @@ -38,17 +38,6 @@ void RegisterUserRequest::setRoleNames(const std::string& roleNames) setParameter("RoleNames", roleNames); } -long RegisterUserRequest::getUid()const -{ - return uid_; -} - -void RegisterUserRequest::setUid(long uid) -{ - uid_ = uid; - setParameter("Uid", std::to_string(uid)); -} - std::string RegisterUserRequest::getUserNick()const { return userNick_; @@ -82,3 +71,14 @@ void RegisterUserRequest::setTid(long tid) setParameter("Tid", std::to_string(tid)); } +std::string RegisterUserRequest::getUid()const +{ + return uid_; +} + +void RegisterUserRequest::setUid(const std::string& uid) +{ + uid_ = uid; + setParameter("Uid", uid); +} +