Commit 7a595b3f by 李定达

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

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