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
1e682164
Commit
1e682164
authored
Apr 23, 2018
by
guanghui.cui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1:customer下添加加字段:card_no(纳客宝卡号) 2:payment.details下添加字段:pay_code(支付码)
parent
29f0d7f2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
base/CommonStruct.h
+2
-0
src/JsonModule.cpp
+8
-0
No files found.
base/CommonStruct.h
View file @
1e682164
...
...
@@ -41,6 +41,7 @@ struct paymentDetail
int
type
=
0
;
//支付类型
std
::
string
trans_id
;
//支付交易号
std
::
string
account_id
;
//支付账户号
std
::
string
pay_code
;
//支付码
};
//支付信息
...
...
@@ -118,6 +119,7 @@ struct customer
std
::
string
account
;
//顾客账号
int
account_type
=
0
;
//顾客账号类型
std
::
string
account_level
;
//顾客账号等级
std
::
string
card_no
;
//纳客宝卡号
};
//促销
...
...
src/JsonModule.cpp
View file @
1e682164
...
...
@@ -200,6 +200,7 @@ bool JsonModule::getPushOrders(IN const char* json,OUT orderObj &order)
order
.
customerInfo
.
account
=
GetJsonStringSafe
(
customer_obj
,
"accountId"
);
order
.
customerInfo
.
account_type
=
atoi
(
GetJsonStringSafe
(
customer_obj
,
"accountType"
));
order
.
customerInfo
.
account_level
=
GetJsonStringSafe
(
customer_obj
,
"level"
);
order
.
customerInfo
.
card_no
=
GetJsonStringSafe
(
customer_obj
,
"cardNo"
);
}
}
}
...
...
@@ -313,6 +314,7 @@ bool JsonModule::getPushOrders(IN const char* json,OUT orderObj &order)
detail
.
type
=
atoi
(
_strType
.
data
());
detail
.
trans_id
=
GetJsonStringSafe
(
payInfos_obj
,
"transNum"
);
detail
.
account_id
=
GetJsonStringSafe
(
payInfos_obj
,
"accountId"
);
detail
.
pay_code
=
GetJsonStringSafe
(
payInfos_obj
,
"payCode"
);
order
.
payInfo
.
vecDetail
.
push_back
(
detail
);
}
...
...
@@ -992,6 +994,9 @@ std::string JsonModule::_convertToNewOrderJson(orderObj &obj)
writer
.
Key
(
"account_level"
);
writer
.
String
(
obj
.
customerInfo
.
account_level
.
c_str
());
writer
.
Key
(
"card_no"
);
writer
.
String
(
obj
.
customerInfo
.
card_no
.
c_str
());
writer
.
EndObject
();
//----------------顾客信息 结束-----------
...
...
@@ -1091,6 +1096,9 @@ std::string JsonModule::_convertToNewOrderJson(orderObj &obj)
writer
.
Key
(
"account_id"
);
writer
.
String
(
obj
.
payInfo
.
vecDetail
[
i
].
account_id
.
c_str
());
writer
.
Key
(
"pay_code"
);
writer
.
String
(
obj
.
payInfo
.
vecDetail
[
i
].
pay_code
.
c_str
());
writer
.
EndObject
();
}
writer
.
EndArray
();
...
...
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