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
2e37a54c
Commit
2e37a54c
authored
Aug 20, 2018
by
guanghui.cui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pk_id 更换类型为 uint64_t
parent
33248ce0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
src/JsonModule.cpp
+7
-7
No files found.
src/JsonModule.cpp
View file @
2e37a54c
...
...
@@ -755,7 +755,7 @@ bool JsonModule::getOdsResponseData(int status_code, const std::string &msg, IN
return
false
;
}
in
t
pk_id
=
GetJsonIntSafe
(
document
,
"pk_id"
);
uint64_
t
pk_id
=
GetJsonIntSafe
(
document
,
"pk_id"
);
rapidjson
::
Value
&
orderContent_obj
=
document
[
"orderContent"
];
if
(
orderContent_obj
.
HasMember
(
"orders"
))
{
rapidjson
::
Value
&
orders_obj
=
orderContent_obj
[
"orders"
];
...
...
@@ -788,7 +788,7 @@ bool JsonModule::getOdsResponseData(int status_code, const std::string &msg, IN
writer
.
String
(
msg
.
c_str
());
writer
.
Key
(
"pk_id"
);
writer
.
Int
(
pk_id
);
writer
.
Uint64
(
pk_id
);
writer
.
EndObject
();
...
...
@@ -1732,7 +1732,7 @@ bool JsonModule::_getOrderResponseJson(IN const std::string& posResponse, IN con
int
status
=
document1
[
"ods_status"
].
GetInt
();
std
::
string
channel
=
document1
[
"channel"
].
GetString
();
in
t
pk_id
=
GetJsonIntSafe
(
document2
,
"pk_id"
);
uint64_
t
pk_id
=
GetJsonIntSafe
(
document2
,
"pk_id"
);
rapidjson
::
StringBuffer
buffer
;
rapidjson
::
Writer
<
rapidjson
::
StringBuffer
>
writer
(
buffer
);
...
...
@@ -1757,7 +1757,7 @@ bool JsonModule::_getOrderResponseJson(IN const std::string& posResponse, IN con
writer
.
String
(
msg
.
c_str
());
writer
.
Key
(
"pk_id"
);
writer
.
Int
(
pk_id
);
writer
.
Uint64
(
pk_id
);
//该状态表示商品在pos中不存在,需要返回字段给中台,由于双方命名规则不一致,所以这里拼上中台需要字段
if
(
103
==
status_code
)
{
...
...
@@ -1798,7 +1798,7 @@ bool JsonModule::_getStockWarnResponseJson(IN const std::string& posResponse, IN
std
::
string
channel
=
document2
[
"channel"
].
GetString
();
int64_t
alertTime
=
document2
[
"alertTime"
].
GetInt64
();
std
::
string
storeId
=
document2
[
"storeId"
].
GetString
();
in
t
pk_id
=
GetJsonIntSafe
(
document2
,
"pk_id"
);
uint64_
t
pk_id
=
GetJsonIntSafe
(
document2
,
"pk_id"
);
rapidjson
::
StringBuffer
buffer
;
rapidjson
::
Writer
<
rapidjson
::
StringBuffer
>
writer
(
buffer
);
...
...
@@ -1820,7 +1820,7 @@ bool JsonModule::_getStockWarnResponseJson(IN const std::string& posResponse, IN
writer
.
Int
(
status_code
);
writer
.
Key
(
"pk_id"
);
writer
.
Int
(
pk_id
);
writer
.
Uint64
(
pk_id
);
writer
.
EndObject
();
...
...
@@ -1909,7 +1909,7 @@ std::string JsonModule::_convertToQueryOrderStatusJson(IN const char* json)
bool
JsonModule
::
_getCommonWarnResponseJson
(
IN
const
std
::
string
&
posResponse
,
IN
const
std
::
string
&
orderData
,
IN
const
std
::
string
&
odsData
,
OUT
std
::
string
&
result
)
{
std
::
string
notifyDate
,
rackNo
,
storeId
,
terminalNo
;
int64_t
iDatetime
=
0
,
pk_id
;
u
int64_t
iDatetime
=
0
,
pk_id
;
rapidjson
::
Document
document
,
document1
;
// 定义一个Document对象
document1
.
Parse
(
odsData
.
data
());
// 解析,Parse()无返回值,也不会抛异常
if
(
document1
.
HasParseError
())
// 通过HasParseError()来判断解析是否成功
...
...
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