Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
qfmclient
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
shuai.liu
qfmclient
Commits
d0ebe816
Commit
d0ebe816
authored
Dec 01, 2017
by
刘帅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 优化流程
2. 整理文件和代码
parent
e391071b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
15 additions
and
6 deletions
+15
-6
.gitignore
+1
-0
QsLog/QsLog.pri
+1
-1
bin/store_info.ini
+6
-0
convert.cpp
+2
-1
log.h
+2
-2
main.cpp
+1
-1
qfmclient.cpp
+0
-0
qfmclient.h
+2
-1
No files found.
.gitignore
View file @
d0ebe816
...
@@ -2,4 +2,5 @@
...
@@ -2,4 +2,5 @@
/bin/*
/bin/*
!/bin/*.dll
!/bin/*.dll
!/bin/*.ini
QsLog/QsLog.pri
View file @
d0ebe816
...
@@ -2,7 +2,7 @@ INCLUDEPATH += $$PWD
...
@@ -2,7 +2,7 @@ INCLUDEPATH += $$PWD
#DEFINES += QS_LOG_LINE_NUMBERS # automatically writes the file and line for each log message
#DEFINES += QS_LOG_LINE_NUMBERS # automatically writes the file and line for each log message
#DEFINES += QS_LOG_DISABLE # logging code is replaced with a no-op
#DEFINES += QS_LOG_DISABLE # logging code is replaced with a no-op
#DEFINES += QS_LOG_SEPARATE_THREAD # messages are queued and written from a separate thread
#DEFINES += QS_LOG_SEPARATE_THREAD # messages are queued and written from a separate thread
#
DEFINES += QS_LOG_WIN_PRINTF_CONSOLE # Use fprintf instead of OutputDebugString on Windows
DEFINES += QS_LOG_WIN_PRINTF_CONSOLE # Use fprintf instead of OutputDebugString on Windows
SOURCES += $$PWD/QsLogDest.cpp \
SOURCES += $$PWD/QsLogDest.cpp \
$$PWD/QsLog.cpp \
$$PWD/QsLog.cpp \
$$PWD/QsLogDestConsole.cpp \
$$PWD/QsLogDestConsole.cpp \
...
...
bin/store_info.ini
0 → 100644
View file @
d0ebe816
[store]
partner_id
=
1371
store_id
=
fm99999
pos_id
=
1
operator_id
=
001
business_date
=
20171016
convert.cpp
View file @
d0ebe816
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
#include <QJsonArray>
#include <QJsonArray>
#include <QJsonDocument>
#include <QJsonDocument>
#include <QDebug>
#include <QDebug>
#include "QsLog/QsLog.h"
Convert
::
Convert
()
Convert
::
Convert
()
{
{
...
@@ -70,7 +71,7 @@ bool Convert::QueryPay(QJsonObject &object, STORE_INFO store_info)
...
@@ -70,7 +71,7 @@ bool Convert::QueryPay(QJsonObject &object, STORE_INFO store_info)
}
}
else
else
{
{
qDebug
()
<<
"can not find trans_id in json request!"
;
QLOG_ERROR
()
<<
"can not find trans_id in json request!"
;
return
false
;
return
false
;
}
}
if
(
object
.
contains
(
"fm_order_id"
))
if
(
object
.
contains
(
"fm_order_id"
))
...
...
log.h
View file @
d0ebe816
...
@@ -30,8 +30,8 @@ static void InitLogger()
...
@@ -30,8 +30,8 @@ static void InitLogger()
QsLogging
::
MaxOldLogCount
(
logCount
)));
QsLogging
::
MaxOldLogCount
(
logCount
)));
logger
.
addDestination
(
fileDestination
);
logger
.
addDestination
(
fileDestination
);
/* 输出到控制台 */
/* 输出到控制台 */
//
QsLogging::DestinationPtr consleDest(QsLogging::DestinationFactory::MakeDebugOutputDestination());
QsLogging
::
DestinationPtr
consleDest
(
QsLogging
::
DestinationFactory
::
MakeDebugOutputDestination
());
//
logger.addDestination(consleDest);
logger
.
addDestination
(
consleDest
);
}
}
#endif // LOG
#endif // LOG
...
...
main.cpp
View file @
d0ebe816
...
@@ -9,7 +9,7 @@ int main(int argc, char *argv[])
...
@@ -9,7 +9,7 @@ int main(int argc, char *argv[])
{
{
QCoreApplication
a
(
argc
,
argv
);
QCoreApplication
a
(
argc
,
argv
);
InitLogger
();
InitLogger
();
QLOG_INFO
()
<<
"start"
;
QLOG_INFO
()
<<
"start
client...
"
;
QFmClient
client
;
QFmClient
client
;
client
.
start
();
client
.
start
();
return
a
.
exec
();
return
a
.
exec
();
...
...
qfmclient.cpp
View file @
d0ebe816
This diff is collapsed.
Click to expand it.
qfmclient.h
View file @
d0ebe816
...
@@ -54,7 +54,8 @@ private:
...
@@ -54,7 +54,8 @@ private:
int
CheckReqFromPos
(
char
*
pJsonData
,
int
dLength
,
int
chkValue
);
int
CheckReqFromPos
(
char
*
pJsonData
,
int
dLength
,
int
chkValue
);
int
SendSocketData
(
int
sock
,
char
*
buf
,
int
length
,
int
flag
);
int
SendSocketData
(
int
sock
,
char
*
buf
,
int
length
,
int
flag
);
char
*
EncodeSendData
(
char
*
buf
,
int
length
,
int
*
eLength
);
char
*
EncodeSendData
(
char
*
buf
,
int
length
,
int
*
eLength
);
int
SendData2ZhProxyAndWaitRspData
();
int
SendData2ZhProxy
();
int
ProcessZhProxyRspData
(
int
nType
);
int
RecvAndCheckDataFromSock
(
int
sock
,
int
flag
,
int
type
);
int
RecvAndCheckDataFromSock
(
int
sock
,
int
flag
,
int
type
);
int
ProcessZhProxyRspDataAndSend2Pos
(
int
nType
);
int
ProcessZhProxyRspDataAndSend2Pos
(
int
nType
);
int
CheckRecvedData
();
int
CheckRecvedData
();
...
...
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