初步修复
This commit is contained in:
parent
8fc4357cc6
commit
e4714f3f0e
46705 changed files with 12004901 additions and 0 deletions
50
Server/DNLogServer/DNSQLConnection.cpp
Normal file
50
Server/DNLogServer/DNSQLConnection.cpp
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
#include "StdAfx.h"
|
||||
#include "DNSQLConnection.h"
|
||||
#include "Util.h"
|
||||
#include "Log.h"
|
||||
#include "DNServiceConnection.h"
|
||||
|
||||
CDNSQLConnection::CDNSQLConnection(void): CSQLConnection()
|
||||
{
|
||||
}
|
||||
|
||||
CDNSQLConnection::~CDNSQLConnection(void)
|
||||
{
|
||||
}
|
||||
|
||||
int CDNSQLConnection::QueryLog(TLog *pLog)
|
||||
{
|
||||
WCHAR wszQuery[QUERYSIZEMAX];
|
||||
memset(wszQuery, 0, sizeof(WCHAR)*QUERYSIZEMAX);
|
||||
|
||||
char szParam[LOGPARAMSIZEMAX] = { 0, };
|
||||
_strcpy(szParam, LOGPARAMSIZEMAX, pLog->szParam, pLog->wParamSize);
|
||||
|
||||
swprintf(wszQuery, L"{CALL GameLog('%u','%I64d','%d','%d','%d','%d','%S')}",
|
||||
pLog->nAccountDBID, pLog->biCharacterDBID, pLog->nSessionID, pLog->cWorldID, pLog->nLogType, pLog->wTotalParamCount, szParam);
|
||||
|
||||
if (CommonResultQuery(wszQuery) != ERROR_NONE){
|
||||
g_Log.Log(LogType::_FILELOG, L"[Q:%s]\r\n", wszQuery);
|
||||
return ERROR_DB;
|
||||
}
|
||||
|
||||
return ERROR_NONE;
|
||||
}
|
||||
|
||||
int CDNSQLConnection::QueryLog( TLogFile* pLog )
|
||||
{
|
||||
WCHAR wszBuf[(1024 * 2) + 1];
|
||||
memset(wszBuf, 0, sizeof(wszBuf));
|
||||
ConvertQuery(pLog->wszBuf, 1024, wszBuf, _countof(wszBuf));
|
||||
|
||||
WCHAR wszQuery[QUERYSIZEMAX];
|
||||
memset(wszQuery, 0, sizeof(WCHAR)*QUERYSIZEMAX);
|
||||
swprintf(wszQuery, L"{?=CALL P_AddCommonLog('%d','%d','%d','%d','%I64d','%d',N'%s','%d')}", pLog->unLogType, pLog->unServerType, pLog->unWorldSetID, pLog->uiAccountDBID, pLog->biCharDBID, pLog->uiSessionID, wszBuf, pLog->nServerID );
|
||||
|
||||
if (CommonResultQuery(wszQuery) != ERROR_NONE){
|
||||
g_Log.Log(LogType::_FILELOG, L"[Q:%s]\r\n", wszQuery);
|
||||
return ERROR_DB;
|
||||
}
|
||||
|
||||
return ERROR_NONE;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue