Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
blind-box-api
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
haojie
blind-box-api
Commits
3d12378c
Commit
3d12378c
authored
Mar 09, 2023
by
haojie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
c017b59d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
+2
-4
app/Http/Controllers/API/Redis/CheckArrivalCl.php
+1
-3
app/Jobs/CheckArrival.php
+1
-1
No files found.
app/Http/Controllers/API/Redis/CheckArrivalCl.php
View file @
3d12378c
...
@@ -10,12 +10,11 @@ class CheckArrivalCl
...
@@ -10,12 +10,11 @@ class CheckArrivalCl
{
{
public
function
check
(
$hash
,
$price
,
$address
,
$to
)
public
function
check
(
$hash
,
$price
,
$address
,
$to
)
{
{
Log
::
error
(
'执行异步任务'
);
# 添加订单后--查询是否到账--最多检测20次
# 添加订单后--查询是否到账--最多检测20次
for
(
$i
=
1
;
$i
<=
10
;
$i
++
)
{
for
(
$i
=
1
;
$i
<=
10
;
$i
++
)
{
$type
=
self
::
IntervalCheck
(
$hash
,
$price
,
$address
,
$to
);
$type
=
self
::
IntervalCheck
(
$hash
,
$price
,
$address
,
$to
);
Log
::
error
(
$type
);
if
(
$type
)
{
if
(
$type
)
{
Log
::
error
(
'购买成功'
);
break
;
break
;
}
}
sleep
(
1
);
sleep
(
1
);
...
@@ -32,7 +31,6 @@ public function IntervalCheck($hash, $price, $address, $to)
...
@@ -32,7 +31,6 @@ public function IntervalCheck($hash, $price, $address, $to)
if
(
$item
->
status
==
1
)
{
if
(
$item
->
status
==
1
)
{
return
true
;
return
true
;
}
}
Log
::
error
(
'插入redis'
);
# 获取交易
# 获取交易
$obj
=
(
object
)[];
$obj
=
(
object
)[];
$obj
->
hash
=
$hash
;
$obj
->
hash
=
$hash
;
...
...
app/Jobs/CheckArrival.php
View file @
3d12378c
...
@@ -25,11 +25,11 @@ class CheckArrival implements ShouldQueue
...
@@ -25,11 +25,11 @@ class CheckArrival implements ShouldQueue
*/
*/
public
function
__construct
(
string
$hash
,
int
$price
,
string
$address
,
string
$to
)
public
function
__construct
(
string
$hash
,
int
$price
,
string
$address
,
string
$to
)
{
{
$this
->
queue
=
"
{
check-arrival
}
"
;
$this
->
hash
=
$hash
;
$this
->
hash
=
$hash
;
$this
->
price
=
$price
;
$this
->
price
=
$price
;
$this
->
address
=
$address
;
$this
->
address
=
$address
;
$this
->
to
=
$to
;
$this
->
to
=
$to
;
$this
->
queue
=
"
{
check-check-arrival
}
"
;
}
}
/**
/**
...
...
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