Skip to content

Commit 8d91e7d

Browse files
committed
fixed:get unread message always commkey queue
1 parent d4058ef commit 8d91e7d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

XEngine_Source/MQCore_DBModule/DBModule_MQData/DBModule_MQData.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ bool CDBModule_MQData::DBModule_MQData_GetLeftCount(LPCXSTR lpszTableName, int n
842842
XCHAR tszSQLStatement[1024];
843843
memset(tszSQLStatement, '\0', sizeof(tszSQLStatement));
844844

845-
_xstprintf(tszSQLStatement, _X("SELECT COUNT(*) FROM %s WHERE serial > %d"), lpszTableName, nSerial);
845+
_xstprintf(tszSQLStatement, _X("SELECT COUNT(*) FROM %s WHERE nQueueSerial > %d"), lpszTableName, nSerial);
846846
if (!DataBase_MySQL_ExecuteQuery(xhDBSQL, &xhTable, tszSQLStatement, &nllLine, &nllRow))
847847
{
848848
DBModule_IsErrorOccur = true;

XEngine_Source/XEngine_MQServiceApp/MQService_TCPTask.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,7 @@ bool MessageQueue_TCP_Handle(XENGINE_PROTOCOLHDR* pSt_ProtocolHdr, LPCXSTR lpszC
893893
{
894894
int nListCount = 0;
895895
XENGINE_DBUSERKEY** ppSt_UserKey;
896-
DBModule_MQUser_KeyList(tszUserName, st_MQProtocol.tszMQKey, &ppSt_UserKey, &nListCount);
896+
DBModule_MQUser_KeyList(tszUserName, _X(""), &ppSt_UserKey, &nListCount);
897897

898898
pSt_ProtocolHdr->unOperatorCode = XENGINE_COMMUNICATION_PROTOCOL_OPERATOR_CODE_MQ_REPUNREAD;
899899
XHANDLE xhUNRead = ProtocolModule_Packet_UNReadCreate(pSt_ProtocolHdr, XENGINE_MQAPP_NETTYPE_TCP == nNetType ? ENUM_XENGINE_PROTOCOLHDR_PAYLOAD_TYPE_BIN : ENUM_XENGINE_PROTOCOLHDR_PAYLOAD_TYPE_JSON);

0 commit comments

Comments
 (0)