Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
FMVip_Today
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
zhenfei.zhang
FMVip_Today
Commits
40988dae
Commit
40988dae
authored
Nov 25, 2016
by
NitefullWind
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 请求数据中加入版本信息。 2. 支付返回的总支付金额加上代金券金额。 3. 积分只能使用10的倍数。
parent
77ac93c9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
12 deletions
+17
-12
FMVip/fmvipdispatcher.cpp
+1
-1
FMVip/fmvipforward.cpp
+14
-10
FMVip/fmvipforward.h
+1
-0
FMVip/fmviporder.h
+1
-1
No files found.
FMVip/fmvipdispatcher.cpp
View file @
40988dae
...
...
@@ -244,12 +244,12 @@ void FMVipDispatcher::onServerResponsed(const QJsonObject &rspObj)
_serverRspData
=
rspData
;
if
(
status
!=
100
)
{
requestSuccess
=
false
;
if
(
prompt
==
0
)
{
QString
msg
=
rspObj
[
"msg"
].
toString
();
FMMsgWnd
::
FailureWnd
(
msg
);
}
requestSuccess
=
false
;
_vindow
=
0
;
serverIsBusy
.
wakeAll
();
}
...
...
FMVip/fmvipforward.cpp
View file @
40988dae
...
...
@@ -62,6 +62,7 @@ void FMVipForward::parseRequest(const QJsonObject &jsonObj)
// 固定部分
fm_jsonObj
[
"appId"
]
=
AppId
;
fm_jsonObj
[
"partnerId"
]
=
PartnerId
;
fm_jsonObj
[
"version"
]
=
VersionInfo
;
fm_jsonObj
[
"t"
]
=
QString
::
number
(
QDateTime
::
currentMSecsSinceEpoch
());
// 可从请求中提取的部分
...
...
@@ -408,16 +409,6 @@ void FMVipForward::couponed(const QJsonObject &serverJob, QJsonObject &posJob)
void
FMVipForward
::
payed
(
const
QJsonObject
&
serverJob
,
QJsonObject
&
posJob
)
{
posJob
[
"prompt"
]
=
0
;
int
codeAmount
=
serverJob
[
"codeAmount"
].
toInt
();
int
scoreAmount
=
serverJob
[
"scoreAmount"
].
toInt
();
int
paid_total_amount
=
SESSIONDATA_INT
(
"paid_amount"
)
+
codeAmount
+
scoreAmount
;
posJob
[
"fm_open_id"
]
=
serverJob
[
"account"
];
posJob
[
"fm_id"
]
=
serverJob
[
"memberTransId"
];
posJob
[
"total_amount"
]
=
SESSIONDATA_INT
(
"order_amount"
);
posJob
[
"paid_total_amount"
]
=
paid_total_amount
;
posJob
[
"invoice_amount"
]
=
paid_total_amount
;
posJob
[
"incentives_amount"
]
=
0
;
QJsonArray
pay_ids
;
QJsonObject
pay_obj_1
,
pay_obj_2
;
...
...
@@ -430,6 +421,7 @@ void FMVipForward::payed(const QJsonObject &serverJob, QJsonObject &posJob)
pay_ids
.
append
(
pay_obj_1
);
pay_ids
.
append
(
pay_obj_2
);
int
couponAmount
=
0
;
// 处理代金券
QJsonArray
server_coupons
=
serverJob
[
"coupons"
].
toArray
();
for
(
auto
value
:
server_coupons
)
...
...
@@ -438,12 +430,24 @@ void FMVipForward::payed(const QJsonObject &serverJob, QJsonObject &posJob)
QJsonObject
p_coupon
;
p_coupon
[
"pay_id"
]
=
"77"
;
p_coupon
[
"pay_str"
]
=
"代金券支付"
;
couponAmount
+=
s_coupon
[
"disAmount"
].
toInt
();
p_coupon
[
"paid_total_amount"
]
=
s_coupon
[
"disAmount"
];
p_coupon
[
"code"
]
=
s_coupon
[
"couponCode"
];
pay_ids
.
append
(
p_coupon
);
}
posJob
[
"pay_ids"
]
=
pay_ids
;
int
codeAmount
=
serverJob
[
"codeAmount"
].
toInt
();
int
scoreAmount
=
serverJob
[
"scoreAmount"
].
toInt
();
int
paid_total_amount
=
SESSIONDATA_INT
(
"paid_amount"
)
+
codeAmount
+
scoreAmount
+
couponAmount
;
posJob
[
"fm_open_id"
]
=
serverJob
[
"account"
];
posJob
[
"fm_id"
]
=
serverJob
[
"memberTransId"
];
posJob
[
"total_amount"
]
=
SESSIONDATA_INT
(
"order_amount"
);
posJob
[
"paid_total_amount"
]
=
paid_total_amount
;
posJob
[
"invoice_amount"
]
=
paid_total_amount
;
posJob
[
"incentives_amount"
]
=
0
;
QJsonObject
forward
=
SESSIONDATA_JSONOBJECT
(
"forward"
);
posJob
[
"forward"
]
=
forward
;
}
...
...
FMVip/fmvipforward.h
View file @
40988dae
...
...
@@ -11,6 +11,7 @@
#define AppId "T007"
#define KeyCode "98d094a7-0d07-4cf5-b23b-d18783f0d76a"
#define PartnerId "a8bee0dd-09d1-4fa9-a9eb-80cb36d3d611"
#define VersionInfo "1.20"
#define Type_Login "member_check_request"
#define Type_Coupon "coupon_check_request"
...
...
FMVip/fmviporder.h
View file @
40988dae
...
...
@@ -51,7 +51,7 @@ private:
this
->
_needPayStr
=
needPayStr
;
_amount
=
_amountStr
.
toInt
()
/
100
.
0
;
_score
=
_scoreStr
.
toInt
()
/
100
.
0
;
_score
=
(
_scoreStr
.
toInt
()
/
10
)
/
10
.
0
;
// 不计分
_needPay
=
_needPayStr
.
toInt
()
/
100
.
0
;
_maxWillPay
=
_useScore
=
_couponAmount
=
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