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
ed4df541
Commit
ed4df541
authored
Oct 12, 2019
by
shajiaiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
关联查询
parent
388bd269
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
11 deletions
+7
-11
IssueCoinController.php
console/controllers/IssueCoinController.php
+4
-8
IssueCoinController.php
wallet/controllers/IssueCoinController.php
+3
-3
No files found.
console/controllers/IssueCoinController.php
View file @
ed4df541
...
...
@@ -21,7 +21,7 @@ class IssueCoinController extends Controller
}
$issue_coin_model
=
CoinIssueCoin
::
find
()
->
select
(
'id, name, symbol, introduction, total, category, owner'
)
->
select
(
'id, name,
platform_id,
symbol, introduction, total, category, owner'
)
->
where
([
'status'
=>
CoinIssueCoin
::
UN_AUDIT
])
->
orderBy
(
'create_time desc'
)
->
all
();
...
...
@@ -30,7 +30,6 @@ class IssueCoinController extends Controller
echo
date
(
'Y-m-d H:i:s'
)
.
'暂无发行任务'
.
PHP_EOL
;
return
0
;
}
$chain_service
=
new
Chain33Service
();
foreach
(
$issue_coin_model
as
$issue_coin
)
{
go
(
function
()
use
(
$issue_coin
,
$chain_service
)
{
...
...
@@ -41,13 +40,11 @@ class IssueCoinController extends Controller
'introduction'
=>
$issue_coin
->
introduction
,
//'total' => (int)$issue_coin->total,
'total'
=>
10
,
//'price' => (int)$issue_coin[''],
'price'
=>
3
,
'price'
=>
isset
(
$issue_coin
->
platform
->
issue_charge
)
?
(
int
)
$issue_coin
->
platform
->
issue_charge
:
0
,
'category'
=>
(
int
)
$issue_coin
->
category
,
//'owner' => $issue_coin->owner
'owner'
=>
'14TaZDqdzzmt8FcLrSJuWQux62JXmJynR9'
];
$result
=
$chain_service
->
createRawTokenPreCreateTx
(
$params
);
if
(
null
==
$result
[
'error'
]
&&
false
==
$result
[
'code'
])
{
$status
=
CoinIssueCoin
::
SUCCESS_ISSUE
;
...
...
@@ -72,7 +69,7 @@ class IssueCoinController extends Controller
public
function
actionManualIssue
()
{
$issue_coin_model
=
CoinIssueCoin
::
find
()
->
select
(
'id, name, symbol, introduction, total, category, owner'
)
->
select
(
'id, name,
platform_id,
symbol, introduction, total, category, owner'
)
->
where
([
'status'
=>
CoinIssueCoin
::
ALLOW_ISSUE
])
->
orderBy
(
'create_time desc'
)
->
all
();
...
...
@@ -92,8 +89,7 @@ class IssueCoinController extends Controller
'introduction'
=>
$issue_coin
->
introduction
,
//'total' => (int)$issue_coin->total,
'total'
=>
10
,
//'price' => (int)$issue_coin[''],
'price'
=>
3
,
'price'
=>
isset
(
$issue_coin
->
platform
->
issue_charge
)
?
(
int
)
$issue_coin
->
platform
->
issue_charge
:
0
,
'category'
=>
(
int
)
$issue_coin
->
category
,
//'owner' => $issue_coin->owner
'owner'
=>
'14TaZDqdzzmt8FcLrSJuWQux62JXmJynR9'
...
...
wallet/controllers/IssueCoinController.php
View file @
ed4df541
...
...
@@ -19,11 +19,11 @@ class IssueCoinController extends BaseController
$chain_id
=
\Yii
::
$app
->
request
->
get
(
'chain_id'
,
''
);
if
(
1
==
$platform_id
)
{
$query
=
CoinIssueCoin
::
find
()
->
select
(
'id, name, total, status, chain_id, owner, category, symbol, introduction, create_time'
)
->
select
(
'id, name, total, status, chain_id,
platform_id,
owner, category, symbol, introduction, create_time'
)
->
orderBy
(
'create_time desc'
);
}
else
{
$query
=
CoinIssueCoin
::
find
()
->
select
(
'id, name, total, status, chain_id, owner, category, symbol, introduction, create_time'
)
->
select
(
'id, name, total, status, chain_id,
platform_id,
owner, category, symbol, introduction, create_time'
)
->
where
([
'platform_id'
=>
$platform_id
])
->
orderBy
(
'create_time desc'
);
}
...
...
@@ -47,7 +47,7 @@ class IssueCoinController extends BaseController
foreach
(
$models
as
&
$val
)
{
$val
->
chain_id
=
$val
->
chain
->
platform
;
$val
->
charge
=
isset
(
$val
->
platform
->
issue_charge
)
?
$val
->
platform
->
issue_charge
:
0
;
$val
->
charge
=
isset
(
$val
->
platform
->
issue_charge
)
?
(
int
)
$val
->
platform
->
issue_charge
:
0
;
}
$data
=
[
'list'
=>
$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