Commit 70bfc715 authored by shajiaiming's avatar shajiaiming

Merge branch 'master' into develop

parents b926fce7 47105d9b
...@@ -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;
......
...@@ -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;
} }
......
...@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment