Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sbkclient
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
李定达
sbkclient
Commits
4bc6e508
Commit
4bc6e508
authored
Jul 19, 2017
by
李定达
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.修复返回信息更加清晰
parent
f3aa75b6
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
22 additions
and
8 deletions
+22
-8
ZH_Client.suo
+0
-0
ZH_Client/ClassDiagram1.cd
+2
-0
ZH_Client/ZH_Client.vcxproj
+3
-0
ZH_Client/ZH_Client.vcxproj.filters
+4
-0
ZH_Client/fmerror.h
+5
-0
ZH_Client/fmglobal.h
+2
-2
ZH_Client/sbk_client.cpp
+6
-6
No files found.
ZH_Client.suo
View file @
4bc6e508
No preview for this file type
ZH_Client/ClassDiagram1.cd
0 → 100644
View file @
4bc6e508
\ No newline at end of file
ZH_Client/ZH_Client.vcxproj
View file @
4bc6e508
...
...
@@ -125,6 +125,9 @@
<ClInclude Include="testtool.h" />
<ClInclude Include="utf.h" />
</ItemGroup>
<ItemGroup>
<None Include="ClassDiagram1.cd" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
...
...
ZH_Client/ZH_Client.vcxproj.filters
View file @
4bc6e508
...
...
@@ -138,4 +138,7 @@
<Filter>Header Files\TestCase</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="ClassDiagram1.cd" />
</ItemGroup>
</Project>
\ No newline at end of file
ZH_Client/fmerror.h
View file @
4bc6e508
...
...
@@ -23,4 +23,8 @@
//#define ERROR_CRET "{\"statusCode\": 307, \"message\": \"\u8BC1\u4E66\u52A0\u8F7D\u5931\u8D25\u65E0\u6CD5\u8FDB\u884C\u4EA4\u6613\"}"
#define ERROR_CRET "{\"statusCode\": 307, \"message\": \"\350\257\201\344\271\246\345\212\240\350\275\275\345\244\261\350\264\245\346\227\240\346\263\225\350\277\233\350\241\214\344\272\244\346\230\223\"}"
//#define ERROR_RESINDATA "{\"statusCode\": 307, \"message\": \"RES输入参数不合法\"}"
#define ERROR_RESINDATA "{\"statusCode\": 308, \"message\": \"RES\350\276\223\345\205\245\345\217\202\346\225\260\344\270\215\345\220\210\346\263\225\"}"
#endif
\ No newline at end of file
ZH_Client/fmglobal.h
View file @
4bc6e508
...
...
@@ -13,8 +13,8 @@
#define REQUEST_CRET "{\r\n \"ver\": 1,\r\n \"reqType\": 99,\r\n \"partnerId\":%d,\r\n \"storeId\":\"%s\",\r\n \"stationId\": \"%s\"\r\n}"
#define REQUEST_0 "{\r\n \"ver\": 1,\r\n \"reqType\": %s,\r\n \"partnerId\":%d,\r\n \"storeId\":\"%s\",\r\n \"stationId\": \"%s\",\r\n \"operatorId\":\"%s\",\r\n \"code\":\"%s\"\r\n}"
#define REQUEST_3 "{\r\n \"ver\": 1,\r\n \"reqType\": %s,\r\n \"partnerId\":%d,\r\n \"storeId\":\"%s\",\r\n \"stationId\": \"%s\",\r\n \"operatorId\":\"%s\",\r\n \"code\":\"%s\",\r\n \"businessDate\":\"%s\",\r\n \"
a
mount\":\"%d\",\r\n \"transId\":\"%s\"\r\n}"
#define REQUEST_71 "{\r\n \"ver\": 1,\r\n \"reqType\": %s,\r\n \"partnerId\":%d,\r\n \"storeId\":\"%s\",\r\n \"stationId\": \"%s\",\r\n \"operatorId\":\"%s\",\r\n \"code\":\"%s\",\r\n \"businessDate\":\"%s\",\r\n \"
a
mount\":\"%d\",\r\n \"transId\":\"%s\"\r\n}"
#define REQUEST_3 "{\r\n \"ver\": 1,\r\n \"reqType\": %s,\r\n \"partnerId\":%d,\r\n \"storeId\":\"%s\",\r\n \"stationId\": \"%s\",\r\n \"operatorId\":\"%s\",\r\n \"code\":\"%s\",\r\n \"businessDate\":\"%s\",\r\n \"
transA
mount\":\"%d\",\r\n \"transId\":\"%s\"\r\n}"
#define REQUEST_71 "{\r\n \"ver\": 1,\r\n \"reqType\": %s,\r\n \"partnerId\":%d,\r\n \"storeId\":\"%s\",\r\n \"stationId\": \"%s\",\r\n \"operatorId\":\"%s\",\r\n \"code\":\"%s\",\r\n \"businessDate\":\"%s\",\r\n \"
transA
mount\":\"%d\",\r\n \"transId\":\"%s\"\r\n}"
#define DES3_KEY "ABCD@#9876DFSAAWKLDEOPDD"
#define CRET_FILE_NAME "client.p12"
...
...
ZH_Client/sbk_client.cpp
View file @
4bc6e508
...
...
@@ -766,10 +766,10 @@ extern "C"
LOG
()
<<
"get RES indata : "
<<
indata
;
if
(
!
RESToJson
(
tmpin
,
out
)
&&
out
.
size
()
>=
MAX_BUF_LEN
)
if
(
!
RESToJson
(
tmpin
,
out
)
||
out
.
size
()
>=
MAX_BUF_LEN
)
{
string
outstr
;
JsonToRES
(
string
(
ERROR_INDATA
),
outstr
);
JsonToRES
(
string
(
ERROR_
RES
INDATA
),
outstr
);
strcpy
(
outdata
,
outstr
.
data
());
LOG
()
<<
"send RES outdata : "
<<
outdata
;
return
0
;
...
...
@@ -1210,9 +1210,9 @@ void testinitclient()
//char a[] = "{\"businessDate\":\"20170526\",\"code\":\"7310180009462033\",\"operatorId\":\"90001\",\"partnerId\":1443,\"products\":[{\"consume_num\":1,\"discount\":0,\"name\":\"Coffee\",\"number\":0,\"payment\":null,\"pid\":\"3488\",\"price\":3100,\"priceAct\":0,\"salesType\":\"Normal\",\"scope\":null}],\"promotionTag\":null,\"reqType\":71,\"stationId\":\"3\",\"storeId\":\"1713\",\"transAmount\":3100,\"transId\":\"6460\",\"undiscountAmount\":0,\"ver\":1}";
//char a[] = "{\r\n \"ver\": 1,\r\n \"reqType\": 71,\r\n \"partnerId\": 1443,\r\n \"stationId\": \"1\",\r\n \"storeId\": \"12344\",\r\n \"operatorId\": \"9\",\r\n \"code\": \"adadadada\"\r\n}";
char
a
[]
=
"{
\r\n
\"
businessDate
\"
:
\"
20170601
\"
,
\r\n
\"
code
\"
:
\"
7310188850000277
\"
,
\r\n
\"
operatorId
\"
:
\"
90001
\"
,
\r\n
\"
partnerId
\"
: 1443,
\r\n
\"
partnerOrderId
\"
:
\"
1443171223323
\"
,
\r\n
\"
products
\"
: [
\r\n
{
\r\n
\"
consume_num
\"
: 1,
\r\n
\"
discount
\"
: 0,
\r\n
\"
name
\"
:
\"
Coffee
\"
,
\r\n
\"
number
\"
: 0,
\r\n
\"
payment
\"
: null,
\r\n
\"
pid
\"
:
\"
3488
\"
,
\r\n
\"
price
\"
: 3100,
\r\n
\"
priceAct
\"
: 0,
\r\n
\"
salesType
\"
:
\"
Normal
\"
,
\r\n
\"
scope
\"
: null
\r\n
}
\r\n
],
\r\n
\"
promotionTag
\"
: null,
\r\n
\"
reqType
\"
: 102,
\r\n
\"
stationId
\"
:
\"
9
\"
,
\r\n
\"
storeId
\"
:
\"
12344
\"
,
\r\n
\"
transAmount
\"
: 29,
\r\n
\"
transId
\"
:
\"
1
\"
,
\r\n
\"
undiscountAmount
\"
: 0,
\r\n
\"
ver
\"
: 1
\r\n
}"
;
char
ls
[]
=
"0|1443|
99999|1|01|13245678998
|END|"
;
char
ls1
[]
=
"3|1443|
99999|1|01|13245678998|20170714
||8888|END|"
;
char
ls2
[]
=
"71|1443|
99999|1|01|13245678998|20170714
||8888|END|"
;
char
ls
[]
=
"0|1443|
fm9999|1|01|120754391530891
|END|"
;
char
ls1
[]
=
"3|1443|
fm9999|1|01|120754391530891|20170717
||8888|END|"
;
char
ls2
[]
=
"71|1443|
fm9999|1|01|120754391530891|20170717
||8888|END|"
;
void
testCheckRollbackData
()
{
...
...
@@ -1243,7 +1243,7 @@ int main()
char
b
[
MAX_BUF_LEN
];
RESGetValue
(
ls
2
,
b
);
RESGetValue
(
ls
1
,
b
);
//char c[MAX_BUF_LEN] = { 0 };
...
...
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