Commit d0ebe816 by 刘帅

1. 优化流程

2. 整理文件和代码
parent e391071b
......@@ -2,4 +2,5 @@
/bin/*
!/bin/*.dll
!/bin/*.ini
......@@ -2,7 +2,7 @@ INCLUDEPATH += $$PWD
#DEFINES += QS_LOG_LINE_NUMBERS # automatically writes the file and line for each log message
#DEFINES += QS_LOG_DISABLE # logging code is replaced with a no-op
#DEFINES += QS_LOG_SEPARATE_THREAD # messages are queued and written from a separate thread
#DEFINES += QS_LOG_WIN_PRINTF_CONSOLE # Use fprintf instead of OutputDebugString on Windows
DEFINES += QS_LOG_WIN_PRINTF_CONSOLE # Use fprintf instead of OutputDebugString on Windows
SOURCES += $$PWD/QsLogDest.cpp \
$$PWD/QsLog.cpp \
$$PWD/QsLogDestConsole.cpp \
......
[store]
partner_id=1371
store_id=fm99999
pos_id=1
operator_id=001
business_date=20171016
......@@ -2,6 +2,7 @@
#include <QJsonArray>
#include <QJsonDocument>
#include <QDebug>
#include "QsLog/QsLog.h"
Convert::Convert()
{
......@@ -70,7 +71,7 @@ bool Convert::QueryPay(QJsonObject &object, STORE_INFO store_info)
}
else
{
qDebug()<<"can not find trans_id in json request!";
QLOG_ERROR()<<"can not find trans_id in json request!";
return false;
}
if(object.contains("fm_order_id"))
......
......@@ -30,8 +30,8 @@ static void InitLogger()
QsLogging::MaxOldLogCount(logCount)));
logger.addDestination(fileDestination);
/* 输出到控制台 */
// QsLogging::DestinationPtr consleDest(QsLogging::DestinationFactory::MakeDebugOutputDestination());
// logger.addDestination(consleDest);
QsLogging::DestinationPtr consleDest(QsLogging::DestinationFactory::MakeDebugOutputDestination());
logger.addDestination(consleDest);
}
#endif // LOG
......
......@@ -9,7 +9,7 @@ int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
InitLogger();
QLOG_INFO()<<"start";
QLOG_INFO()<<"start client...";
QFmClient client;
client.start();
return a.exec();
......
......@@ -54,7 +54,8 @@ private:
int CheckReqFromPos(char *pJsonData, int dLength, int chkValue);
int SendSocketData(int sock, char *buf, int length, int flag);
char *EncodeSendData(char *buf, int length, int *eLength);
int SendData2ZhProxyAndWaitRspData();
int SendData2ZhProxy();
int ProcessZhProxyRspData(int nType);
int RecvAndCheckDataFromSock(int sock, int flag, int type);
int ProcessZhProxyRspDataAndSend2Pos(int nType);
int CheckRecvedData();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment