Browse Source

Z991239-6121 #comment feat: 修复卡库新接口查询缺陷

Signed-Off-By: commit-hook
刘文涛80174520 6 months ago
parent
commit
5f6656c6dc

+ 26 - 0
Module/mod_cardissuerstore/CardIssuerFSM.h

@@ -1952,6 +1952,32 @@ struct QuickSelfcheckTask : public ITaskSp
 	}
 };
 
+struct GetCardInStoreJSTask : public ITaskSp
+{
+	CCardIssuerFSM* fsm;
+	SpReqAnsContext<CardIssuerStoreService_GetCardInStoreJS_Req, CardIssuerStoreService_GetCardInStoreJS_Ans>::Pointer ctx;
+	GetCardInStoreJSTask(CCardIssuerFSM* f) : fsm(f) { ctx = NULL; }
+	void Process()
+	{
+		if (ctx != NULL) {
+			fsm->GetCardInStoreJS(ctx);
+		}
+	}
+};
+
+struct QueryHasCardJSTask : public ITaskSp
+{
+	CCardIssuerFSM* fsm;
+	SpReqAnsContext<CardIssuerStoreService_QueryHasCardJS_Req, CardIssuerStoreService_QueryHasCardJS_Ans>::Pointer ctx;
+	QueryHasCardJSTask(CCardIssuerFSM* f) : fsm(f) { ctx = NULL; }
+	void Process()
+	{
+		if (ctx != NULL) {
+			fsm->QueryHasCardJS(ctx);
+		}
+	}
+};
+
 
 #pragma endregion JS接口 工作线程
 

+ 7 - 1
Module/mod_cardissuerstore/mod_cardissuer.h

@@ -383,7 +383,13 @@ public:
 	void GetCardInStoreJS(SpReqAnsContext<CardIssuerStoreService_GetCardInStoreJS_Req, CardIssuerStoreService_GetCardInStoreJS_Ans>::Pointer ctx)
 	{
 		LOG_FUNCTION();
-		m_fsm.GetCardInStoreJS(ctx);
+		//m_fsm.GetCardInStoreJS(ctx);
+		if (!m_fsm.GetDevInitFlag()) {
+			ctx->Answer(Error_DevNotAvailable, CardIssuerStore_UserErrorCode_DevOpen_Failed);
+		}
+		else {
+			m_fsm.GetCardInStoreJS(ctx);
+		}
 	}
 
 	void AddAndReadCardFromBoxJS(SpReqAnsContext<CardIssuerStoreService_AddAndReadCardFromBoxJS_Req, CardIssuerStoreService_AddAndReadCardFromBoxJS_Ans>::Pointer ctx)