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
ce85a7f0
Commit
ce85a7f0
authored
Jan 14, 2019
by
guanghui.cui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新添加积分字段
parent
eccade2a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletions
+15
-1
base/CommonStruct.h
+3
-0
src/JsonModule.cpp
+12
-1
No files found.
base/CommonStruct.h
View file @
ce85a7f0
...
...
@@ -196,6 +196,9 @@ struct orderObj
std
::
string
pickup_point
;
//自取订单取餐处
std
::
string
invoice_pickup_code
;
//订单发票提出码
std
::
string
order_drift
;
//订单漂移
int
bonus_basic
=
0
;
//基本积分
int
bonus_extra
=
0
;
//额外积分
int
bonus_total
=
0
;
// 获得总积分
store
storeInfo
;
//门店信息
delivery
deliveryInfo
;
//配送信息
...
...
src/JsonModule.cpp
View file @
ce85a7f0
...
...
@@ -388,7 +388,9 @@ bool JsonModule::getPushOrders(IN const char* json,OUT orderObj &order)
rapidjson
::
Value
&
points_obj
=
orderContent_obj
[
"points"
];
if
(
points_obj
.
IsObject
())
{
std
::
to_string
(
GetJsonIntSafe
(
points_obj
,
"totalPoint"
));
order
.
bonus_total
=
GetJsonIntSafe
(
points_obj
,
"totalPoint"
);
order
.
bonus_extra
=
GetJsonIntSafe
(
points_obj
,
"extraPoint"
);
order
.
bonus_basic
=
GetJsonIntSafe
(
points_obj
,
"basicPoint"
);
//积分信息详情
if
(
points_obj
.
HasMember
(
"pointDetails"
))
{
...
...
@@ -1211,6 +1213,15 @@ std::string JsonModule::_convertToNewOrderJson(orderObj &obj)
//----------------付款明细 结束-----------
//----------------消费积分----------------
writer
.
Key
(
"bonusBasic"
);
writer
.
Int
(
obj
.
bonus_basic
);
writer
.
Key
(
"bonusExtra"
);
writer
.
Int
(
obj
.
bonus_extra
);
writer
.
Key
(
"bonusTotal"
);
writer
.
Int
(
obj
.
bonus_total
);
writer
.
Key
(
"bonus"
);
writer
.
StartArray
();
for
(
unsigned
int
i
=
0
;
i
<
obj
.
vecBonus
.
size
();
i
++
)
...
...
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