Commit 7a595b3f by 李定达

1.调整rollback的创建时间在日志初始化之后

parent 8aeb501b
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#define PRINT_FILE_NAME "print.txt" #define PRINT_FILE_NAME "print.txt"
#define USERCONFIG_NAME "config.ini" //#define USERCONFIG_NAME "config.ini"
#define ENCODE_FIRST "encode/first" #define ENCODE_FIRST "encode/first"
#define ENCODE_END "encode/end" #define ENCODE_END "encode/end"
......
...@@ -30,28 +30,28 @@ public: ...@@ -30,28 +30,28 @@ public:
return false; return false;
} }
static bool GetResponseWithType(ReqType type, const QByteArray &rspJsonData, AlipayResponse &response) // static bool GetResponseWithType(ReqType type, const QByteArray &rspJsonData, AlipayResponse &response)
{ // {
QJsonParseError parseError; // QJsonParseError parseError;
QJsonDocument doc = QJsonDocument::fromJson(rspJsonData, &parseError); // QJsonDocument doc = QJsonDocument::fromJson(rspJsonData, &parseError);
if(parseError.error != QJsonParseError::NoError) { // if(parseError.error != QJsonParseError::NoError) {
return false; // return false;
} // }
QJsonObject rspJsonObj = doc.object(); // QJsonObject rspJsonObj = doc.object();
if(type == pay) // if(type == pay)
return GetPayResponse(rspJsonObj, response); // return GetPayResponse(rspJsonObj, response);
if(type == refund) // if(type == refund)
return GetRefundResponse(rspJsonObj, response); // return GetRefundResponse(rspJsonObj, response);
if(type == endday) // if(type == endday)
return GetDayEndResponse(rspJsonObj, response); // return GetDayEndResponse(rspJsonObj, response);
if(type == againprint) // if(type == againprint)
return GetAgainPrinteResponse(rspJsonObj, response); // return GetAgainPrinteResponse(rspJsonObj, response);
if(type == finds) // if(type == finds)
return GetFindResponse(rspJsonObj, response); // return GetFindResponse(rspJsonObj, response);
return false; // return false;
} // }
private: private:
//支付 //支付
...@@ -186,31 +186,31 @@ private: ...@@ -186,31 +186,31 @@ private:
return true; return true;
} }
// 支付AlipayResponse // // 支付AlipayResponse
static bool GetPayResponse(const QJsonObject &rspJsonObj, AlipayResponse &response) // static bool GetPayResponse(const QJsonObject &rspJsonObj, AlipayResponse &response)
{ // {
return false; // return false;
} // }
// 退款AlipayResponse // // 退款AlipayResponse
static bool GetRefundResponse(const QJsonObject &rspJsonObj, AlipayResponse &response) // static bool GetRefundResponse(const QJsonObject &rspJsonObj, AlipayResponse &response)
{ // {
return true; // return true;
} // }
// 日结AlipayResponse // // 日结AlipayResponse
static bool GetDayEndResponse(const QJsonObject &rspJsonObj, AlipayResponse &response) // static bool GetDayEndResponse(const QJsonObject &rspJsonObj, AlipayResponse &response)
{ // {
return true; // return true;
} // }
// 重打小票AlipayResponse // // 重打小票AlipayResponse
static bool GetAgainPrinteResponse(const QJsonObject &rspJsonObj, AlipayResponse &response) // static bool GetAgainPrinteResponse(const QJsonObject &rspJsonObj, AlipayResponse &response)
{ // {
return true; // return true;
} // }
// 查询AlipayResponse // // 查询AlipayResponse
static bool GetFindResponse(const QJsonObject &rspJsonObj, AlipayResponse &response) // static bool GetFindResponse(const QJsonObject &rspJsonObj, AlipayResponse &response)
{ // {
return true; // return true;
} // }
}; };
......
...@@ -19,8 +19,6 @@ ...@@ -19,8 +19,6 @@
EXTERN_C IMAGE_DOS_HEADER __ImageBase; EXTERN_C IMAGE_DOS_HEADER __ImageBase;
RollBack rollback;
BOOL WINAPI DllMain( HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpvReserved*/ ) BOOL WINAPI DllMain( HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpvReserved*/ )
{ {
static bool ownApplication = FALSE; static bool ownApplication = FALSE;
...@@ -67,8 +65,9 @@ extern "C" __declspec(dllexport) void Start(const char *indata, char *outdata) ...@@ -67,8 +65,9 @@ extern "C" __declspec(dllexport) void Start(const char *indata, char *outdata)
logger.addDestination(consleDest); logger.addDestination(consleDest);
static RollBack rollback;
Control control(&win); Control control(&win);
if(!rollback.isRunning())
rollback.start(); rollback.start();
control.Start(indata, outdata); control.Start(indata, outdata);
} }
......
...@@ -16,7 +16,7 @@ include("./DataProcess/DataProcess.pri") ...@@ -16,7 +16,7 @@ include("./DataProcess/DataProcess.pri")
LIBS += -L"C:/openssl2/openssl-1.0.2l/out32dll" -llibeay32 LIBS += -L"C:/openssl2/openssl-1.0.2l/out32dll" -llibeay32
LIBS += -L"C:/openssl2/openssl-1.0.2l/out32dll" -lssleay32 LIBS += -L"C:/openssl2/openssl-1.0.2l/out32dll" -lssleay32
CONFIG += C++11 CONFIG += C++11 SBKDLL
include($$PWD/qtwinmigrate/src/qtwinmigrate.pri) include($$PWD/qtwinmigrate/src/qtwinmigrate.pri)
......
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