Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
token
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wallet
token
Commits
59daad70
Commit
59daad70
authored
Sep 10, 2019
by
shajiaiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
1f47c4b6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
11 deletions
+1
-11
GameBetController.php
console/controllers/GameBetController.php
+1
-11
No files found.
console/controllers/GameBetController.php
View file @
59daad70
...
...
@@ -37,7 +37,6 @@ class GameBetController extends Controller
$resultJSON
=
json_decode
(
$queryResultItems
[
'queryResultItems'
][
0
][
'resultJSON'
],
true
);
$current_round
=
$resultJSON
[
'current_round'
];
$current_height
=
$resultJSON
[
'height'
];
$cache_current_round
=
Yii
::
$app
->
redis
->
get
(
'chain33_game_bet_status_'
.
$key
);
if
(
empty
(
$cache_current_round
))
{
$cache_current_round
=
CoinGameBet
::
find
()
->
where
([
'platform'
=>
$key
])
->
max
(
'round'
);
...
...
@@ -49,7 +48,6 @@ class GameBetController extends Controller
continue
;
}
Yii
::
$app
->
redis
->
set
(
'chain33_game_bet_status_'
.
$key
,
$current_round
,
'EX'
,
300
);
Yii
::
$app
->
redis
->
set
(
'chain33_game_bet_status_height_'
.
$key
,
$current_height
,
'EX'
,
300
);
$result
=
$service
->
getBetStatus
(
$cache_current_round
,
$current_round
,
''
,
$node
);
if
(
0
!==
$result
[
'code'
])
{
echo
$key
.
':'
.
date
(
'Y-m-d H:i:s'
)
.
'数据错误'
.
PHP_EOL
;
...
...
@@ -99,18 +97,10 @@ class GameBetController extends Controller
$resultJSON
=
json_decode
(
$queryResultItems
[
'queryResultItems'
][
0
][
'resultJSON'
],
true
);
$current_height
=
$resultJSON
[
'height'
];
$cache_current_height
=
Yii
::
$app
->
redis
->
get
(
'chain33_game_bet_status_height_'
.
$key
);
if
((
$cache_current_height
+
12
)
<
$current_height
)
{
echo
$key
.
':'
.
date
(
'Y-m-d H:i:s'
)
.
'区块高度小于12'
.
PHP_EOL
;
continue
;
}
//$height = $cache_current_height - 12;
$models
=
CoinGameBet
::
find
()
->
select
(
'round'
)
->
where
([
'and'
,
[
'valid'
=>
CoinGameBet
::
VAILD_FALSE
],
[
'<'
,
'height'
,
$c
ache_current_height
],
[
'<'
,
'height'
,
$c
urrent_height
-
12
],
[
'platform'
=>
$key
]
])
->
all
();
if
(
empty
(
$models
)){
...
...
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