Bladeren bron

#IQRV #comment: 去除集中配置功能

陈纪林80310970 6 maanden geleden
bovenliggende
commit
8912d8ea4e
2 gewijzigde bestanden met toevoegingen van 7 en 25 verwijderingen
  1. 0 18
      Module/mod_CenterSetting/mod_centersetting.cpp
  2. 7 7
      Module/mod_CenterSetting/mod_centersetting.h

+ 0 - 18
Module/mod_CenterSetting/mod_centersetting.cpp

@@ -37,14 +37,10 @@ void CCenterSettingEntity::OnStarted()
 		m_isUseMemCfg = true;
 	}
 
-	// 启动轮询定时器
-	const DWORD interval = 60000 * 5;
-	GetFunction()->SetTimer(1, this, interval);
 }
 
 void CCenterSettingEntity::OnPreClose(EntityCloseCauseEnum eCloseCause, CSmartPointer<ITransactionContext> pTransactionContext)
 {
-	GetFunction()->KillTimer(1);
 	pTransactionContext->SendAnswer(Error_Succeed);
 }
 
@@ -193,20 +189,6 @@ DWORD getCenterCfgThread(LPVOID param)
 	return 0;
 }
 
-void CCenterSettingEntity::OnTimeout(DWORD dwTimerID)
-{
-	if(m_isUseMemCfg)
-	{
-		DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("use memory config....");
-		CloseHandle(CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)&getCenterCfgThread, this, 0, NULL));
-	} 
-	else
-	{
-		BeginDownloadCenterSetting();
-	}
-		
-}
-
 ErrorCodeEnum CCenterSettingEntity::GetAccessUrl(CSimpleStringA& url) //初始化地址
 {
 	CSimpleStringA hostInitUrl;

+ 7 - 7
Module/mod_CenterSetting/mod_centersetting.h

@@ -29,7 +29,7 @@ enum DownloadStat
 static void HTTPLogCallback(const char* msg){
 }
 
-class CCenterSettingEntity : public CEntityBase, public ITimerListener
+class CCenterSettingEntity : public CEntityBase
 {
 public:
 	CCenterSettingEntity() : m_strFilePath(true){}
@@ -39,7 +39,6 @@ public:
 
 	virtual void OnStarted();
 	virtual void OnPreClose(EntityCloseCauseEnum eCloseCause, CSmartPointer<ITransactionContext> pTransactionContext);
-	virtual void OnTimeout(DWORD dwTimerID);
 	virtual CServerSessionBase* OnNewSession(const char* /*pszRemoteEntityName*/, const char* /*pszClass*/);
 
 	ErrorCodeEnum DownloadCenterSetting(SpReqAnsContext<CenterSettingService_Downloadv2_Req, CenterSettingService_Downloadv2_Ans>::Pointer sp);
@@ -79,7 +78,8 @@ public:
 	{
 		DbgToBeidou(ctx->link, __FUNCTION__)();
 		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode(CenterSettingService_LogCode_Downloadv2).setAPI(__FUNCTION__)(__FUNCTION__);
-		m_pEntity->DownloadCenterSetting(ctx);
+		//m_pEntity->DownloadCenterSetting(ctx);
+		ctx->Answer(Error_Deprecated);
 	}
 
 	/** 有必要废弃,采用通用化的接口获取即可,特别是要JS化时 [Gifur@2023823]*/
@@ -87,16 +87,16 @@ public:
 	{
 		DbgToBeidou(ctx->link, __FUNCTION__)();
 		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode(CenterSettingService_LogCode_GetAccessUrl).setAPI(__FUNCTION__)(__FUNCTION__);
-		auto rc = m_pEntity->GetAccessUrl(ctx->Ans.HostUrl); //获取初始化地址,是的,就是初始化地址,不要在意这里的名称问题,之前同事开发接口的时候估计随手一打
-		ctx->Answer(rc);
+		//auto rc = m_pEntity->GetAccessUrl(ctx->Ans.HostUrl); //获取初始化地址,是的,就是初始化地址,不要在意这里的名称问题,之前同事开发接口的时候估计随手一打
+		ctx->Answer(Error_Deprecated);
 	}
 
 	virtual void Handle_GetCertainAceessUrl(SpReqAnsContext<CenterSettingService_GetCertainAceessUrl_Req, CenterSettingService_GetCertainAceessUrl_Ans>::Pointer ctx)
 	{
 		DbgToBeidou(ctx->link, __FUNCTION__)();
 		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode(CenterSettingService_LogCode_GetCertainAceessUrl).setAPI(__FUNCTION__)(__FUNCTION__);
-		auto rc = m_pEntity->GetCertainAceessUrl(ctx->Req.reqName, ctx->Ans.CertainAceessUrl); //获取准入地址,这个接口是后面加的
-		ctx->Answer(rc);
+		//auto rc = m_pEntity->GetCertainAceessUrl(ctx->Req.reqName, ctx->Ans.CertainAceessUrl); //获取准入地址,这个接口是后面加的
+		ctx->Answer(Error_Deprecated);
 	}
 private:
 	CCenterSettingEntity* m_pEntity;