| | |
| | | */
|
| | | class VssDomainUnitTblController : public VssBaseController {
|
| | | private:
|
| | | /** 创建一级设备表构造函数 */
|
| | | VssDomainUnitTblController() {}
|
| | | /** 创建一级设备表构造函数 */
|
| | | VssDomainUnitTblController() {}
|
| | | public:
|
| | | /** 创建一级设备表单例模式 */
|
| | | /** 创建一级设备表单例模式 */
|
| | | static VssDomainUnitTblController* instance() {
|
| | | static VssDomainUnitTblController instance;
|
| | | return &instance;
|
| | | }
|
| | | public:
|
| | | /** 注册{label}http服务 */
|
| | | /** 注册{label}http服务 */
|
| | | void registerHttpServices(HttpSrvRetRecieve& _HttpSrvRetRecieve) {
|
| | |
|
| | | _HttpSrvRetRecieve.setInfo("^/addVssDomainUnitTbl$", "POST",
|
| | | std::bind(&VssDomainUnitTblController::addVssDomainUnitTbl, this,
|
| | | std::placeholders::_1, std::placeholders::_2,
|
| | | std::placeholders::_3, std::placeholders::_4));
|
| | | |
| | | _HttpSrvRetRecieve.setInfo("^/delVssDomainUnitTbl$", "POST",
|
| | | std::bind(&VssDomainUnitTblController::delVssDomainUnitTbl, this,
|
| | | std::placeholders::_1, std::placeholders::_2,
|
| | | std::placeholders::_3, std::placeholders::_4));
|
| | | |
| | | _HttpSrvRetRecieve.setInfo("^/updateVssDomainUnitTbl$", "POST",
|
| | | std::bind(&VssDomainUnitTblController::updateVssDomainUnitTbl, this,
|
| | | std::placeholders::_1, std::placeholders::_2,
|
| | | std::placeholders::_3, std::placeholders::_4));
|
| | | |
| | | _HttpSrvRetRecieve.setInfo("^/findVssDomainUnitTbl$", "POST",
|
| | | std::bind(&VssDomainUnitTblController::findVssDomainUnitTbl, this,
|
| | | std::placeholders::_1, std::placeholders::_2,
|
| | | std::placeholders::_3, std::placeholders::_4));
|
| | | |
| | | _HttpSrvRetRecieve.setInfo("^/findVssDomainUnitTblList$", "POST",
|
| | | std::bind(&VssDomainUnitTblController::findVssDomainUnitTblList, this,
|
| | | std::placeholders::_1, std::placeholders::_2,
|
| | | std::placeholders::_3, std::placeholders::_4));
|
| | | _HttpSrvRetRecieve.setInfo("^/addVssDomainUnitTbl$", "POST",
|
| | | std::bind(&VssDomainUnitTblController::addVssDomainUnitTbl, this,
|
| | | std::placeholders::_1, std::placeholders::_2,
|
| | | std::placeholders::_3, std::placeholders::_4));
|
| | |
|
| | | _HttpSrvRetRecieve.setInfo("^/delVssDomainUnitTbl$", "POST",
|
| | | std::bind(&VssDomainUnitTblController::delVssDomainUnitTbl, this,
|
| | | std::placeholders::_1, std::placeholders::_2,
|
| | | std::placeholders::_3, std::placeholders::_4));
|
| | |
|
| | | _HttpSrvRetRecieve.setInfo("^/updateVssDomainUnitTbl$", "POST",
|
| | | std::bind(&VssDomainUnitTblController::updateVssDomainUnitTbl, this,
|
| | | std::placeholders::_1, std::placeholders::_2,
|
| | | std::placeholders::_3, std::placeholders::_4));
|
| | |
|
| | | _HttpSrvRetRecieve.setInfo("^/findVssDomainUnitTbl$", "POST",
|
| | | std::bind(&VssDomainUnitTblController::findVssDomainUnitTbl, this,
|
| | | std::placeholders::_1, std::placeholders::_2,
|
| | | std::placeholders::_3, std::placeholders::_4));
|
| | |
|
| | | _HttpSrvRetRecieve.setInfo("^/findVssDomainUnitTblList$", "POST",
|
| | | std::bind(&VssDomainUnitTblController::findVssDomainUnitTblList, this,
|
| | | std::placeholders::_1, std::placeholders::_2,
|
| | | std::placeholders::_3, std::placeholders::_4));
|
| | |
|
| | | }
|
| | | public:
|
| | | /** 添加创建一级设备表 */
|
| | | /** 添加创建一级设备表 */
|
| | | std::string addVssDomainUnitTbl(std::string ip, unsigned int port, std::string content, PResponse &response) {
|
| | | Json::Reader requestJsonReader;
|
| | | Json::Value requestJsonValue;
|
| | |
| | | responseJsonValue["success"] = "false";
|
| | | if (requestJsonReader.parse(content, requestJsonValue)) {
|
| | | VssDomainUnitTblBuilder vssDomainUnitTblBuilder;
|
| | | |
| | | Json::Value iDJsonValue = requestJsonValue[VssDomainUnitTbl_ID];
|
| | |
|
| | | Json::Value iDJsonValue = requestJsonValue[VssDomainUnitTbl_ID];
|
| | | if (iDJsonValue.type() != Json::ValueType::nullValue) {
|
| | | vssDomainUnitTblBuilder.addID(iDJsonValue.asInt());
|
| | | vssDomainUnitTblBuilder.addID(std::stoi((iDJsonValue.asString())));
|
| | | }
|
| | | |
| | | Json::Value devPubIDJsonValue = requestJsonValue[VssDomainUnitTbl_DevPubID];
|
| | |
|
| | | Json::Value devPubIDJsonValue = requestJsonValue[VssDomainUnitTbl_DevPubID];
|
| | | if (devPubIDJsonValue.type() != Json::ValueType::nullValue) {
|
| | | vssDomainUnitTblBuilder.addDevPubID(devPubIDJsonValue.asString());
|
| | | vssDomainUnitTblBuilder.addDevPubID((devPubIDJsonValue.asString()));
|
| | | }
|
| | | |
| | | Json::Value domainPubIDJsonValue = requestJsonValue[VssDomainUnitTbl_DomainPubID];
|
| | |
|
| | | Json::Value domainPubIDJsonValue = requestJsonValue[VssDomainUnitTbl_DomainPubID];
|
| | | if (domainPubIDJsonValue.type() != Json::ValueType::nullValue) {
|
| | | vssDomainUnitTblBuilder.addDomainPubID(domainPubIDJsonValue.asString());
|
| | | vssDomainUnitTblBuilder.addDomainPubID((domainPubIDJsonValue.asString()));
|
| | | }
|
| | | |
| | | Json::Value nameJsonValue = requestJsonValue[VssDomainUnitTbl_Name];
|
| | |
|
| | | Json::Value nameJsonValue = requestJsonValue[VssDomainUnitTbl_Name];
|
| | | if (nameJsonValue.type() != Json::ValueType::nullValue) {
|
| | | vssDomainUnitTblBuilder.addName(nameJsonValue.asString());
|
| | | vssDomainUnitTblBuilder.addName((nameJsonValue.asString()));
|
| | | }
|
| | | |
| | | Json::Value businessGroupIDJsonValue = requestJsonValue[VssDomainUnitTbl_BusinessGroupID];
|
| | |
|
| | | Json::Value businessGroupIDJsonValue = requestJsonValue[VssDomainUnitTbl_BusinessGroupID];
|
| | | if (businessGroupIDJsonValue.type() != Json::ValueType::nullValue) {
|
| | | vssDomainUnitTblBuilder.addBusinessGroupID(businessGroupIDJsonValue.asString());
|
| | | vssDomainUnitTblBuilder.addBusinessGroupID((businessGroupIDJsonValue.asString()));
|
| | | }
|
| | | |
| | | Json::Value parentIdJsonValue = requestJsonValue[VssDomainUnitTbl_ParentId];
|
| | |
|
| | | Json::Value parentIdJsonValue = requestJsonValue[VssDomainUnitTbl_ParentId];
|
| | | if (parentIdJsonValue.type() != Json::ValueType::nullValue) {
|
| | | vssDomainUnitTblBuilder.addParentId(parentIdJsonValue.asString());
|
| | | vssDomainUnitTblBuilder.addParentId((parentIdJsonValue.asString()));
|
| | | }
|
| | | |
| | | Json::Value domainTypeJsonValue = requestJsonValue[VssDomainUnitTbl_DomainType];
|
| | |
|
| | | Json::Value domainTypeJsonValue = requestJsonValue[VssDomainUnitTbl_DomainType];
|
| | | if (domainTypeJsonValue.type() != Json::ValueType::nullValue) {
|
| | | vssDomainUnitTblBuilder.addDomainType(domainTypeJsonValue.asInt());
|
| | | vssDomainUnitTblBuilder.addDomainType(std::stoi((domainTypeJsonValue.asString())));
|
| | | }
|
| | | |
| | | Json::Value updateTimeJsonValue = requestJsonValue[VssDomainUnitTbl_UpdateTime];
|
| | |
|
| | | Json::Value updateTimeJsonValue = requestJsonValue[VssDomainUnitTbl_UpdateTime];
|
| | | if (updateTimeJsonValue.type() != Json::ValueType::nullValue) {
|
| | | vssDomainUnitTblBuilder.addUpdateTime(updateTimeJsonValue.asString());
|
| | | vssDomainUnitTblBuilder.addUpdateTime((updateTimeJsonValue.asString()));
|
| | | }
|
| | | auto keyValuesToAdd = vssDomainUnitTblBuilder.buildVssDomainUnitTblMap();
|
| | | if (keyValuesToAdd.size() > 0) {
|
| | | mysqlpp::SimpleResult addVssDomainUnitTblResult = VssDomainUnitTblDao::instance()->addVssDomainUnitTbl(keyValuesToAdd);
|
| | | if (addVssDomainUnitTblResult.rows() > 0) {
|
| | | responseJsonValue["success"] = "true";
|
| | | responseJsonValue["message"] = "添加成功!";
|
| | | }
|
| | | auto keyValuesToAdd = vssDomainUnitTblBuilder.buildVssDomainUnitTblMap();
|
| | | if (keyValuesToAdd.size() > 0) {
|
| | | mysqlpp::SimpleResult addVssDomainUnitTblResult = VssDomainUnitTblDao::instance()->addVssDomainUnitTbl(keyValuesToAdd);
|
| | | if (addVssDomainUnitTblResult.rows() > 0) {
|
| | | responseJsonValue["success"] = "true";
|
| | | responseJsonValue["message"] = "添加成功!";
|
| | | }
|
| | | }
|
| | | }
|
| | | return responseJsonValue.toStyledString();
|
| | | }
|
| | | |
| | |
|
| | | /** 删除创建一级设备表 */
|
| | | std::string delVssDomainUnitTbl(std::string ip, unsigned int port, std::string content, PResponse &response) {
|
| | | Json::Reader requestJsonReader;
|
| | |
| | | responseJsonValue["message"] = "删除失败!";
|
| | | responseJsonValue["success"] = "false";
|
| | | if (requestJsonReader.parse(content, requestJsonValue)) {
|
| | | Json::Value iDJsonValue = requestJsonValue[VssDomainUnitTbl_ID];
|
| | | if (iDJsonValue.type() != Json::ValueType::nullValue) {
|
| | | string iDValue = iDJsonValue.asString();
|
| | | Json::Value iDJsonValue = requestJsonValue[VssDomainUnitTbl_ID];
|
| | | if (iDJsonValue.type() != Json::ValueType::nullValue) {
|
| | | string iDValue = iDJsonValue.asString();
|
| | | if (iDValue.size() > 0 && VssDomainUnitTblDao::instance()->deleteByColumn("ID", iDValue)) {
|
| | | responseJsonValue["success"] = "true";
|
| | | responseJsonValue["message"] = "删除成功!";
|
| | | }
|
| | | responseJsonValue["success"] = "true";
|
| | | responseJsonValue["message"] = "删除成功!";
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | }
|
| | | return responseJsonValue.toStyledString();
|
| | | }
|
| | | |
| | |
|
| | | /** 更新创建一级设备表 */
|
| | | std::string updateVssDomainUnitTbl(std::string ip, unsigned int port, std::string content, PResponse &response) {
|
| | | Json::Reader requestJsonReader;
|
| | |
| | | responseJsonValue["success"] = "false";
|
| | | if (requestJsonReader.parse(content, requestJsonValue)) {
|
| | | VssDomainUnitTblBuilder vssDomainUnitTblBuilder;
|
| | | |
| | | Json::Value iDJsonValue = requestJsonValue[VssDomainUnitTbl_ID];
|
| | |
|
| | | Json::Value iDJsonValue = requestJsonValue[VssDomainUnitTbl_ID];
|
| | | if (iDJsonValue.type() != Json::ValueType::nullValue) {
|
| | | vssDomainUnitTblBuilder.addID(iDJsonValue.asInt());
|
| | | vssDomainUnitTblBuilder.addID(std::stoi((iDJsonValue.asString())));
|
| | | }
|
| | | |
| | | Json::Value devPubIDJsonValue = requestJsonValue[VssDomainUnitTbl_DevPubID];
|
| | |
|
| | | Json::Value devPubIDJsonValue = requestJsonValue[VssDomainUnitTbl_DevPubID];
|
| | | if (devPubIDJsonValue.type() != Json::ValueType::nullValue) {
|
| | | vssDomainUnitTblBuilder.addDevPubID(devPubIDJsonValue.asString());
|
| | | vssDomainUnitTblBuilder.addDevPubID((devPubIDJsonValue.asString()));
|
| | | }
|
| | | |
| | | Json::Value domainPubIDJsonValue = requestJsonValue[VssDomainUnitTbl_DomainPubID];
|
| | |
|
| | | Json::Value domainPubIDJsonValue = requestJsonValue[VssDomainUnitTbl_DomainPubID];
|
| | | if (domainPubIDJsonValue.type() != Json::ValueType::nullValue) {
|
| | | vssDomainUnitTblBuilder.addDomainPubID(domainPubIDJsonValue.asString());
|
| | | vssDomainUnitTblBuilder.addDomainPubID((domainPubIDJsonValue.asString()));
|
| | | }
|
| | | |
| | | Json::Value nameJsonValue = requestJsonValue[VssDomainUnitTbl_Name];
|
| | |
|
| | | Json::Value nameJsonValue = requestJsonValue[VssDomainUnitTbl_Name];
|
| | | if (nameJsonValue.type() != Json::ValueType::nullValue) {
|
| | | vssDomainUnitTblBuilder.addName(nameJsonValue.asString());
|
| | | vssDomainUnitTblBuilder.addName((nameJsonValue.asString()));
|
| | | }
|
| | | |
| | | Json::Value businessGroupIDJsonValue = requestJsonValue[VssDomainUnitTbl_BusinessGroupID];
|
| | |
|
| | | Json::Value businessGroupIDJsonValue = requestJsonValue[VssDomainUnitTbl_BusinessGroupID];
|
| | | if (businessGroupIDJsonValue.type() != Json::ValueType::nullValue) {
|
| | | vssDomainUnitTblBuilder.addBusinessGroupID(businessGroupIDJsonValue.asString());
|
| | | vssDomainUnitTblBuilder.addBusinessGroupID((businessGroupIDJsonValue.asString()));
|
| | | }
|
| | | |
| | | Json::Value parentIdJsonValue = requestJsonValue[VssDomainUnitTbl_ParentId];
|
| | |
|
| | | Json::Value parentIdJsonValue = requestJsonValue[VssDomainUnitTbl_ParentId];
|
| | | if (parentIdJsonValue.type() != Json::ValueType::nullValue) {
|
| | | vssDomainUnitTblBuilder.addParentId(parentIdJsonValue.asString());
|
| | | vssDomainUnitTblBuilder.addParentId((parentIdJsonValue.asString()));
|
| | | }
|
| | | |
| | | Json::Value domainTypeJsonValue = requestJsonValue[VssDomainUnitTbl_DomainType];
|
| | |
|
| | | Json::Value domainTypeJsonValue = requestJsonValue[VssDomainUnitTbl_DomainType];
|
| | | if (domainTypeJsonValue.type() != Json::ValueType::nullValue) {
|
| | | vssDomainUnitTblBuilder.addDomainType(domainTypeJsonValue.asInt());
|
| | | vssDomainUnitTblBuilder.addDomainType(std::stoi((domainTypeJsonValue.asString())));
|
| | | }
|
| | | |
| | | Json::Value updateTimeJsonValue = requestJsonValue[VssDomainUnitTbl_UpdateTime];
|
| | |
|
| | | Json::Value updateTimeJsonValue = requestJsonValue[VssDomainUnitTbl_UpdateTime];
|
| | | if (updateTimeJsonValue.type() != Json::ValueType::nullValue) {
|
| | | vssDomainUnitTblBuilder.addUpdateTime(updateTimeJsonValue.asString());
|
| | | vssDomainUnitTblBuilder.addUpdateTime((updateTimeJsonValue.asString()));
|
| | | }
|
| | | if (iDJsonValue.type() != Json::ValueType::nullValue) {
|
| | | string iDValue = iDJsonValue.asString();
|
| | | if (iDJsonValue.type() != Json::ValueType::nullValue) {
|
| | | string iDValue = iDJsonValue.asString();
|
| | | if (iDValue.size() > 0 && VssDomainUnitTblDao::instance()->updateVssDomainUnitTbl(vssDomainUnitTblBuilder.buildVssDomainUnitTblMap(), "ID", iDValue)) {
|
| | | responseJsonValue["success"] = "true";
|
| | | responseJsonValue["message"] = "更新成功!";
|
| | | }
|
| | | responseJsonValue["success"] = "true";
|
| | | responseJsonValue["message"] = "更新成功!";
|
| | | }
|
| | | }
|
| | | }
|
| | | return responseJsonValue.toStyledString();
|
| | | }
|
| | | |
| | |
|
| | | /** 查找单个创建一级设备表 */
|
| | | std::string findVssDomainUnitTbl(std::string ip, unsigned int port, std::string content, PResponse &response) {
|
| | | Json::Reader requestJsonReader;
|
| | |
| | | responseJsonValue["success"] = "false";
|
| | | if (requestJsonReader.parse(content, requestJsonValue)) {
|
| | | VssDomainUnitTblBuilder vssDomainUnitTblBuilder;
|
| | | |
| | | Json::Value iDJsonValue = requestJsonValue[VssDomainUnitTbl_ID];
|
| | |
|
| | | Json::Value iDJsonValue = requestJsonValue[VssDomainUnitTbl_ID];
|
| | | if (iDJsonValue.type() != Json::ValueType::nullValue) {
|
| | | vssDomainUnitTblBuilder.addID(iDJsonValue.asInt());
|
| | | vssDomainUnitTblBuilder.addID(std::stoi((iDJsonValue.asString())));
|
| | | }
|
| | | |
| | | Json::Value devPubIDJsonValue = requestJsonValue[VssDomainUnitTbl_DevPubID];
|
| | |
|
| | | Json::Value devPubIDJsonValue = requestJsonValue[VssDomainUnitTbl_DevPubID];
|
| | | if (devPubIDJsonValue.type() != Json::ValueType::nullValue) {
|
| | | vssDomainUnitTblBuilder.addDevPubID(devPubIDJsonValue.asString());
|
| | | vssDomainUnitTblBuilder.addDevPubID((devPubIDJsonValue.asString()));
|
| | | }
|
| | | |
| | | Json::Value domainPubIDJsonValue = requestJsonValue[VssDomainUnitTbl_DomainPubID];
|
| | |
|
| | | Json::Value domainPubIDJsonValue = requestJsonValue[VssDomainUnitTbl_DomainPubID];
|
| | | if (domainPubIDJsonValue.type() != Json::ValueType::nullValue) {
|
| | | vssDomainUnitTblBuilder.addDomainPubID(domainPubIDJsonValue.asString());
|
| | | vssDomainUnitTblBuilder.addDomainPubID((domainPubIDJsonValue.asString()));
|
| | | }
|
| | | |
| | | Json::Value nameJsonValue = requestJsonValue[VssDomainUnitTbl_Name];
|
| | |
|
| | | Json::Value nameJsonValue = requestJsonValue[VssDomainUnitTbl_Name];
|
| | | if (nameJsonValue.type() != Json::ValueType::nullValue) {
|
| | | vssDomainUnitTblBuilder.addName(nameJsonValue.asString());
|
| | | vssDomainUnitTblBuilder.addName((nameJsonValue.asString()));
|
| | | }
|
| | | |
| | | Json::Value businessGroupIDJsonValue = requestJsonValue[VssDomainUnitTbl_BusinessGroupID];
|
| | |
|
| | | Json::Value businessGroupIDJsonValue = requestJsonValue[VssDomainUnitTbl_BusinessGroupID];
|
| | | if (businessGroupIDJsonValue.type() != Json::ValueType::nullValue) {
|
| | | vssDomainUnitTblBuilder.addBusinessGroupID(businessGroupIDJsonValue.asString());
|
| | | vssDomainUnitTblBuilder.addBusinessGroupID((businessGroupIDJsonValue.asString()));
|
| | | }
|
| | | |
| | | Json::Value parentIdJsonValue = requestJsonValue[VssDomainUnitTbl_ParentId];
|
| | |
|
| | | Json::Value parentIdJsonValue = requestJsonValue[VssDomainUnitTbl_ParentId];
|
| | | if (parentIdJsonValue.type() != Json::ValueType::nullValue) {
|
| | | vssDomainUnitTblBuilder.addParentId(parentIdJsonValue.asString());
|
| | | vssDomainUnitTblBuilder.addParentId((parentIdJsonValue.asString()));
|
| | | }
|
| | | |
| | | Json::Value domainTypeJsonValue = requestJsonValue[VssDomainUnitTbl_DomainType];
|
| | |
|
| | | Json::Value domainTypeJsonValue = requestJsonValue[VssDomainUnitTbl_DomainType];
|
| | | if (domainTypeJsonValue.type() != Json::ValueType::nullValue) {
|
| | | vssDomainUnitTblBuilder.addDomainType(domainTypeJsonValue.asInt());
|
| | | vssDomainUnitTblBuilder.addDomainType(std::stoi((domainTypeJsonValue.asString())));
|
| | | }
|
| | | |
| | | Json::Value updateTimeJsonValue = requestJsonValue[VssDomainUnitTbl_UpdateTime];
|
| | |
|
| | | Json::Value updateTimeJsonValue = requestJsonValue[VssDomainUnitTbl_UpdateTime];
|
| | | if (updateTimeJsonValue.type() != Json::ValueType::nullValue) {
|
| | | vssDomainUnitTblBuilder.addUpdateTime(updateTimeJsonValue.asString());
|
| | | vssDomainUnitTblBuilder.addUpdateTime((updateTimeJsonValue.asString()));
|
| | | }
|
| | | responseJsonValue["message"] = "查询成功!";
|
| | | responseJsonValue["success"] = "true";
|
| | | responseJsonValue["data"] = VssDomainUnitTblDao::instance()->findJsonArray(string("select * from ") + VSSDomainUnitTbl_TABLE_NAME + " where 1 = 1 limit 1");
|
| | | responseJsonValue["message"] = "查询成功!";
|
| | | responseJsonValue["success"] = "true";
|
| | | responseJsonValue["data"] = VssDomainUnitTblDao::instance()->findJsonArray(string("select * from ") + VSSDomainUnitTbl_TABLE_NAME + " where 1 = 1 limit 1");
|
| | | }
|
| | | return responseJsonValue.toStyledString();
|
| | | }
|
| | | |
| | |
|
| | | /** 查找创建一级设备表列表 */
|
| | | std::string findVssDomainUnitTblList(std::string ip, unsigned int port, std::string content, PResponse &response) {
|
| | | Json::Reader requestJsonReader;
|
| | |
| | | responseJsonValue["success"] = "false";
|
| | | if (content == "" || requestJsonReader.parse(content, requestJsonValue)) {
|
| | | VssDomainUnitTblBuilder vssDomainUnitTblBuilder;
|
| | | |
| | | Json::Value iDJsonValue = requestJsonValue[VssDomainUnitTbl_ID];
|
| | |
|
| | | Json::Value iDJsonValue = requestJsonValue[VssDomainUnitTbl_ID];
|
| | | if (iDJsonValue.type() != Json::ValueType::nullValue) {
|
| | | vssDomainUnitTblBuilder.addID(iDJsonValue.asInt());
|
| | | vssDomainUnitTblBuilder.addID(std::stoi((iDJsonValue.asString())));
|
| | | }
|
| | | |
| | | Json::Value devPubIDJsonValue = requestJsonValue[VssDomainUnitTbl_DevPubID];
|
| | |
|
| | | Json::Value devPubIDJsonValue = requestJsonValue[VssDomainUnitTbl_DevPubID];
|
| | | if (devPubIDJsonValue.type() != Json::ValueType::nullValue) {
|
| | | vssDomainUnitTblBuilder.addDevPubID(devPubIDJsonValue.asString());
|
| | | vssDomainUnitTblBuilder.addDevPubID((devPubIDJsonValue.asString()));
|
| | | }
|
| | | |
| | | Json::Value domainPubIDJsonValue = requestJsonValue[VssDomainUnitTbl_DomainPubID];
|
| | |
|
| | | Json::Value domainPubIDJsonValue = requestJsonValue[VssDomainUnitTbl_DomainPubID];
|
| | | if (domainPubIDJsonValue.type() != Json::ValueType::nullValue) {
|
| | | vssDomainUnitTblBuilder.addDomainPubID(domainPubIDJsonValue.asString());
|
| | | vssDomainUnitTblBuilder.addDomainPubID((domainPubIDJsonValue.asString()));
|
| | | }
|
| | | |
| | | Json::Value nameJsonValue = requestJsonValue[VssDomainUnitTbl_Name];
|
| | |
|
| | | Json::Value nameJsonValue = requestJsonValue[VssDomainUnitTbl_Name];
|
| | | if (nameJsonValue.type() != Json::ValueType::nullValue) {
|
| | | vssDomainUnitTblBuilder.addName(nameJsonValue.asString());
|
| | | vssDomainUnitTblBuilder.addName((nameJsonValue.asString()));
|
| | | }
|
| | | |
| | | Json::Value businessGroupIDJsonValue = requestJsonValue[VssDomainUnitTbl_BusinessGroupID];
|
| | |
|
| | | Json::Value businessGroupIDJsonValue = requestJsonValue[VssDomainUnitTbl_BusinessGroupID];
|
| | | if (businessGroupIDJsonValue.type() != Json::ValueType::nullValue) {
|
| | | vssDomainUnitTblBuilder.addBusinessGroupID(businessGroupIDJsonValue.asString());
|
| | | vssDomainUnitTblBuilder.addBusinessGroupID((businessGroupIDJsonValue.asString()));
|
| | | }
|
| | | |
| | | Json::Value parentIdJsonValue = requestJsonValue[VssDomainUnitTbl_ParentId];
|
| | |
|
| | | Json::Value parentIdJsonValue = requestJsonValue[VssDomainUnitTbl_ParentId];
|
| | | if (parentIdJsonValue.type() != Json::ValueType::nullValue) {
|
| | | vssDomainUnitTblBuilder.addParentId(parentIdJsonValue.asString());
|
| | | vssDomainUnitTblBuilder.addParentId((parentIdJsonValue.asString()));
|
| | | }
|
| | | |
| | | Json::Value domainTypeJsonValue = requestJsonValue[VssDomainUnitTbl_DomainType];
|
| | |
|
| | | Json::Value domainTypeJsonValue = requestJsonValue[VssDomainUnitTbl_DomainType];
|
| | | if (domainTypeJsonValue.type() != Json::ValueType::nullValue) {
|
| | | vssDomainUnitTblBuilder.addDomainType(domainTypeJsonValue.asInt());
|
| | | vssDomainUnitTblBuilder.addDomainType(std::stoi((domainTypeJsonValue.asString())));
|
| | | }
|
| | | |
| | | Json::Value updateTimeJsonValue = requestJsonValue[VssDomainUnitTbl_UpdateTime];
|
| | |
|
| | | Json::Value updateTimeJsonValue = requestJsonValue[VssDomainUnitTbl_UpdateTime];
|
| | | if (updateTimeJsonValue.type() != Json::ValueType::nullValue) {
|
| | | vssDomainUnitTblBuilder.addUpdateTime(updateTimeJsonValue.asString());
|
| | | vssDomainUnitTblBuilder.addUpdateTime((updateTimeJsonValue.asString()));
|
| | | }
|
| | | responseJsonValue["message"] = "查询成功!";
|
| | | responseJsonValue["success"] = "true";
|
| | | responseJsonValue["data"] = VssDomainUnitTblDao::instance()->findJsonArray(string("select * from ") + VSSDomainUnitTbl_TABLE_NAME + " where 1 = 1");
|
| | | responseJsonValue["message"] = "查询成功!";
|
| | | responseJsonValue["success"] = "true";
|
| | | responseJsonValue["data"] = VssDomainUnitTblDao::instance()->findJsonArray(string("select * from ") + VSSDomainUnitTbl_TABLE_NAME + " where 1 = 1");
|
| | |
|
| | | }
|
| | | return responseJsonValue.toStyledString();
|