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
d54f065c
Commit
d54f065c
authored
Jan 10, 2020
by
shajiaiming
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/issue_coin' into develop
parents
9060f31c
221a8716
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
IssueCoinController.php
api/controllers/IssueCoinController.php
+5
-3
CoinIssueCoin.php
common/models/psources/CoinIssueCoin.php
+4
-2
No files found.
api/controllers/IssueCoinController.php
View file @
d54f065c
...
...
@@ -61,7 +61,7 @@ class IssueCoinController extends BaseController
$model
=
new
CoinIssueCoin
();
if
(
35
==
$platform_id
)
{
$params
[
'template'
]
=
isset
(
$result
[
'template'
])
?
$result
[
'template'
]
:
[];
$model
->
setScenario
(
CoinIssueCoin
::
SCENARIOS_
CREATE
_MALL
);
$model
->
setScenario
(
CoinIssueCoin
::
SCENARIOS_
VERIFY
_MALL
);
}
else
{
$model
->
setScenario
(
CoinIssueCoin
::
SCENARIOS_CREATE
);
}
...
...
@@ -132,21 +132,23 @@ class IssueCoinController extends BaseController
'introduction'
=>
isset
(
$result
[
'introduction'
])
?
$result
[
'introduction'
]
:
''
,
'category'
=>
isset
(
$result
[
'category'
])
?
$result
[
'category'
]
:
0
,
'type'
=>
isset
(
$result
[
'type'
])
?
$result
[
'type'
]
:
0
,
'platform_id'
=>
$platform_id
,
'platform_id'
=>
(
int
)
$platform_id
,
'chain_id'
=>
$chain_id
,
'charge_unit'
=>
isset
(
$result
[
'charge_unit'
])
?
$result
[
'charge_unit'
]
:
''
,
'charge'
=>
isset
(
$result
[
'type'
])
?
((
CoinIssueCoin
::
TYPE_NO
==
$result
[
'type'
])
?
$coin_platform
->
issue_charge
:
0
)
:
0
,
'token_type'
=>
isset
(
$result
[
'token_type'
])
?
$result
[
'token_type'
]
:
0
,
'nickname'
=>
isset
(
$result
[
'nickname'
])
?
$result
[
'nickname'
]
:
''
];
$model
=
new
CoinIssueCoin
();
if
(
35
==
$platform_id
)
{
$params
[
'template'
]
=
isset
(
$result
[
'template'
])
?
$result
[
'template'
]
:
[];
$model
->
setScenario
(
CoinIssueCoin
::
SCENARIOS_CREATE_MALL
);
}
else
{
$model
->
setScenario
(
CoinIssueCoin
::
SCENARIOS_CREATE
);
}
$model
->
load
(
$result
,
''
);
if
(
!
$model
->
save
())
{
$msg
=
$model
->
errors
;
$code
=
-
1
;
...
...
common/models/psources/CoinIssueCoin.php
View file @
d54f065c
...
...
@@ -33,6 +33,7 @@ class CoinIssueCoin extends CommonActiveRecord
const
SCENARIOS_UPDATE
=
'update'
;
const
SCENARIOS_CANCEL
=
'cancel'
;
const
SCENARIOS_CREATE_MALL
=
'create_mall'
;
const
SCENARIOS_VERIFY_MALL
=
'verify_mall'
;
public
static
function
getDb
()
{
...
...
@@ -53,7 +54,7 @@ class CoinIssueCoin extends CommonActiveRecord
[
'symbol'
,
'string'
,
'length'
=>
[
6
,
128
]],
[
'name'
,
'string'
,
'length'
=>
[
3
,
50
]],
[
'nickname'
,
'string'
,
'length'
=>
[
0
,
10
]],
[[
'token_type'
,
'nickname'
,
'origin'
],
'safe'
],
[[
'token_type'
,
'nickname'
],
'safe'
],
[
'template'
,
'verfiyTemplate'
],
#['status', 'in', 'range' => [1, 2, 0]],
[
'name'
,
'verfiyName'
],
...
...
@@ -66,7 +67,8 @@ 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'
,
'origin'
],
self
::
SCENARIOS_CREATE_MALL
=>
[
'name'
,
'symbol'
,
'total'
,
'owner'
,
'introduction'
,
'category'
,
'type'
,
'platform_id'
,
'chain_id'
,
'token_type'
,
'nickname'
],
self
::
SCENARIOS_VERIFY_MALL
=>
[
'name'
,
'symbol'
,
'total'
,
'owner'
,
'introduction'
,
'category'
,
'type'
,
'platform_id'
,
'chain_id'
,
'token_type'
,
'nickname'
,
'template'
],
self
::
SCENARIOS_UPDATE
=>
[
'status'
],
self
::
SCENARIOS_CANCEL
=>
[
'status'
],
];
...
...
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