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
e60d2a74
Commit
e60d2a74
authored
Oct 28, 2019
by
shajiaiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
06fdd5d0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
IssueCoinController.php
api/controllers/IssueCoinController.php
+1
-4
IssueCoinController.php
console/controllers/IssueCoinController.php
+11
-0
No files found.
api/controllers/IssueCoinController.php
View file @
e60d2a74
...
...
@@ -70,10 +70,7 @@ class IssueCoinController extends BaseController
$msg
=
'ok'
;
$code
=
0
;
$data
=
$model
->
getPrimaryKey
();
$coin_issue_record
=
new
CoinIssueRecord
();
$coin_issue_record
->
platform_id
=
$platform_id
;
$coin_issue_record
->
total
=
$result
[
'total'
];
$coin_issue_record
->
save
();
doEnd
:
return
[
'code'
=>
$code
,
'msg'
=>
$msg
,
'data'
=>
$data
];
}
...
...
console/controllers/IssueCoinController.php
View file @
e60d2a74
...
...
@@ -4,6 +4,7 @@ namespace console\controllers;
use
common\models\psources\Coin
;
use
common\models\psources\CoinIssueCoin
;
use
common\models\psources\CoinIssueRecord
;
use
common\models\psources\CoinIssueTransfer
;
use
common\service\chain33\Chain33Service
;
use
Yii
;
...
...
@@ -134,8 +135,10 @@ class IssueCoinController extends Controller
$result
=
$chain_service
->
createRawTokenPreCreateTx
(
$params
);
if
(
null
==
$result
[
'error'
]
&&
false
==
$result
[
'code'
])
{
$status
=
CoinIssueCoin
::
SUCCESS_ISSUE
;
$params
[
'platform_id'
]
=
$issue_coin_model
->
platform_id
;
$params
[
'platform'
]
=
$issue_coin_model
->
chain
->
platform
;
$this
->
syncTransfer
(
$issue_transfer
[
'id'
]);
$this
->
syncRecord
(
$params
);
$this
->
syncCoin
(
$params
);
}
else
{
$status
=
CoinIssueCoin
::
FAIL_ISSUE
;
...
...
@@ -167,6 +170,14 @@ class IssueCoinController extends Controller
}
}
public
function
syncRecord
(
$params
=
[])
{
$coin_issue_record
=
new
CoinIssueRecord
();
$coin_issue_record
->
platform_id
=
$params
[
'platform_id'
];
$coin_issue_record
->
total
=
$params
[
'total'
];
$coin_issue_record
->
save
();
}
public
function
syncTransfer
(
$id
)
{
$issue_transfer
=
CoinIssueTransfer
::
find
()
->
where
([
'id'
=>
$id
])
->
one
();
...
...
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