Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
familyMart_takeaway
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
guanghui.cui
familyMart_takeaway
Commits
e61f9aa7
Commit
e61f9aa7
authored
Aug 04, 2020
by
wuyang.zou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix : Response Ods Push New Order Data
add store_id + pos_id
parent
47f87895
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
5 deletions
+16
-5
src/JsonModule.cpp
+9
-4
src/JsonModule.h
+4
-1
src/main.cpp
+3
-0
No files found.
src/JsonModule.cpp
View file @
e61f9aa7
...
...
@@ -9,6 +9,9 @@
#include <iostream>
std
::
string
g_store_id
=
""
;
std
::
string
g_pos_id
=
""
;
using
namespace
rapidjson
;
// std::string GetTestJson(const int statuscode,const char* msg,const char* orderid)
...
...
@@ -2021,10 +2024,9 @@ bool JsonModule::_getOrderResponseJson(IN const std::string& posResponse, IN con
writer
.
Uint64
(
pk_id
);
writer
.
Key
(
"store_id"
);
writer
.
String
(
_store_id
.
c_str
()
);
writer
.
String
(
g_store_id
.
c_str
());
writer
.
Key
(
"pos_id"
);
writer
.
String
(
_pos_id
.
c_str
()
);
writer
.
String
(
g
_pos_id
.
c_str
()
);
writer
.
Key
(
"child_store_id"
);
writer
.
String
(
child_store_id
.
c_str
());
...
...
@@ -2334,8 +2336,11 @@ void JsonModule::setInitData(IN const char* data)
return
;
}
// Old Keep Reserver;
_store_id
=
document
[
"store_id"
].
GetString
();
_pos_id
=
document
[
"pos_id"
].
GetString
();
g_store_id
=
document
[
"store_id"
].
GetString
();
g_pos_id
=
document
[
"pos_id"
].
GetString
();
}
int
JsonModule
::
_getODSStatusByPOSReq
(
int
fm_cmd
)
...
...
src/JsonModule.h
View file @
e61f9aa7
...
...
@@ -7,6 +7,9 @@
#include "../base/BaseDefine.h"
//std::string GetTestJson(const int statuscode,const char* msg,const char* orderid);
extern
std
::
string
g_store_id
;
extern
std
::
string
g_pos_id
;
//void parseJson(const char* json);
class
JsonModule
{
...
...
@@ -109,7 +112,7 @@ public:
private
:
std
::
string
_store_id
;
//门店号
std
::
string
_pos_id
;
//POS编号;
std
::
string
_pos_id
;
//POS编号;
// 后期使用过程中,大多会使用新栈对象,导致暂存的数据丢失;
private
:
std
::
string
_getDeliveryTypeString
(
int
type
);
...
...
src/main.cpp
View file @
e61f9aa7
...
...
@@ -37,6 +37,9 @@ int ods_recv_port;
int
client_listen_port
;
int
pos_listen_port
;
extern
std
::
string
g_store_id
;
//进程运行期间存储全局 Store 编号;
extern
std
::
string
g_pos_id
;
//进程运行期间存储全局 Pos 编号;
bool
bInitDone
=
false
;
//初始化完成
bool
bPriorityDone
=
true
;
//设置POS优先级
TCPClient
longConnectionOds
;
//长连接tcp对象
...
...
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