Commit a2c63bdd by 李定达

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

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