Browse Source

Z991239-6201 #comment feat: 修复跨机激活缺陷,增加判断首页才处理

Signed-Off-By: commit-hook
刘文涛80174520 5 months ago
parent
commit
919c137ca0

+ 8 - 0
Module/mod_cardissuerstore/CardIssuerFSM.h

@@ -1314,6 +1314,14 @@ public:
 	bool SyncMaterialCount(IHttpFunc* client,SyncMaterialCountInfo syncInfo);
 	bool CheckIsCrossPreOnline() { return m_bCrossPreOnline; }
 	void ClearCrossPreOnlineFlag() { m_bCrossPreOnline = false; }
+	bool IsInMainPage() {
+		if (m_iInWhatPage == PageType_MainPage) {
+			return true;
+		}
+		else {
+			return false;
+		}
+	}
 protected:
 	int m_iInsertTries;
 	int m_resetTries;

+ 22 - 0
Module/mod_cardissuerstore/mod_cardissuer.h

@@ -151,6 +151,17 @@ public:
 					ctx->Answer(Error_InvalidState, CardIssuerStore_UserErrorCode_CardActive_CardStore_Issuing);
 					return;
 				}
+				else if (!m_fsm.IsInMainPage()) {//判断是否在首页
+					CSimpleStringA strValue;
+					if (this->GetFunction()->GetSysVar("UIState", strValue) == Error_Succeed && strValue.Compare("M") == 0) {
+						DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("PreOnline UIState is M,continue handle");
+					}
+					else {
+						DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("PreOnline req is unhandled UIState is %s,CardissuerStore is busying", strValue.GetData());
+						ctx->Answer(Error_InvalidState, CardIssuerStore_UserErrorCode_CardActive_CardStore_Issuing);
+						return;
+					}
+				}
 			}
 			PreOnlineEvent* e = new PreOnlineEvent();
 			e->ctx = ctx;
@@ -623,6 +634,17 @@ public:
 			ctx->Answer(Error_InvalidState, CardIssuerStore_UserErrorCode_CardActive_CardStore_Issuing);
 			return;
 		}
+		else if (!m_fsm.IsInMainPage()) {
+			CSimpleStringA strValue;
+			if (this->GetFunction()->GetSysVar("UIState", strValue) == Error_Succeed && strValue.Compare("M") == 0) {
+				DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("PreOnline UIState is M,continue handle");
+			}
+			else {
+				DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("PreOnlineCrossJS req is unhandled UIState is %s,CardissuerStore is busying", strValue.GetData());
+				ctx->Answer(Error_InvalidState, CardIssuerStore_UserErrorCode_CardActive_CardStore_Issuing);
+				return;
+			}
+		}
 		else {
 			PreOnlineCrossJSEvent* pEvt = new PreOnlineCrossJSEvent();
 			pEvt->ctx = ctx;