Commit a2c63bdd by 李定达

1.修复拉单超时时间bug;2.调整网络异常拉单补偿

parent 2fcdb97e
......@@ -71,7 +71,7 @@ void OrderGetWork::workstart()
{
unsigned int tmptime = _timeout;
unsigned int nexttime = _timeout;
unsigned int nexttime = VALUE_PULLSYNCTIME;
QString error;
do
......@@ -89,16 +89,16 @@ void OrderGetWork::workstart()
}
tmptime = nexttime;
QLOG_INFO() << QThread::currentThreadId() << "next workStart timeout : " << tmptime;
}while(0);
QLOG_INFO() << QThread::currentThreadId() << "next workStart timeout : " << tmptime;
if(_stopflag)
break;
QEventLoop loop;
QTimer::singleShot(tmptime*1000, &loop, &QEventLoop::quit);
QTimer::singleShot(tmptime, &loop, &QEventLoop::quit);
connect(this, &OrderGetWork::quit, &loop, &QEventLoop::quit);
connect(this, &OrderGetWork::quitwork, &loop, &QEventLoop::quit);
......@@ -269,6 +269,8 @@ void OrderGetWork::setStoreinfo(const QVariantMap &storeinfo)
bool OrderGetWork::PullOrder(unsigned int timeout, QString &error)
{
_timeout = VALUE_PULLSYNCTIME;
error.clear();
QJsonObject json, recvjson;
......@@ -294,6 +296,7 @@ bool OrderGetWork::PullOrder(unsigned int timeout, QString &error)
if(!this->S_Request(json, recvjson, realurl, error))
{
_timeout = 10000;
error = QString::fromLocal8Bit("拉单失败,网络错误:").append(error);
QLOG_ERROR() << "pullorder failed : " << error;
return false;
......
......@@ -4,8 +4,8 @@
#include <winver.h>
#endif
VS_VERSION_INFO VERSIONINFO
FILEVERSION 3,0,0,6
PRODUCTVERSION 3,0,0,6
FILEVERSION 3,0,0,8
PRODUCTVERSION 3,0,0,8
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
......@@ -22,12 +22,12 @@ VS_VERSION_INFO VERSIONINFO
BEGIN
VALUE "CompanyName", "ShangHai Freemud Co., Ltd."
VALUE "FileDescription", "FREEMUD Manager System"
VALUE "FileVersion", "3.0.0.6"
VALUE "FileVersion", "3.0.0.8"
VALUE "InternalName", "FREEMUD"
VALUE "LegalCopyright", "Copyright (C)2017-2020"
VALUE "OriginalFilename", "fmTakeout.exe"
VALUE "ProductName", "fmTakeout"
VALUE "ProductVersion", "3.0.0.6"
VALUE "ProductVersion", "3.0.0.8"
END
END
BLOCK "VarFileInfo"
......
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