Commit e2e71048 authored by shajiaiming's avatar shajiaiming

Merge branch 'feature/issue_coin' into 'master'

fix See merge request !226
parents edae5b99 9a27a1c7
......@@ -85,7 +85,10 @@ class CoinIssueCoin extends CommonActiveRecord
//非增发
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) {
$this->addError($attribute, 'Token名称已存在');
return false;
......@@ -112,7 +115,10 @@ class CoinIssueCoin extends CommonActiveRecord
}
}
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) {
$this->addError($attribute, 'Token名称已存在');
return false;
......
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