Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
takeout_sbk
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yunpeng.song
takeout_sbk
Commits
f40d6891
Commit
f40d6891
authored
Aug 01, 2022
by
wuyang.zou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New Feature: dataBase access success But Connect Redis Failed,Need While Retry
Version: 4.2022.8.1
parent
b174e683
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
99 additions
and
47 deletions
+99
-47
ReadMe.md
+5
-5
fmTakeout/Control/flowControl.cpp
+10
-12
fmTakeout/Control/flowControl.h
+1
-0
fmTakeout/DTools/pmsGetStoreConfig.cpp
+2
-3
fmTakeout/DTools/qtRedisClient.cpp
+52
-21
fmTakeout/DTools/qtRedisClient.h
+1
-1
fmTakeout/Model/orderObject.h
+22
-0
fmTakeout/fmTakeout.rc
+4
-4
fmTakeout/preDefine.h
+2
-1
No files found.
ReadMe.md
View file @
f40d6891
# StarBucks P
ms
Plugin
# StarBucks P
cs(pms)
Plugin
## 目录
## 目录
*
[
背景介绍
](
#背景介绍
)
*
[
背景介绍
](
#背景介绍
)
...
@@ -9,8 +9,8 @@
...
@@ -9,8 +9,8 @@
<a
name=
"背景介绍"
></a>
<a
name=
"背景介绍"
></a>
## 背景介绍
## 背景介绍
*功能*
:为 Starbucks 生产管理系统 P
MS, 同步线上订单到PM
S本地数据库中
<br/>
*功能*
:为 Starbucks 生产管理系统 P
CS, 同步线上订单到PC
S本地数据库中
<br/>
*意义*
:是帮助P
M
S集成 门店全部渠道的全部订单 不可或缺的功能;
*意义*
:是帮助P
C
S集成 门店全部渠道的全部订单 不可或缺的功能;
<a
name=
"开发说明"
></a>
<a
name=
"开发说明"
></a>
## 开发
## 开发
...
@@ -18,13 +18,13 @@
...
@@ -18,13 +18,13 @@
*
【开发】 为了集成 QRedis,把编译器版本提升至 MSVC2015, 使用 Qt 5.9.8, 使用Qt Create 4.8.2;
<br/>
*
【开发】 为了集成 QRedis,把编译器版本提升至 MSVC2015, 使用 Qt 5.9.8, 使用Qt Create 4.8.2;
<br/>
*
【编译】
<br/>
*
【编译】
<br/>
<1>
QRedis 是使用源码集成到项目中,需要注意仓库地址版本,特别注意存在submodule;
<br/>
<1>
QRedis 是使用源码集成到项目中,需要注意仓库地址版本
[
https://github.com/uglide/qredisclient
]
,特别注意存在submodule;
<br/>
<2>
插件使用了https 通信协议,代码中 使能 QSslConfiguration,故需要使用MSVC2015 编译 Openssl源码,得到两个库文件(libeay32.dll , ssleay32.dll),放置与该插件应用目录下;
<br/>
<2>
插件使用了https 通信协议,代码中 使能 QSslConfiguration,故需要使用MSVC2015 编译 Openssl源码,得到两个库文件(libeay32.dll , ssleay32.dll),放置与该插件应用目录下;
<br/>
<3>
本次插件也使用了 MYSQL 数据库,故需要使用 源码编译 Mysql数据库连接动态库: libmysql.dll
<br/>
<3>
本次插件也使用了 MYSQL 数据库,故需要使用 源码编译 Mysql数据库连接动态库: libmysql.dll
<br/>
*
【测试】
<br/>
*
【测试】
<br/>
<1>
功能等同 PosPlugin:显示门店营业状态,展示订单,心跳检查,网络状态展示,同步订单,自测订单,部分渠道退单等功能;
<br/>
<1>
功能等同 PosPlugin:显示门店营业状态,展示订单,心跳检查,网络状态展示,同步订单,自测订单,部分渠道退单等功能;
<br/>
<2>
特别功能:插订单数据到 P
M
S 本地数据库,通过 RedisList 进行消息同步;
<br/>
<2>
特别功能:插订单数据到 P
C
S 本地数据库,通过 RedisList 进行消息同步;
<br/>
*
【git repo】仓库地址:git@scm.starbucks.com:china/delivery-postakeout.git
*
【git repo】仓库地址:git@scm.starbucks.com:china/delivery-postakeout.git
分支:pmsDevelop
<br/>
分支:pmsDevelop
<br/>
...
...
fmTakeout/Control/flowControl.cpp
View file @
f40d6891
...
@@ -2194,17 +2194,16 @@ bool FlowControl::_ResponseHM21Request(const QJsonObject &content, QJsonObject &
...
@@ -2194,17 +2194,16 @@ bool FlowControl::_ResponseHM21Request(const QJsonObject &content, QJsonObject &
return
result
;
return
result
;
}
}
bool
FlowControl
::
_PmsMachineReqTryLogin
()
bool
FlowControl
::
_PmsMachineReqTryLogin
()
{
{
QLOG_INFO
()
<<
__FUNCTION__
;
/********************* 从PMS Mysql数据库中读取门店信息 *****************************/
/********************* 从PMS Mysql数据库中读取门店信息 *****************************/
if
(
!
m_initPmsGetStoreConfigDBRet
)
{
if
(
!
m_initPmsGetStoreConfigDBRet
)
{
PmsGetStoreConfig
::
getInstance
();
PmsGetStoreConfig
::
getInstance
();
m_initPmsGetStoreConfigDBRet
=
PmsGetStoreConfig
::
getInstance
().
initPmsStoreConfigDB
();
m_initPmsGetStoreConfigDBRet
=
PmsGetStoreConfig
::
getInstance
().
initPmsStoreConfigDB
();
QLOG_INFO
()
<<
QString
::
fromLocal8Bit
(
"[<<<<---FlowControl::_PmsMachineReqTryLogin() m_initPmsGetStoreConfigDBRet:--->>>>]"
)
QLOG_INFO
()
<<
QString
::
fromLocal8Bit
(
"[<<<<---FlowControl::_PmsMachineReqTryLogin() m_initPmsGetStoreConfigDBRet:--->>>>]"
)
<<
m_initPmsGetStoreConfigDBRet
;
<<
m_initPmsGetStoreConfigDBRet
;
if
(
!
m_initPmsGetStoreConfigDBRet
)
{
if
(
!
m_initPmsGetStoreConfigDBRet
)
{
QLOG_ERROR
()
<<
QString
::
fromLocal8Bit
(
"[<<<<---FlowControl::_PmsMachineReqTryLogin() m_initPmsGetStoreConfigDBRet Retry Still
Null
, Wait Next...--->>>>>]"
);
QLOG_ERROR
()
<<
QString
::
fromLocal8Bit
(
"[<<<<---FlowControl::_PmsMachineReqTryLogin() m_initPmsGetStoreConfigDBRet Retry Still
Failed
, Wait Next...--->>>>>]"
);
return
false
;
return
false
;
}
}
}
}
...
@@ -2212,27 +2211,26 @@ bool FlowControl::_PmsMachineReqTryLogin()
...
@@ -2212,27 +2211,26 @@ bool FlowControl::_PmsMachineReqTryLogin()
if
(
!
m_initPmsOrdersDataRet
)
{
if
(
!
m_initPmsOrdersDataRet
)
{
PmsOrdersData
::
getInstance
();
PmsOrdersData
::
getInstance
();
m_initPmsOrdersDataRet
=
PmsOrdersData
::
getInstance
().
initPmsOrdersData
();
m_initPmsOrdersDataRet
=
PmsOrdersData
::
getInstance
().
initPmsOrdersData
();
QLOG_INFO
()
<<
QString
::
fromLocal8Bit
(
"[<<<<---FlowControl::_PmsMachineReqTryLogin() m_initPmsOrdersDataRet:--->>>>]"
)
QLOG_INFO
()
<<
QString
::
fromLocal8Bit
(
"[<<<<---FlowControl::_PmsMachineReqTryLogin() m_initPmsOrdersDataRet:--->>>>]"
)
<<
m_initPmsOrdersDataRet
;
<<
m_initPmsOrdersDataRet
;
if
(
!
m_initPmsOrdersDataRet
)
{
if
(
!
m_initPmsOrdersDataRet
)
{
QLOG_ERROR
()
<<
QString
::
fromLocal8Bit
(
"[<<<<---FlowControl::_PmsMachineReqTryLogin() m_initPmsOrdersDataRet Retry Still
Null
, Wait Next...--->>>>>]"
);
QLOG_ERROR
()
<<
QString
::
fromLocal8Bit
(
"[<<<<---FlowControl::_PmsMachineReqTryLogin() m_initPmsOrdersDataRet Retry Still
Failed
, Wait Next...--->>>>>]"
);
return
false
;
return
false
;
}
}
}
}
bool
bGetStoreCnf
=
PmsGetStoreConfig
::
getInstance
().
GetStoreConfig
(
m_storeId
,
m_posId
,
m_cashierId
,
m_cashierName
,
m_pmsMachineNo
);
bool
bGetStoreCnf
=
PmsGetStoreConfig
::
getInstance
().
GetStoreConfig
(
m_storeId
,
m_posId
,
m_cashierId
,
m_cashierName
,
m_pmsMachineNo
);
if
(
!
bGetStoreCnf
)
{
if
(
!
bGetStoreCnf
)
{
QLOG_ERROR
()
<<
QString
::
fromLocal8Bit
(
"[<<<<---FlowControl::_PmsMachineReqTryLogin() GetStoreConfig Still Failed, Wait Next...--->>>>>]"
);
QLOG_ERROR
()
<<
QString
::
fromLocal8Bit
(
"[<<<<---FlowControl::_PmsMachineReqTryLogin() GetStoreConfig Still Failed, Wait Next...--->>>>>]"
);
return
false
;
// Wait Next LoginTimer Trigger Check Connect DB Success;
return
false
;
// Wait Next LoginTimer Trigger Check Connect DB Success;
}
}
if
(
!
m_initPmsRedisRet
)
{
if
(
!
m_initPmsRedisRet
)
{
Sleep
(
3
*
1000
);
QLOG_INFO
()
<<
QString
::
fromLocal8Bit
(
"[<<<<---FlowControl::_PmsMachineReqTryLogin() Begin initQtRedisClient()--->>>>]"
);
m_initPmsRedisRet
=
QtRedisClient
::
getInstance
().
initQtRedisClient
();
m_initPmsRedisRet
=
QtRedisClient
::
getInstance
().
initQtRedisClient
();
QLOG_INFO
()
<<
QString
::
fromLocal8Bit
(
"[<<<<---FlowControl::_PmsMachineReqTryLogin() m_initPmsRedisRet:--->>>>]"
)
QLOG_INFO
()
<<
QString
::
fromLocal8Bit
(
"[<<<<---FlowControl::_PmsMachineReqTryLogin() m_initPmsRedisRet:--->>>>]"
)
<<
m_initPmsRedisRet
;
<<
m_initPmsRedisRet
;
if
(
!
m_initPmsRedisRet
)
{
if
(
!
m_initPmsRedisRet
)
{
QLOG_ERROR
()
<<
QString
::
fromLocal8Bit
(
"[<<<<---FlowControl::_PmsMachineReqTryLogin() m_initPmsRedisRet Retry Still
Null
, Wait Next...--->>>>>]"
);
QLOG_ERROR
()
<<
QString
::
fromLocal8Bit
(
"[<<<<---FlowControl::_PmsMachineReqTryLogin() m_initPmsRedisRet Retry Still
False
, Wait Next...--->>>>>]"
);
return
false
;
// Wait Next LoginTimer Trigger Check Connect Redis Success;
return
false
;
// Wait Next LoginTimer Trigger Check Connect Redis Success;
}
}
}
}
...
...
fmTakeout/Control/flowControl.h
View file @
f40d6891
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
#include "Model/dishesObject.h"
#include "Model/dishesObject.h"
#include "LocalServer/localHttpServer.h"
#include "LocalServer/localHttpServer.h"
#include "alertForm.h"
#include "alertForm.h"
#include <WinSock.h>
#include <QMap>
#include <QMap>
#include <JQHttpServer.h>
#include <JQHttpServer.h>
#include <QMutex>
#include <QMutex>
...
...
fmTakeout/DTools/pmsGetStoreConfig.cpp
View file @
f40d6891
...
@@ -93,9 +93,8 @@ bool PmsGetStoreConfig::GetStoreConfig(QString& storeId, QString& posId,
...
@@ -93,9 +93,8 @@ bool PmsGetStoreConfig::GetStoreConfig(QString& storeId, QString& posId,
bSelectRetNum
++
;
bSelectRetNum
++
;
}
}
QLOG_INFO
()
<<
QString
(
"[<<<<---PmsGetStoreConfig::GetStoreConfig storeId:%1,posId:%2,cashierId:%3,"
QLOG_INFO
()
<<
QString
(
"[<<<<---PmsGetStoreConfig::GetStoreConfig storeId:%1,posId:%2,cashierId:%3,cashierName:%4,pmsMachineNo:%5--->>>>]"
)
"cashierName:%4,pmsMachineNo:%5--->>>>]"
).
arg
(
storeId
).
arg
(
posId
)
.
arg
(
storeId
).
arg
(
posId
).
arg
(
cashierId
).
arg
(
cashierName
).
arg
(
pmsMachineNo
);
.
arg
(
cashierId
).
arg
(
cashierName
).
arg
(
pmsMachineNo
);
m_sqlDb
.
close
();
m_sqlDb
.
close
();
}
}
//判断上面 5 个配置数据是否查询成功;
//判断上面 5 个配置数据是否查询成功;
...
...
fmTakeout/DTools/qtRedisClient.cpp
View file @
f40d6891
...
@@ -7,61 +7,91 @@ QtRedisClient::QtRedisClient()
...
@@ -7,61 +7,91 @@ QtRedisClient::QtRedisClient()
QLOG_INFO
()
<<
"[<<<<---QtRedisClient:: ConStructure Redis Begin --->>>>]"
;
QLOG_INFO
()
<<
"[<<<<---QtRedisClient:: ConStructure Redis Begin --->>>>]"
;
initRedisClient
();
initRedisClient
();
m_redisIp
=
ConfigManger
::
GetInstance
().
GetRedisIpConfig
();
m_redisIp
=
ConfigManger
::
GetInstance
().
GetRedisIpConfig
();
//m_redisPassword = ConfigManger::GetInstance().GetRedisPasswordConfig();
// m_redisPassword = ConfigManger::GetInstance().GetRedisPasswordConfig();
m_RedisConnectCnf
.
setHost
(
m_redisIp
.
length
()
?
m_redisIp
:
"127.0.0.1"
);
m_RedisConnectCnf
.
setHost
(
m_redisIp
.
length
()
?
m_redisIp
:
"127.0.0.1"
);
m_RedisConnectCnf
.
setPort
(
6379
);
m_RedisConnectCnf
.
setPort
(
6379
);
m_pRedisConnectOperat
=
new
RedisClient
::
Connection
(
m_RedisConnectCnf
);
m_pRedisConnectOperat
=
new
RedisClient
::
Connection
(
m_RedisConnectCnf
);
if
(
!
m_pRedisConnectOperat
){
if
(
!
m_pRedisConnectOperat
)
{
QLOG_INFO
()
<<
"[<<<<---QtRedisClient:: ConStructure QtRedisClient m_pRedisConnectOperat Failed--->>>>]"
;
QLOG_ERROR
()
<<
"[<<<<---QtRedisClient:: ConStructure QtRedisClient m_pRedisConnectOperat New Failed--->>>>]"
;
}
else
{
QLOG_INFO
()
<<
"[<<<<---QtRedisClient:: ConStructure QtRedisClient m_pRedisConnectOperat New Success--->>>>]"
;
}
}
}
}
QtRedisClient
&
QtRedisClient
::
getInstance
()
QtRedisClient
&
QtRedisClient
::
getInstance
()
{
{
static
QtRedisClient
qtRedisClient
;
static
QtRedisClient
qtRedisClient
;
return
qtRedisClient
;
return
qtRedisClient
;
}
}
bool
QtRedisClient
::
initQtRedisClient
(){
bool
QtRedisClient
::
initQtRedisClient
(){
bool
initRedisRet
=
false
;
bool
initRedisRet
=
false
;
if
(
!
m_pRedisConnectOperat
)
{
if
(
!
m_pRedisConnectOperat
)
{
QLOG_ERROR
()
<<
"[<<<<---QtRedisClient::initQtRedisClient m_pRedisConnectOperat is NULL, Will Retry Connect Redis--->>>>]"
;
QLOG_ERROR
()
<<
"[<<<<---QtRedisClient::initQtRedisClient m_pRedisConnectOperat is NULL, Will Retry Connect Redis--->>>>]"
;
m_RedisConnectCnf
.
setHost
(
m_redisIp
.
length
()
?
m_redisIp
:
"127.0.0.1"
);
m_RedisConnectCnf
.
setHost
(
m_redisIp
.
length
()
?
m_redisIp
:
"127.0.0.1"
);
m_RedisConnectCnf
.
setPort
(
6379
);
m_RedisConnectCnf
.
setPort
(
6379
);
m_pRedisConnectOperat
=
new
RedisClient
::
Connection
(
m_RedisConnectCnf
);
try
{
m_pRedisConnectOperat
=
new
RedisClient
::
Connection
(
m_RedisConnectCnf
);
}
catch
(
const
RedisClient
::
Connection
::
Exception
&
e
)
{
// SSHSupportException && InvalidModeException;
QLOG_ERROR
()
<<
"[<<<<---QtRedisClient:: initQtRedisClient m_pRedisConnectOperat New Connection Exception: --->>>>]"
<<
e
.
what
();
return
initRedisRet
;
}
if
(
!
m_pRedisConnectOperat
){
if
(
!
m_pRedisConnectOperat
){
QLOG_
INFO
()
<<
"[<<<<---QtRedisClient:: initQtRedisClient m_pRedisConnectOperat Retry Connect Redis Failed
--->>>>]"
;
QLOG_
ERROR
()
<<
"[<<<<---QtRedisClient:: initQtRedisClient m_pRedisConnectOperat New Connection Still Failed, Wait Next Init*Client
--->>>>]"
;
return
initRedisRet
;
return
initRedisRet
;
}
}
}
else
{
QLOG_INFO
()
<<
"[<<<<---QtRedisClient:: initQtRedisClient m_pRedisConnectOperat Is Normal , Maybe Connect Redis Success --->>>>]"
;
}
try
{
if
(
m_pRedisConnectOperat
->
isConnected
()
||
m_pRedisConnectOperat
->
connect
()
)
{
QLOG_INFO
()
<<
"[<<<<---QtRedisClient:: initQtRedisClient Connect Redis Success --->>>>]"
;
}
else
{
while
(
1
)
{
QLOG_INFO
()
<<
"[<<<<---QtRedisClient:: initQtRedisClient Connect Redis Failed, Sleep 5s Then Retry Connect... --->>>>]"
;
Sleep
(
5
*
1000
);
if
(
m_pRedisConnectOperat
->
connect
()
)
break
;
else
continue
;
}
QLOG_INFO
()
<<
"[<<<<---QtRedisClient:: initQtRedisClient Connect Redis Success --->>>>]"
;
}
}
catch
(
const
RedisClient
::
Connection
::
Exception
&
e
)
{
QLOG_ERROR
()
<<
"QtRedisClient::initQtRedisClient Connect Redis Occur Exception:"
<<
e
.
what
();
return
initRedisRet
;
}
}
QList
<
QByteArray
>
cmdInfoAllTest
;
cmdInfoAllTest
.
append
(
"INFO"
);
cmdInfoAllTest
.
append
(
"ALL"
);
try
{
try
{
m_pRedisConnectOperat
->
connect
();
QList
<
QByteArray
>
cmdInfoAllTest
;
auto
result
=
m_pRedisConnectOperat
->
commandSync
(
cmdInfoAllTest
);
cmdInfoAllTest
.
append
(
"INFO"
);
QVariant
val
=
result
.
value
();
cmdInfoAllTest
.
append
(
"ALL"
);
QLOG_INFO
()
<<
RedisClient
::
Response
::
valueToHumanReadString
(
val
);
auto
result
=
m_pRedisConnectOperat
->
command
(
cmdInfoAllTest
);
//m_pRedisConnectOperat->disconnect(); //避免频繁重复操作,故不 disconnect;
QVariant
var
=
result
.
result
().
value
();
QLOG_INFO
()
<<
RedisClient
::
Response
::
valueToHumanReadString
(
var
);
/* [](RedisClient::Response r) { const QVariant val = r.value(); QLOG_INFO() << RedisClient::Response::valueToHumanReadString( val ); } */
// m_pRedisConnectOperat->disconnect(); //避免频繁重复操作,故不 disconnect;
initRedisRet
=
true
;
initRedisRet
=
true
;
}
catch
(
const
RedisClient
::
Connection
::
Exception
&
e
)
{
}
catch
(
const
RedisClient
::
Connection
::
Exception
&
e
)
{
QLOG_ERROR
()
<<
"QtRedisClient::initQtRedisClient Cannot
run c
ommand:"
<<
e
.
what
();
QLOG_ERROR
()
<<
"QtRedisClient::initQtRedisClient Cannot
Run C
ommand:"
<<
e
.
what
();
}
}
QLOG_INFO
()
<<
"[<<<<---QtRedisClient::initQtRedisClient initRedisRet:--->>>>]"
<<
initRedisRet
;
QLOG_INFO
()
<<
"[<<<<---QtRedisClient::initQtRedisClient initRedisRet:--->>>>]"
<<
initRedisRet
;
return
initRedisRet
;
return
initRedisRet
;
}
}
bool
QtRedisClient
::
testOrderRedisExist
(
const
QString
&
orderId
){
bool
QtRedisClient
::
testOrderRedisExist
(
const
QString
&
orderId
){
bool
bOrderExist
=
false
;
bool
bOrderExist
=
false
;
QList
<
QByteArray
>
cmdString
;
QList
<
QByteArray
>
cmdString
;
cmdString
.
append
(
"GET"
);
cmdString
.
append
(
"GET"
);
cmdString
.
append
(
"ZWY"
);
cmdString
.
append
(
"ZWY"
);
try
{
try
{
auto
result
=
m_pRedisConnectOperat
->
command
Sync
(
cmdString
);
auto
result
=
m_pRedisConnectOperat
->
command
(
cmdString
);
QVariant
val
=
result
.
value
();
QVariant
val
=
result
.
result
().
value
();
Q_UNUSED
(
orderId
);
//
Q_UNUSED(orderId);
if
(
val
.
toString
().
length
()){
if
(
val
.
toString
().
length
()){
QLOG_INFO
()
<<
QString
(
"[<<<<---QtRedisClient::isOrderRedisExist orderId:%1 Exist ; value:%2:--->>>>]"
).
arg
(
orderId
).
arg
(
val
.
toString
());
QLOG_INFO
()
<<
QString
(
"[<<<<---QtRedisClient::isOrderRedisExist orderId:%1 Exist ; value:%2:--->>>>]"
).
arg
(
orderId
).
arg
(
val
.
toString
());
}
else
{
}
else
{
...
@@ -74,6 +104,7 @@ bool QtRedisClient::testOrderRedisExist(const QString& orderId){
...
@@ -74,6 +104,7 @@ bool QtRedisClient::testOrderRedisExist(const QString& orderId){
return
bOrderExist
;
return
bOrderExist
;
}
}
bool
QtRedisClient
::
pushOrder2Redis
(
const
OrderObject
*
orderObj
){
bool
QtRedisClient
::
pushOrder2Redis
(
const
OrderObject
*
orderObj
){
bool
bPushOrderSuc
=
false
;
bool
bPushOrderSuc
=
false
;
QList
<
QByteArray
>
cmdString
;
QList
<
QByteArray
>
cmdString
;
...
@@ -96,8 +127,8 @@ bool QtRedisClient::pushOrder2Redis(const OrderObject* orderObj ){
...
@@ -96,8 +127,8 @@ bool QtRedisClient::pushOrder2Redis(const OrderObject* orderObj ){
cmdString
.
append
(
orderStatusDoc
.
toJson
());
cmdString
.
append
(
orderStatusDoc
.
toJson
());
try
{
try
{
auto
result
=
m_pRedisConnectOperat
->
command
Sync
(
cmdString
);
auto
result
=
m_pRedisConnectOperat
->
command
(
cmdString
);
QVariant
val
=
result
.
value
();
QVariant
val
=
result
.
result
().
value
();
if
(
val
.
toInt
())
{
if
(
val
.
toInt
())
{
QLOG_INFO
()
<<
QString
(
"[<<<<---QtRedisClient::pushOrder2Redis orderId:%1 ; orderStatus:%2 ; ret:%3 Success--->>>>]"
).
arg
(
orderObj
->
id
).
arg
(
orderObj
->
orderStatus
).
arg
(
val
.
toString
());
QLOG_INFO
()
<<
QString
(
"[<<<<---QtRedisClient::pushOrder2Redis orderId:%1 ; orderStatus:%2 ; ret:%3 Success--->>>>]"
).
arg
(
orderObj
->
id
).
arg
(
orderObj
->
orderStatus
).
arg
(
val
.
toString
());
QLOG_INFO
()
<<
QString
(
"[<<<<---QtRedisClient::pushOrder2Redis orderId:%1 Redis Context:%2--->>>>]"
).
arg
(
orderObj
->
id
).
arg
(
QString
(
orderStatusDoc
.
toJson
())
);
QLOG_INFO
()
<<
QString
(
"[<<<<---QtRedisClient::pushOrder2Redis orderId:%1 Redis Context:%2--->>>>]"
).
arg
(
orderObj
->
id
).
arg
(
QString
(
orderStatusDoc
.
toJson
())
);
...
...
fmTakeout/DTools/qtRedisClient.h
View file @
f40d6891
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
#include "qredisclient/redisclient.h"
#include "qredisclient/redisclient.h"
#include <QCommandLineParser>
#include <QCommandLineParser>
#include <QJsonDocument>
#include <QJsonDocument>
#include <WinSock.h>
#include "Model/orderObject.h"
#include "Model/orderObject.h"
class
QtRedisClient
:
public
QObject
class
QtRedisClient
:
public
QObject
...
...
fmTakeout/Model/orderObject.h
View file @
f40d6891
...
@@ -106,6 +106,11 @@ class OrderObject : public QObject
...
@@ -106,6 +106,11 @@ class OrderObject : public QObject
Q_PROPERTY
(
QString
callBackUrl
READ
getCallBackUrl
WRITE
setCallBackUrl
)
Q_PROPERTY
(
QString
callBackUrl
READ
getCallBackUrl
WRITE
setCallBackUrl
)
Q_PROPERTY
(
QString
pcsCallbackUrl
READ
getPcsCallbackUrl
WRITE
setPcsCallbackUrl
)
Q_PROPERTY
(
QString
pcsCallbackUrl
READ
getPcsCallbackUrl
WRITE
setPcsCallbackUrl
)
Q_PROPERTY
(
int
extendType
READ
getExtendType
WRITE
setExtendType
)
Q_PROPERTY
(
int
deliveryProvider
READ
getDeliveryProvider
WRITE
setDeliveryProvider
)
Q_PROPERTY
(
int
deliveryType
READ
getDeliveryType
WRITE
setDeliveryType
)
Q_PROPERTY
(
bool
skipPrint
READ
getSkipPrint
WRITE
setSkipPrint
)
public
:
public
:
OrderObject
(
QObject
*
parent
=
0
)
OrderObject
(
QObject
*
parent
=
0
)
:
QObject
(
parent
){}
:
QObject
(
parent
){}
...
@@ -220,6 +225,11 @@ public:
...
@@ -220,6 +225,11 @@ public:
QString
callBackUrl
;
// 为阿里云配置新域名, 用于获取订单详情, 和汇报订单入机情况: 拉取订单详情成功时手动添加到订单json报文体中为了入机汇报接口;
QString
callBackUrl
;
// 为阿里云配置新域名, 用于获取订单详情, 和汇报订单入机情况: 拉取订单详情成功时手动添加到订单json报文体中为了入机汇报接口;
QString
pcsCallbackUrl
;
// 为走 O2O Fufillment Service 链路的EC-OMS新系统, PCS门店 Pad上操作订单状态变更 请求正确的 Url 地址;
QString
pcsCallbackUrl
;
// 为走 O2O Fufillment Service 链路的EC-OMS新系统, PCS门店 Pad上操作订单状态变更 请求正确的 Url 地址;
int
extendType
;
// 20 Mod Plus 类型订单
int
deliveryProvider
;
// 配送商户: 1-蜂鸟 , 2-美团
int
deliveryType
;
// 配送方式: 1-二轮车 , 2-四轮车
bool
skipPrint
;
// 上游推送的订单 是否跳过打印;
int
deliveryStatus
=
0
;
int
deliveryStatus
=
0
;
int
payStatus
=
0
;
int
payStatus
=
0
;
int
refundStatus
=
0
;
int
refundStatus
=
0
;
...
@@ -504,6 +514,18 @@ public:
...
@@ -504,6 +514,18 @@ public:
inline
QString
getPcsCallbackUrl
()
const
{
return
pcsCallbackUrl
;}
inline
QString
getPcsCallbackUrl
()
const
{
return
pcsCallbackUrl
;}
inline
void
setPcsCallbackUrl
(
const
QString
&
v
){
pcsCallbackUrl
=
v
;}
inline
void
setPcsCallbackUrl
(
const
QString
&
v
){
pcsCallbackUrl
=
v
;}
inline
int
getExtendType
()
const
{
return
extendType
;}
inline
void
setExtendType
(
const
int
&
v
){
extendType
=
v
;}
inline
int
getDeliveryProvider
()
const
{
return
deliveryProvider
;}
inline
void
setDeliveryProvider
(
const
int
&
v
){
deliveryProvider
=
v
;}
inline
int
getDeliveryType
()
const
{
return
deliveryType
;}
inline
void
setDeliveryType
(
const
int
&
v
){
deliveryType
=
v
;}
inline
bool
getSkipPrint
()
const
{
return
skipPrint
;}
inline
void
setSkipPrint
(
const
bool
&
v
){
skipPrint
=
v
;}
};
};
#endif // ORDEROBJECT_H
#endif // ORDEROBJECT_H
fmTakeout/fmTakeout.rc
View file @
f40d6891
...
@@ -7,8 +7,8 @@ IDI_ICON ICON DISCARDABLE "logo.ico"
...
@@ -7,8 +7,8 @@ IDI_ICON ICON DISCARDABLE "logo.ico"
#endif
#endif
VS_VERSION_INFO VERSIONINFO
VS_VERSION_INFO VERSIONINFO
//***每次修改后编译发版必须变更版本号(preDefine.h中APP_VERSION 需要一致)***//
//***每次修改后编译发版必须变更版本号(preDefine.h中APP_VERSION 需要一致)***//
FILEVERSION 4,2022,
4,28
FILEVERSION 4,2022,
8,1
PRODUCTVERSION 4,2022,
4,28
PRODUCTVERSION 4,2022,
8,1
//*************************************************************************//
//*************************************************************************//
FILEFLAGSMASK 0x3fL
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
#ifdef _DEBUG
...
@@ -31,8 +31,8 @@ VS_VERSION_INFO VERSIONINFO
...
@@ -31,8 +31,8 @@ VS_VERSION_INFO VERSIONINFO
VALUE "OriginalFilename", "PmsPlugin.exe"
VALUE "OriginalFilename", "PmsPlugin.exe"
VALUE "ProductName", "PMS Plugin"
VALUE "ProductName", "PMS Plugin"
//***每次修改后编译发版必须变更版本号(preDefine.h中APP_VERSION 需要一致)***//
//***每次修改后编译发版必须变更版本号(preDefine.h中APP_VERSION 需要一致)***//
VALUE "ProductVersion", "4.2022.
4.28
"
VALUE "ProductVersion", "4.2022.
8.1
"
VALUE "FileVersion", "4.2022.
4.28
"
VALUE "FileVersion", "4.2022.
8.1
"
//*************************************************************************//
//*************************************************************************//
END
END
END
END
...
...
fmTakeout/preDefine.h
View file @
f40d6891
...
@@ -18,7 +18,8 @@
...
@@ -18,7 +18,8 @@
//#define APP_VERSION "4.2021.12.10"
//#define APP_VERSION "4.2021.12.10"
//#define APP_VERSION "4.2022.3.3"
//#define APP_VERSION "4.2022.3.3"
//#define APP_VERSION "4.2022.4.11"
//#define APP_VERSION "4.2022.4.11"
#define APP_VERSION "4.2022.4.28"
//#define APP_VERSION "4.2022.4.28"
#define APP_VERSION "4.2022.8.1"
//修正版本号时,切记修正 FmTakeout.rc 中的版本号
//修正版本号时,切记修正 FmTakeout.rc 中的版本号
#define SERVER_PASSWORD "posoperator@freemud.cn"
#define SERVER_PASSWORD "posoperator@freemud.cn"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment