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
d106e732
Commit
d106e732
authored
Oct 08, 2019
by
shajiaiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
发币脚本
parent
5a390ac1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
0 deletions
+54
-0
IssueCoinController.php
console/controllers/IssueCoinController.php
+34
-0
IssueChainController.php
wallet/controllers/IssueChainController.php
+20
-0
No files found.
console/controllers/IssueCoinController.php
0 → 100644
View file @
d106e732
<?php
namespace
console\controllers
;
use
common\models\psources\CoinIssueCoin
;
use
Yii
;
use
yii\console\Controller
;
class
IssueCoinController
extends
Controller
{
public
function
actionAutoIssue
()
{
$manual_review
=
Yii
::
$app
->
redis
->
get
(
'issue_chain_manual_review'
);
if
(
false
==
$manual_review
||
'open'
==
$manual_review
)
{
return
0
;
}
$issue_coin_model
=
CoinIssueCoin
::
find
()
->
select
(
'name, symbol, introduction, total, charge, category, owner'
)
->
where
([
'status'
=>
CoinIssueCoin
::
UN_AUDIT
])
->
asArray
()
->
all
();
echo
json_encode
(
$issue_coin_model
);
exit
;
if
(
false
==
$issue_coin_model
)
{
echo
date
(
'Y-m-d H:i:s'
)
.
'暂无需要发行任务'
.
PHP_EOL
;
return
0
;
}
foreach
(
$issue_coin_model
as
$key
=>
$issue_coin
)
{
go
(
function
()
use
(
$issue_coin
)
{
\Co
::
sleep
(
0.5
);
});
}
return
0
;
}
}
\ No newline at end of file
wallet/controllers/IssueChainController.php
View file @
d106e732
...
...
@@ -44,4 +44,23 @@ class IssueChainController extends BaseController
}
public
function
actionManageReview
()
{
$data
=
null
;
$platform_id
=
Yii
::
$app
->
request
->
getPlatformId
();
$manual_review
=
\Yii
::
$app
->
request
->
post
(
'manual_review'
,
''
);
if
(
!
in_array
(
$manual_review
,
[
'open'
,
'close'
]))
{
$msg
=
'参数错误'
;
$code
=
-
1
;
goto
doEnd
;
}
Yii
::
$app
->
redis
->
set
(
'issue_chain_manual_review'
,
$manual_review
);
$code
=
0
;
$msg
=
'success'
;
doEnd
:
return
[
'code'
=>
$code
,
'msg'
=>
$msg
];
}
}
\ No newline at end of file
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