Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
huangzhicong
/
SmartCanteen
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
2e3386be
authored
Nov 26, 2019
by
patpat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复在线支付超时转离线支付时提示重复扫码的问题
parent
a768d877
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
app/src/main/java/com/bgycc/smartcanteen/action/PayOfflineAction.java
+5
-1
app/src/main/java/com/bgycc/smartcanteen/action/PayOnlineAction.java
+1
-1
No files found.
app/src/main/java/com/bgycc/smartcanteen/action/PayOfflineAction.java
View file @
2e3386be
...
@@ -71,13 +71,17 @@ public class PayOfflineAction extends Action {
...
@@ -71,13 +71,17 @@ public class PayOfflineAction extends Action {
}
}
public
void
exec
(
String
payCode
,
String
payCodeType
)
{
public
void
exec
(
String
payCode
,
String
payCodeType
)
{
exec
(
payCode
,
payCodeType
,
true
);
}
public
void
exec
(
String
payCode
,
String
payCodeType
,
boolean
checkRepeat
)
{
setState
(
State
.
STARTED
);
setState
(
State
.
STARTED
);
if
(!
QRCodeTask
.
TYPE_BHPAY
.
equals
(
payCodeType
))
{
if
(!
QRCodeTask
.
TYPE_BHPAY
.
equals
(
payCodeType
))
{
setState
(
State
.
FAIL
);
setState
(
State
.
FAIL
);
return
;
return
;
}
}
if
(
mPayCodeHistory
.
contains
(
payCode
))
{
if
(
checkRepeat
&&
mPayCodeHistory
.
contains
(
payCode
))
{
setState
(
State
.
FAIL
,
"请不要重复扫码"
);
setState
(
State
.
FAIL
,
"请不要重复扫码"
);
return
;
return
;
}
}
...
...
app/src/main/java/com/bgycc/smartcanteen/action/PayOnlineAction.java
View file @
2e3386be
...
@@ -99,7 +99,7 @@ public class PayOnlineAction extends Action {
...
@@ -99,7 +99,7 @@ public class PayOnlineAction extends Action {
public
void
run
(
long
id
,
boolean
isLastTime
)
{
public
void
run
(
long
id
,
boolean
isLastTime
)
{
if
(
isLastTime
)
{
if
(
isLastTime
)
{
setState
(
State
.
TIMEOUT
,
"交易超时"
);
setState
(
State
.
TIMEOUT
,
"交易超时"
);
PayOfflineAction
.
getDefault
().
exec
(
payCode
,
payCodeType
);
PayOfflineAction
.
getDefault
().
exec
(
payCode
,
payCodeType
,
false
);
}
else
{
}
else
{
if
(
mActionRunnable
!=
null
)
{
if
(
mActionRunnable
!=
null
)
{
mActionRunnable
.
run
();
mActionRunnable
.
run
();
...
...
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