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
70bfc715
Commit
70bfc715
authored
Jan 13, 2020
by
shajiaiming
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into develop
parents
b926fce7
47105d9b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
5 deletions
+10
-5
IssueCoinController.php
api/controllers/IssueCoinController.php
+2
-2
CoinIssueCoin.php
common/models/psources/CoinIssueCoin.php
+6
-1
IssueChainTransferController.php
console/controllers/IssueChainTransferController.php
+2
-2
No files found.
api/controllers/IssueCoinController.php
View file @
70bfc715
...
@@ -228,7 +228,7 @@ class IssueCoinController extends BaseController
...
@@ -228,7 +228,7 @@ class IssueCoinController extends BaseController
$pages
=
new
Pagination
([
'totalCount'
=>
$countQuery
->
count
(),
'pageSize'
=>
$size
]);
$pages
=
new
Pagination
([
'totalCount'
=>
$countQuery
->
count
(),
'pageSize'
=>
$size
]);
foreach
(
$models
as
&
$val
)
{
foreach
(
$models
as
&
$val
)
{
$val
->
chain_id
=
$val
->
chain
->
platform
;
$val
->
chain_id
=
$val
->
chain
->
platform
;
if
(
0
==
$val
->
token_type
)
{
if
(
35
!=
$platform_id
)
{
$val
->
total
=
(
int
)
$val
->
total
*
1e4
;
$val
->
total
=
(
int
)
$val
->
total
*
1e4
;
}
}
}
}
...
@@ -268,7 +268,7 @@ class IssueCoinController extends BaseController
...
@@ -268,7 +268,7 @@ class IssueCoinController extends BaseController
$code
=
-
1
;
$code
=
-
1
;
goto
doEnd
;
goto
doEnd
;
}
}
if
(
0
==
$data
->
token_type
)
{
if
(
35
!=
$data
->
platform_id
)
{
$data
->
total
=
(
int
)
$data
->
total
*
1e4
;
$data
->
total
=
(
int
)
$data
->
total
*
1e4
;
}
}
$data
->
chain_name
=
$data
->
chain
->
platform
;
$data
->
chain_name
=
$data
->
chain
->
platform
;
...
...
common/models/psources/CoinIssueCoin.php
View file @
70bfc715
...
@@ -161,7 +161,12 @@ class CoinIssueCoin extends CommonActiveRecord
...
@@ -161,7 +161,12 @@ class CoinIssueCoin extends CommonActiveRecord
}
}
$issue_record
=
CoinIssueCoin
::
find
()
->
where
([
'platform_id'
=>
$this
->
platform_id
,
'symbol'
=>
$this
->
symbol
,
'status'
=>
CoinIssueCoin
::
STATUS_SUCCESS
])
->
sum
(
'total'
);
$issue_record
=
CoinIssueCoin
::
find
()
->
where
([
'platform_id'
=>
$this
->
platform_id
,
'symbol'
=>
$this
->
symbol
,
'status'
=>
CoinIssueCoin
::
STATUS_SUCCESS
])
->
sum
(
'total'
);
$issue_record
=
empty
(
$issue_record
)
?
0
:
$issue_record
;
$issue_record
=
empty
(
$issue_record
)
?
0
:
$issue_record
;
if
(
$issue_record
+
$this
->
$attribute
>
(
900
*
1e4
))
{
if
(
35
==
$this
->
platform_id
)
{
$unit
=
900
*
1e8
;
}
else
{
$unit
=
900
*
1e4
;
}
if
(
$issue_record
+
$this
->
$attribute
>
$unit
)
{
$this
->
addError
(
$attribute
,
'最大发行量900亿,目前已发行'
.
$issue_record
.
'亿'
);
$this
->
addError
(
$attribute
,
'最大发行量900亿,目前已发行'
.
$issue_record
.
'亿'
);
return
false
;
return
false
;
}
}
...
...
console/controllers/IssueChainTransferController.php
View file @
70bfc715
...
@@ -256,7 +256,7 @@ class IssueChainTransferController extends Controller
...
@@ -256,7 +256,7 @@ class IssueChainTransferController extends Controller
if
(
CoinIssueCoin
::
TYPE_YES
==
$val
->
coin
->
type
)
{
if
(
CoinIssueCoin
::
TYPE_YES
==
$val
->
coin
->
type
)
{
$params
=
[
$params
=
[
'name'
=>
$val
->
coin
->
name
,
'name'
=>
$val
->
coin
->
name
,
'nickname'
=>
$val
->
nickname
,
'nickname'
=>
$val
->
coin
->
nickname
,
'symbol'
=>
$val
->
coin
->
symbol
,
'symbol'
=>
$val
->
coin
->
symbol
,
'introduction'
=>
$val
->
coin
->
introduction
,
'introduction'
=>
$val
->
coin
->
introduction
,
'total'
=>
(
int
)
$val
->
coin
->
total
,
'total'
=>
(
int
)
$val
->
coin
->
total
,
...
@@ -278,7 +278,7 @@ class IssueChainTransferController extends Controller
...
@@ -278,7 +278,7 @@ class IssueChainTransferController extends Controller
if
(
CoinIssueCoin
::
TYPE_NO
==
$val
->
coin
->
type
)
{
if
(
CoinIssueCoin
::
TYPE_NO
==
$val
->
coin
->
type
)
{
$params
=
[
$params
=
[
'name'
=>
$val
->
coin
->
name
,
'name'
=>
$val
->
coin
->
name
,
'nickname'
=>
$val
->
nickname
,
'nickname'
=>
$val
->
coin
->
nickname
,
'symbol'
=>
$val
->
coin
->
symbol
,
'symbol'
=>
$val
->
coin
->
symbol
,
'introduction'
=>
$val
->
coin
->
introduction
,
'introduction'
=>
$val
->
coin
->
introduction
,
'total'
=>
(
int
)
$val
->
coin
->
total
,
'total'
=>
(
int
)
$val
->
coin
->
total
,
...
...
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