Преглед изворни кода

#IQRV #comment: 调整逻辑错误,修改准入、初始化接口url

陈纪林80310970 пре 11 месеци
родитељ
комит
04eca4af16
2 измењених фајлова са 4 додато и 12 уклоњено
  1. 1 1
      Module/mod_accessauth/AccessAuthFSM.cpp
  2. 3 11
      Module/mod_accessauth/mod_AccessAuth.cpp

+ 1 - 1
Module/mod_accessauth/AccessAuthFSM.cpp

@@ -370,7 +370,7 @@ struct GetTokenTask : ITaskSp
 
 		HttpClientResponseResult result;
 		HttpClientRequestConfig config(HttpRequestMethod::POST, m_fsm->GetmAccessAuthHost().GetData(), &SpGetToken);
-		config.SetChildUri("/api/v3/access");
+		config.SetChildUri("/api/v4/access");
 
 		if (m_fsm->containsChinese(m_fsm->GetmAccessAuthHost().GetData()))
 		{

+ 3 - 11
Module/mod_accessauth/mod_AccessAuth.cpp

@@ -59,7 +59,7 @@ struct InitializerInitMKTask : ITaskSp
 
 		HttpClientResponseResult result;
 		HttpClientRequestConfig config(HttpRequestMethod::POST, m_entity->GetInitUrl().GetData(), &SpGetToken);
-		config.SetChildUri("/api/v5/initmk");
+		config.SetChildUri("/api/v6/initmk");
 		SP::Module::Restful::FulfillRequestJsonBody(&config, instanceReq);
 
 		std::string test;
@@ -1122,20 +1122,12 @@ bool CAccessAuthEntity::SendInitMKReqACS(CInitlizerMKReq& initMKReq)
 {
 	LOG_FUNCTION();
 	CSmartPointer<IEntityFunction> pFunc = GetFunction();
-	CSimpleStringA strPinPadModel = "";
-	bool bPinPadOnline;
-	ErrorCodeEnum nRet = GetPinPadModel(strPinPadModel, bPinPadOnline);
-	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("GetPinPadszModel %s", strPinPadModel.GetData());
-
-	if (nRet != Error_Succeed)
-	{
-		return false; //具有pinpad的设备调用pinpad失败
-	}
+	ErrorCodeEnum nRet = Error_Unexpect;
 
 	CBlob encInfo;
 	char* key = "s5da69gnh4!9631";
 	nRet = (ErrorCodeEnum)m_FSM.GetEncTerminalInfoWithKey(encInfo, (BYTE*)key);
-	if (( m_FSM.GetEncTerminalInfoWithKey(encInfo, (BYTE*)key)) != Error_Succeed)
+	if (nRet != Error_Succeed)
 	{
 		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("GetEncTerminalInfo failed:%d", nRet);
 		return nRet;