Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
FMVip_LXJ
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_LXJ
Commits
45d1cce7
Commit
45d1cce7
authored
Dec 12, 2017
by
zhenfei.zhang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into 'dev'
修改状态码字段 See merge request
!3
parents
0705a1d9
5e2b2c1a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
FMVip_LXJ/task/fmp_redeem.cpp
+12
-5
No files found.
FMVip_LXJ/task/fmp_redeem.cpp
View file @
45d1cce7
...
...
@@ -104,7 +104,7 @@ QJsonObject FMPRedeem::Redeem(const QJsonObject &request)
if
(
scanningDialog
.
exec
()
!=
QDialog
::
Accepted
)
{
QJsonObject
ret
;
ret
[
"status
C
ode"
]
=
FM_API_WINDOWCLOSE
;
ret
[
"status
_c
ode"
]
=
FM_API_WINDOWCLOSE
;
ret
[
"msg"
]
=
"窗口关闭"
;
return
ret
;
}
...
...
@@ -282,7 +282,6 @@ QJsonObject FMPRedeem::ShowForUnConsum(QJsonObject json)
QJsonObject
redeemResult
;
QJsonObject
retJson
=
SendRequest
(
reqData
);
qDebug
()
<<
retJson
;
int
statusCode
=
retJson
[
"statusCode"
].
toInt
();
switch
(
statusCode
)
{
...
...
@@ -319,14 +318,14 @@ QJsonObject FMPRedeem::ShowForUnConsum(QJsonObject json)
ErrCodeDialog
::
showForErr
(
coupon
,
QString
(
"error:"
).
append
(
QString
::
number
(
statusCode
)));
break
;
}
redeemResult
[
"status
C
ode"
]
=
retJson
[
"statusCode"
];
redeemResult
[
"status
_c
ode"
]
=
retJson
[
"statusCode"
];
redeemResult
[
"msg"
]
=
retJson
[
"msg"
].
toString
();
return
redeemResult
;
}
else
{
QJsonObject
retJson
;
retJson
[
"status
C
ode"
]
=
FM_API_WINDOWCLOSE
;
retJson
[
"status
_c
ode"
]
=
FM_API_WINDOWCLOSE
;
retJson
[
"msg"
]
=
"窗口关闭"
;
return
retJson
;
}
...
...
@@ -336,18 +335,24 @@ QJsonObject FMPRedeem::ShowForHasConsum(QJsonObject json)
{
QString
storeInfo
=
QString
(
"%1(%2)"
).
arg
(
_store_id
).
arg
(
_station_id
);
ConsumptionDialog
::
ShowForHasConsum
(
json
[
"msg"
].
toString
(),
""
,
storeInfo
,
_coupon
);
json
[
"status_code"
]
=
json
[
"statusCode"
];
json
.
remove
(
"statusCode"
);
return
json
;
}
QJsonObject
FMPRedeem
::
ShowForInvalid
(
QJsonObject
json
)
{
ErrCodeDialog
::
showForInvalid
(
_coupon
);
json
[
"status_code"
]
=
json
[
"statusCode"
];
json
.
remove
(
"statusCode"
);
return
json
;
}
QJsonObject
FMPRedeem
::
ShowForExpird
(
QJsonObject
json
)
{
ErrCodeDialog
::
showForExpird
(
""
,
""
,
""
,
_coupon
);
json
[
"status_code"
]
=
json
[
"statusCode"
];
json
.
remove
(
"statusCode"
);
return
json
;
}
...
...
@@ -356,6 +361,8 @@ QJsonObject FMPRedeem::ShowForErr(QJsonObject json)
int
statusCode
=
json
[
"statusCode"
].
toInt
();
QString
msg
=
json
[
"msg"
].
toString
();
ErrCodeDialog
::
showForErr
(
_coupon
,
QString
(
"%1: %2"
).
arg
(
QString
::
number
(
statusCode
)).
arg
(
msg
));
json
[
"status_code"
]
=
json
[
"statusCode"
];
json
.
remove
(
"statusCode"
);
return
json
;
}
...
...
@@ -363,7 +370,7 @@ QJsonObject FMPRedeem::ShowForMismatch(QJsonObject json)
{
ErrCodeDialog
::
showForMismatch
(
_coupon
,
"券和商品不匹配"
);
QJsonObject
mismatch
;
mismatch
[
"status
C
ode"
]
=
31
;
mismatch
[
"status
_c
ode"
]
=
31
;
mismatch
[
"msg"
]
=
"券和商品不匹配"
;
return
mismatch
;
}
...
...
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