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
2bac09cd
Commit
2bac09cd
authored
Dec 27, 2019
by
shajiaiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
c1bc9042
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
14 deletions
+2
-14
CoinIssueCoin.php
common/models/psources/CoinIssueCoin.php
+2
-14
No files found.
common/models/psources/CoinIssueCoin.php
View file @
2bac09cd
...
...
@@ -129,14 +129,14 @@ class CoinIssueCoin extends CommonActiveRecord
public
function
verfiyAmount
(
$attribute
,
$params
)
{
if
(
CoinIssueCoin
::
TYPE_YES
==
$this
->
type
)
{
if
(
$this
->
$attribute
>
10
)
{
if
(
$this
->
$attribute
>
(
10
*
1e4
)
)
{
$this
->
addError
(
$attribute
,
'增发发行量不能超过10亿'
);
return
false
;
}
}
$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
;
if
(
$issue_record
+
$this
->
$attribute
>
900
)
{
if
(
$issue_record
+
$this
->
$attribute
>
(
900
*
1e4
)
)
{
$this
->
addError
(
$attribute
,
'最大发行量900亿,目前已发行'
.
$issue_record
.
'亿'
);
return
false
;
}
...
...
@@ -163,18 +163,6 @@ class CoinIssueCoin extends CommonActiveRecord
return
array_merge
(
parent
::
attributes
(),
[
'issue_charge'
,
'url'
,
'chain_name'
]);
}
/**
* 获取状态数组
* @return array
*/
public
static
function
getAgentStatus
()
{
return
[
self
::
STATUS_SUCCESS
=>
'发行成功'
,
self
::
STATUS_FAIL
=>
'发行失败'
,
];
}
public
function
getChain
()
{
return
$this
->
hasOne
(
CoinPlatformWithHold
::
className
(),
[
'id'
=>
'chain_id'
]);
...
...
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