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
07d48b97
Commit
07d48b97
authored
Jan 10, 2020
by
shajiaiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ru
parent
b39cf3ca
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
9 deletions
+11
-9
IssueCoinController.php
api/controllers/IssueCoinController.php
+5
-4
CoinIssueAttachment.php
common/models/psources/CoinIssueAttachment.php
+2
-2
CoinIssueCoin.php
common/models/psources/CoinIssueCoin.php
+4
-3
No files found.
api/controllers/IssueCoinController.php
View file @
07d48b97
...
...
@@ -4,7 +4,7 @@ namespace api\controllers;
use
common\components\ErrorMessage
;
use
common\models\psources\CoinIssueRevokeRecord
;
use
common\models\psources\CoinIssue
Template
;
use
common\models\psources\CoinIssue
Attachment
;
use
common\service\chain33\Chain33Service
;
use
Yii
;
use
yii\data\Pagination
;
...
...
@@ -155,10 +155,11 @@ class IssueCoinController extends BaseController
$msg
=
'ok'
;
$code
=
0
;
$data
=
$model
->
getPrimaryKey
();
if
(
35
==
$platform_id
)
{
$template
=
new
CoinIssue
Template
();
if
(
0
!=
$params
[
'token_type'
]
)
{
$template
=
new
CoinIssue
Attachment
();
$template
->
issue_coin_id
=
$data
;
$template
->
template
=
isset
(
$result
[
'template'
])
?
$result
[
'template'
]
:
[];
$template
->
origin
=
isset
(
$result
[
'origin'
])
?
$result
[
'origin'
]
:
''
;
$template
->
template
=
isset
(
$result
[
'template'
])
?
$result
[
'template'
]
:
'{}'
;
$template
->
save
();
}
...
...
common/models/psources/CoinIssue
Template
.php
→
common/models/psources/CoinIssue
Attachment
.php
View file @
07d48b97
...
...
@@ -5,7 +5,7 @@ namespace common\models\psources;
use
Yii
;
use
yii\db\Expression
;
class
CoinIssue
Template
extends
CommonActiveRecord
class
CoinIssue
Attachment
extends
CommonActiveRecord
{
public
static
function
getDb
()
...
...
@@ -15,7 +15,7 @@ class CoinIssueTemplate extends CommonActiveRecord
public
static
function
tableName
()
{
return
'{{%coin_issue_
template
}}'
;
return
'{{%coin_issue_
attachment
}}'
;
}
public
function
getTransfer
()
...
...
common/models/psources/CoinIssueCoin.php
View file @
07d48b97
...
...
@@ -53,7 +53,7 @@ class CoinIssueCoin extends CommonActiveRecord
[
'symbol'
,
'string'
,
'length'
=>
[
6
,
128
]],
[
'name'
,
'string'
,
'length'
=>
[
3
,
50
]],
[
'nickname'
,
'string'
,
'length'
=>
[
0
,
10
]],
[[
'token_type'
,
'nickname'
],
'safe'
],
[[
'token_type'
,
'nickname'
,
'origin'
],
'safe'
],
[
'template'
,
'verfiyTemplate'
],
#['status', 'in', 'range' => [1, 2, 0]],
[
'name'
,
'verfiyName'
],
...
...
@@ -66,7 +66,7 @@ class CoinIssueCoin extends CommonActiveRecord
{
$scenarios
=
[
self
::
SCENARIOS_CREATE
=>
[
'name'
,
'symbol'
,
'total'
,
'owner'
,
'introduction'
,
'category'
,
'type'
,
'platform_id'
,
'chain_id'
,
'charge_unit'
,
'charge'
,
'token_type'
,
'nickname'
],
self
::
SCENARIOS_CREATE_MALL
=>
[
'name'
,
'symbol'
,
'total'
,
'owner'
,
'introduction'
,
'category'
,
'type'
,
'platform_id'
,
'chain_id'
,
'token_type'
,
'nickname'
,
'template'
],
self
::
SCENARIOS_CREATE_MALL
=>
[
'name'
,
'symbol'
,
'total'
,
'owner'
,
'introduction'
,
'category'
,
'type'
,
'platform_id'
,
'chain_id'
,
'token_type'
,
'nickname'
,
'template'
,
'origin'
],
self
::
SCENARIOS_UPDATE
=>
[
'status'
],
self
::
SCENARIOS_CANCEL
=>
[
'status'
],
];
...
...
@@ -207,6 +207,6 @@ class CoinIssueCoin extends CommonActiveRecord
public
function
getTemplated
()
{
return
$this
->
hasOne
(
CoinIssue
Template
::
className
(),
[
'issue_coin_id'
=>
'id'
])
->
select
(
'template'
);
return
$this
->
hasOne
(
CoinIssue
Attachment
::
className
(),
[
'issue_coin_id'
=>
'id'
])
->
select
(
'template'
);
}
}
\ 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