Commit 3b61083a authored by shajiaiming's avatar shajiaiming

Merge branch 'master' into develop

parents 800e17aa 1c98dc21
...@@ -85,7 +85,10 @@ class CoinIssueCoin extends CommonActiveRecord ...@@ -85,7 +85,10 @@ class CoinIssueCoin extends CommonActiveRecord
//非增发 //非增发
if (CoinIssueCoin::TYPE_NO == $this->type) { if (CoinIssueCoin::TYPE_NO == $this->type) {
$model = CoinIssueCoin::find()->where(['name' => $this->name, 'platform_id' => $this->platform_id, 'status' => CoinIssueCoin::STATUS_SUCCESS])->orderBy('id desc')->one(); $model = CoinIssueCoin::find()
->where(['name' => $this->name, 'platform_id' => $this->platform_id, 'status' => CoinIssueCoin::STATUS_SUCCESS])
->andWhere(['<>', 'status', CoinIssueCoin::STATUS_FAILED])
->orderBy('id desc')->one();
if ($model) { if ($model) {
$this->addError($attribute, 'Token名称已存在'); $this->addError($attribute, 'Token名称已存在');
return false; return false;
...@@ -112,7 +115,10 @@ class CoinIssueCoin extends CommonActiveRecord ...@@ -112,7 +115,10 @@ class CoinIssueCoin extends CommonActiveRecord
} }
} }
if (CoinIssueCoin::TYPE_NO == $this->type) { if (CoinIssueCoin::TYPE_NO == $this->type) {
$model = CoinIssueCoin::find()->where(['symbol' => $this->symbol, 'platform_id' => $this->platform_id, 'status' => CoinIssueCoin::STATUS_SUCCESS])->orderBy('id desc')->one(); $model = CoinIssueCoin::find()
->where(['symbol' => $this->symbol, 'platform_id' => $this->platform_id, 'status' => CoinIssueCoin::STATUS_SUCCESS])
->andWhere(['<>', 'status', CoinIssueCoin::STATUS_FAILED])
->orderBy('id desc')->one();
if ($model) { if ($model) {
$this->addError($attribute, 'Token名称已存在'); $this->addError($attribute, 'Token名称已存在');
return false; return false;
......
...@@ -231,7 +231,7 @@ class IssueChainController extends BaseController ...@@ -231,7 +231,7 @@ class IssueChainController extends BaseController
if (!empty($coin_model)) { if (!empty($coin_model)) {
array_unshift($symbol, $coin_model->name); array_unshift($symbol, $coin_model->name);
} }
//array_unshift($symbol, 'BTY'); array_unshift($symbol, 'BTY');
$val->tokens = $symbol; $val->tokens = $symbol;
$val->platform_id = Yii::$app->params['chain_nodes'][strtoupper($val->platform)]['platform_id']; $val->platform_id = Yii::$app->params['chain_nodes'][strtoupper($val->platform)]['platform_id'];
} }
......
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