Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fmp_vip
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
xiaojing.zhang
fmp_vip
Commits
41608949
Commit
41608949
authored
Aug 02, 2017
by
Carwyn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 兼容POS 结算时不传PaidAmount; 2. 如果会员不存在,给POS返回成功(供线下会员认证使用); 3. 兼容第三方支付退款去会员系统退款(把fm_transId 转成fm_id)
parent
4e9ab768
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
3 deletions
+17
-3
task/taskfinal.cpp
+5
-1
task/tasklogin.cpp
+2
-1
task/taskothers.cpp
+9
-1
task/taskpay.cpp
+1
-0
No files found.
task/taskfinal.cpp
View file @
41608949
...
...
@@ -23,11 +23,15 @@ void TaskFinal::packageServerReq()
p
.
push_back
(
PosProps
.
Fm_id
);
p
.
push_back
(
PosProps
.
Fm_open_id
);
p
.
push_back
(
PosProps
.
OrderAmount
);
p
.
push_back
(
PosProps
.
PaidAmount
==
0
?
PosProps
.
OrderAmount
:
PosProps
.
PaidAmount
);
p
.
push_back
(
PosProps
.
PaidAmount
);
foreach
(
auto
prop
,
p
)
{
transData
[
ServerProps
(
prop
)]
=
getPosJsonValue
(
prop
);
}
if
(
transData
[
ServerProps
(
PosProps
.
PaidAmount
)].
toInt
()
==
0
)
{
transData
[
ServerProps
(
PosProps
.
PaidAmount
)]
=
transData
[
ServerProps
(
PosProps
.
OrderAmount
)];
}
// 产品列表
QJsonArray
products
;
foreach
(
auto
p
,
getPosJsonValue
(
"products"
).
toArray
())
...
...
task/tasklogin.cpp
View file @
41608949
...
...
@@ -39,7 +39,8 @@ void TaskLogin::packageServerReq()
void
TaskLogin
::
packagePOSRsp
()
{
posRspJsonObj
[
"statusCode"
]
=
getServerJsonValue
(
"statusCode"
).
toInt
();
int
statusCode
=
getServerJsonValue
(
"statusCode"
).
toInt
();
posRspJsonObj
[
"statusCode"
]
=
statusCode
==
2003
?
100
:
statusCode
;
posRspJsonObj
[
"msg"
]
=
getServerJsonValue
(
"msg"
).
toString
();
posRspJsonObj
[
"prompt"
]
=
getServerJsonValue
(
"prompt"
).
toInt
();
posRspJsonObj
[
"fm_open_id"
]
=
getServerJsonValue
(
PosProps
.
Fm_open_id
).
toString
();
...
...
task/taskothers.cpp
View file @
41608949
...
...
@@ -34,7 +34,9 @@ TaskRefundPay::TaskRefundPay(QJsonObject &jsonObj, QObject *parent)
void
TaskRefundPay
::
packageServerReq
()
{
QJsonArray
transIds
;
transIds
.
append
(
getPosJsonValue
(
PosProps
.
TransId
));
if
(
!
getPosJsonValue
(
PosProps
.
TransId
).
toString
().
isEmpty
())
{
transIds
.
append
(
getPosJsonValue
(
PosProps
.
TransId
));
}
transIds
.
append
(
getPosJsonValue
(
PosProps
.
Fm_transId
));
QJsonObject
transData
;
transData
[
"transIds"
]
=
transIds
;
...
...
@@ -75,8 +77,14 @@ void TaskRefundOrder::packagePOSRsp()
std
::
vector
<
QString
>
p
;
p
.
push_back
(
PosProps
.
StatusCode
);
p
.
push_back
(
PosProps
.
Msg
);
foreach
(
auto
prop
,
p
)
{
posRspJsonObj
[
prop
]
=
getServerJsonValue
(
ServerProps
(
prop
));
}
QString
fm_id
=
getPosJsonValue
(
PosProps
.
Fm_id
).
toString
();
QString
fmTransId
=
getPosJsonValue
(
PosProps
.
Fm_transId
).
toString
();
if
(
fm_id
==
""
&&
!
fmTransId
.
isEmpty
()
&&
getServerJsonValue
(
ServerProps
(
PosProps
.
StatusCode
)).
toInt
()
==
3201
)
{
posRspJsonObj
[
PosProps
.
StatusCode
]
=
100
;
}
posRspJsonObj
[
PosProps
.
Prompt
]
=
1
;
}
task/taskpay.cpp
View file @
41608949
...
...
@@ -68,6 +68,7 @@ void TaskPay::setWindow()
amount
=
getPosJsonValue
(
PosProps
.
OrderAmount
).
toDouble
();
}
//! 临时取 OrderAmount !!!!
int
paid_amount
=
getPosJsonValue
(
PosProps
.
OrderAmount
).
toInt
();
if
(
paid_amount
==
0
)
{
paid_amount
=
getPosJsonValue
(
PosProps
.
OrderAmount
).
toDouble
();
...
...
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