| | |
| | | private:
|
| | | /** 本地国标配置构造函数 */
|
| | | VssLocalSettingTblController() {}
|
| | |
|
| | | public:
|
| | | /** 本地国标配置单例模式 */
|
| | | static VssLocalSettingTblController* instance() {
|
| | | static VssLocalSettingTblController instance;
|
| | | return &instance;
|
| | | }
|
| | |
|
| | | public:
|
| | | /** 注册{label}http服务 */
|
| | | void registerHttpServices(HttpSrvRetRecieve& _HttpSrvRetRecieve) {
|
| | |
| | | std::placeholders::_3, std::placeholders::_4));
|
| | |
|
| | | }
|
| | |
|
| | | public:
|
| | | /** 添加本地国标配置 */
|
| | | std::string addVssLocalSettingTbl(std::string ip, unsigned int port, std::string content, PResponse &response) {
|
| | | DBG("ip:" << ip << "; port:" << port);
|
| | | DBG("content: " << content);
|
| | | Json::Reader requestJsonReader;
|
| | | Json::Value requestJsonValue;
|
| | | Json::Value responseJsonValue;
|
| | |
| | |
|
| | | /** 删除本地国标配置 */
|
| | | std::string delVssLocalSettingTbl(std::string ip, unsigned int port, std::string content, PResponse &response) {
|
| | | DBG("ip:" << ip << "; port:" << port);
|
| | | DBG("content: " << content);
|
| | | Json::Reader requestJsonReader;
|
| | | Json::Value requestJsonValue;
|
| | | Json::Value responseJsonValue;
|
| | |
| | |
|
| | | /** 更新本地国标配置 */
|
| | | std::string updateVssLocalSettingTbl(std::string ip, unsigned int port, std::string content, PResponse &response) {
|
| | | DBG("ip:" << ip << "; port:" << port);
|
| | | DBG("content: " << content);
|
| | | Json::Reader requestJsonReader;
|
| | | Json::Value requestJsonValue;
|
| | | Json::Value responseJsonValue;
|
| | |
| | | }
|
| | | if (iDJsonValue.type() != Json::ValueType::nullValue) {
|
| | | string iDValue = iDJsonValue.asString();
|
| | | responseJsonValue = VssLocalSettingTblSqliteDao::instance()->updateVssLocalSettingTbl(vssLocalSettingTblBuilder.buildVssLocalSettingTblMap(), "ID", iDValue);
|
| | | responseJsonValue = VssLocalSettingTblSqliteDao::instance()->updateVssLocalSettingTbl(
|
| | | vssLocalSettingTblBuilder.buildVssLocalSettingTblMap(), "ID", iDValue);
|
| | | }
|
| | | }
|
| | | return responseJsonValue.toStyledString();
|
| | |
| | |
|
| | | /** 查找单个本地国标配置 */
|
| | | std::string findVssLocalSettingTbl(std::string ip, unsigned int port, std::string content, PResponse &response) {
|
| | | DBG("ip:" << ip << "; port:" << port);
|
| | | DBG("content: " << content);
|
| | | Json::Reader requestJsonReader;
|
| | | Json::Value requestJsonValue;
|
| | | Json::Value responseJsonValue;
|
| | |
| | | }
|
| | | responseJsonValue["message"] = "查询成功!";
|
| | | responseJsonValue["success"] = "true";
|
| | | responseJsonValue = VssLocalSettingTblSqliteDao::instance()->findVssLocalSettingTblList(vssLocalSettingTblBuilder.buildVssLocalSettingTblMap());
|
| | | responseJsonValue = VssLocalSettingTblSqliteDao::instance()->findVssLocalSettingTblList(
|
| | | vssLocalSettingTblBuilder.buildVssLocalSettingTblMap());
|
| | | }
|
| | | return responseJsonValue.toStyledString();
|
| | | }
|
| | |
|
| | | /** 查找本地国标配置列表 */
|
| | | std::string findVssLocalSettingTblList(std::string ip, unsigned int port, std::string content, PResponse &response) {
|
| | | std::string
|
| | | findVssLocalSettingTblList(std::string ip, unsigned int port, std::string content, PResponse &response) {
|
| | | DBG("ip:" << ip << "; port:" << port);
|
| | | DBG("content: " << content);
|
| | | Json::Reader requestJsonReader;
|
| | | Json::Value requestJsonValue;
|
| | | Json::Value responseJsonValue;
|
| | |
| | | }
|
| | | responseJsonValue["message"] = "查询成功!";
|
| | | responseJsonValue["success"] = "true";
|
| | | responseJsonValue = VssLocalSettingTblSqliteDao::instance()->findVssLocalSettingTblList(vssLocalSettingTblBuilder.buildVssLocalSettingTblMap());
|
| | | responseJsonValue = VssLocalSettingTblSqliteDao::instance()->findVssLocalSettingTblList(
|
| | | vssLocalSettingTblBuilder.buildVssLocalSettingTblMap());
|
| | |
|
| | | }
|
| | | return responseJsonValue.toStyledString();
|
| | | }
|
| | | };
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | #endif //VSSLOCALSETTINGTBL_CONTROLLER_H
|