派生自 development/c++

xuxiuxi
2019-03-08 118d5304c8744a3cb533164af6fbdc91229d6f3d
QiaoJiaSystem/DataManagerServer/http_configserver.cpp
@@ -23,13 +23,12 @@
#include <dirent.h>
#include "basic/pipe_element/ffmpeg/basic_struct_for_video_image.h"
#ifdef  MYSQLRET
#include "vss/controller/VssDevTblController.h"
#include "vss/controller/VssChannelTblController.h"
#include "vss/controller/VssDomainUnitTblController.h"
#include "vss/controller/VssLocalSettingTblController.h"
#include "vss/controller/VssUpperSvrTblController.h"
#endif
#include "vss/controller/CamDevController.h"
using namespace std;
@@ -250,15 +249,17 @@
                                         std::placeholders::_1, std::placeholders::_2,
                                         std::placeholders::_3, std::placeholders::_4));
#ifdef  MYSQLRET
    BaseDao::initConnection();
    VssLocalSettingTblSqliteDao::instance()->setLDBTool(&db_c);
    BaseSqliteDao::setLDBTool(&db_c);
    VssDevTblController::instance()->registerHttpServices(_HttpSrvRetRecieve);
    VssChannelTblController::instance()->registerHttpServices(_HttpSrvRetRecieve);
    VssDomainUnitTblController::instance()->registerHttpServices(_HttpSrvRetRecieve);
    VssLocalSettingTblController::instance()->registerHttpServices(_HttpSrvRetRecieve);
    CamDevController::instance()->registerHttpServices(_HttpSrvRetRecieve);
    VssUpperSvrTblController::instance()->registerHttpServices(_HttpSrvRetRecieve);
#endif
    _HttpSrvRetRecieve.start();
    _HttpSrvRetRecieve.waitForShutDown();
}
@@ -1051,7 +1052,7 @@
        if ((!ret) || (serialnumber[0] == 0)) {
            return "{\"ret_status\": \"内容有误,请检查!\"}";
        }
        rec.type = 0;
        rec.str_cam_dev_id = QString::fromLatin1((const char *) serialnumber);//摄像机id cam_mac
        rec.str_name = QString::fromStdString(value["str_name"].asString());
        rec.str_addr = QString::fromStdString(value["str_addr"].asString());
@@ -1062,6 +1063,7 @@
        rec.str_username = QString::fromStdString(value["str_username"].asString());
        rec.str_password = QString::fromStdString(value["str_password"].asString());
        rec.str_brand = QString::fromStdString(value["str_brand"].asString());
        rec.str_reserved = QString::fromStdString(value["str_reserved"].asString());
        type = value["n_type"].asInt();
//        rec_sdk_old = db_c.searchCamSdkTableByCamId(rec.str_cam_dev_id);
@@ -1445,12 +1447,12 @@
                fdfsClient.rwLock.unlock();
            }
            //# http client 127.0.0.1:9999/resetFdfs
            std::string http_cmd = "http://127.0.0.1:9999/resetFdfs";
            HttpRequestWithCrul httpRequestWithCrul;
            std::string response_bak = "";
            std::string postParams_bak = "";
            httpRequestWithCrul.curl_post_req("http://127.0.0.1:9999/resetFdfs", postParams_bak, response_bak);
//            //# http client 127.0.0.1:9999/resetFdfs
//            std::string http_cmd = "http://127.0.0.1:9999/resetFdfs";
//            HttpRequestWithCrul httpRequestWithCrul;
//            std::string response_bak = "";
//            std::string postParams_bak = "";
//            httpRequestWithCrul.curl_post_req("http://127.0.0.1:9999/resetFdfs", postParams_bak, response_bak);
        }
    } else {
        return "{\"ret_status\": \"传输错误,请检查!\"}";