|
@@ -77,7 +77,12 @@ struct GateReqTask :public ITaskSp {
|
|
|
CInitializerFSM* m_fsm;
|
|
|
CInitializerEntity* m_entity;
|
|
|
GateReqTask(CInitializerFSM* fsm, CInitializerEntity* entity) :m_fsm(fsm), m_entity(entity) {}
|
|
|
- void Process() {
|
|
|
+
|
|
|
+ void Process()
|
|
|
+ {
|
|
|
+
|
|
|
+ LOG_FUNCTION();
|
|
|
+
|
|
|
CSmartPointer<IEntityFunction> spFunction = m_entity->GetFunction();
|
|
|
CSmartPointer<IConfigInfo> spConfig;
|
|
|
ErrorCodeEnum eErr = spFunction->OpenConfig(Config_CenterSetting, spConfig);
|
|
@@ -95,7 +100,6 @@ struct GateReqTask :public ITaskSp {
|
|
|
CSystemStaticInfo si;
|
|
|
m_entity->GetFunction()->GetSystemStaticInfo(si);
|
|
|
|
|
|
-
|
|
|
#ifdef WITH_CPPRESTSDK
|
|
|
|
|
|
m_entity->m_bACS = false;
|
|
@@ -111,11 +115,6 @@ struct GateReqTask :public ITaskSp {
|
|
|
|
|
|
} instanceReq;
|
|
|
|
|
|
- struct InstanceAnsJson : public MicroServices::API::CommResponse
|
|
|
- {
|
|
|
- bool data;
|
|
|
- JSONCONVERT2OBJECT_MEMEBER_REGISTER(data)
|
|
|
- } instanceAns;
|
|
|
|
|
|
HttpClientResponseResult result;
|
|
|
HttpClientRequestConfig config(HttpRequestMethod::POST, grayUrl.GetData());
|
|
@@ -132,21 +131,13 @@ struct GateReqTask :public ITaskSp {
|
|
|
|
|
|
if (result.ResponseOK()) {
|
|
|
|
|
|
- SP::Module::Restful::CommResponseJson responseStatus;
|
|
|
- SP::Module::Restful::GetStatusFromDebranchResponse(result.content, responseStatus);
|
|
|
-
|
|
|
- if (!responseStatus.IsOperatedOK()) {
|
|
|
- Dbg("gray: %s", responseStatus.errorMsg.c_str());
|
|
|
+ SP::Module::Restful::GrayResponseJson grayResponse;
|
|
|
+ SP::Module::Restful::GetGrayInfoFromDebranchResponse(result.content, grayResponse);
|
|
|
|
|
|
+ if (!grayResponse.IsOperatedOK()) {
|
|
|
+ Dbg("gray: %s,%s", grayResponse.errorMsg.c_str(), result.content.c_str());
|
|
|
} else {
|
|
|
-
|
|
|
- //特殊处理
|
|
|
- Json::Value rawRoot;
|
|
|
- GetJsonRootObject(rawRoot, result.content);
|
|
|
- bool graySetValue(false);
|
|
|
- Json2Object(graySetValue, rawRoot["data"]);
|
|
|
- m_entity->m_bACS = graySetValue;
|
|
|
-
|
|
|
+ m_entity->m_bACS = grayResponse.graySwitch;
|
|
|
if (m_entity->m_bACS) {
|
|
|
LogWarn(Severity_Middle, Error_Unexpect, Initializer_UserErrorCode_Init_ACS, "灰度提示走总行");
|
|
|
} else {
|