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
106f2128
Commit
106f2128
authored
Sep 27, 2019
by
xiaojing.zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.积分增加商品数量字段 bonus.qty
parent
2c8d91bf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
1 deletions
+9
-1
base/CommonStruct.h
+1
-0
src/JsonModule.cpp
+6
-1
utility/utility.cpp
+2
-0
No files found.
base/CommonStruct.h
View file @
106f2128
...
...
@@ -151,6 +151,7 @@ struct bonus
std
::
string
desc
;
//优惠明细
std
::
string
name
;
//名称
std
::
string
sku
;
//商品编号
int
qty
;
//商品数量
int
bonusNum
=
0
;
//获得积分
};
...
...
src/JsonModule.cpp
View file @
106f2128
...
...
@@ -428,6 +428,7 @@ bool JsonModule::getPushOrders(IN const char* json,OUT orderObj &order)
detail
.
name
=
GetJsonStringSafe
(
pointDetails_obj
,
"name"
);
detail
.
sku
=
GetJsonStringSafe
(
pointDetails_obj
,
"sku"
);
detail
.
proType
=
GetJsonStringSafe
(
pointDetails_obj
,
"type"
);
detail
.
qty
=
GetJsonIntSafe
(
pointDetails_obj
,
"qty"
);
if
(
"00"
==
detail
.
proType
){
detail
.
proType
=
"CP"
;
}
...
...
@@ -1323,6 +1324,9 @@ std::string JsonModule::_convertToNewOrderJson(orderObj &obj)
writer
.
Key
(
"bonus"
);
writer
.
Int
(
obj
.
vecBonus
[
i
].
bonusNum
);
writer
.
Key
(
"qty"
);
writer
.
Int
(
obj
.
vecBonus
[
i
].
qty
);
writer
.
EndObject
();
}
writer
.
EndArray
();
...
...
@@ -1477,6 +1481,7 @@ std::string JsonModule::_convertToNewOrderJson(orderObj &obj)
writer
.
EndObject
();
LOG
(
INFO
)
<<
"POS ===>> PLUGIN"
<<
buffer
.
GetString
();
return
buffer
.
GetString
();
}
...
...
@@ -2507,7 +2512,7 @@ std::string JsonModule::_getCommonWarnStringByCode(int type)
case
14
:
rlt
=
"时间异常"
;
break
;
default
:
default
:
break
;
}
//vs默认编码是gbk,如果是windows系统,需要转换为utf8编码
...
...
utility/utility.cpp
View file @
106f2128
...
...
@@ -19,6 +19,8 @@
#include <signal.h>
#endif
#pragma warning(disable:4996)
//函数名: GetProcDir()
//功 能: 获取当前程序的路径
std
::
string
GetProcDir
()
...
...
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