Commit fb5a0434 authored by shajiaiming's avatar shajiaiming

fix

parent 72a6e391
...@@ -241,7 +241,7 @@ class IssueChainTransferController extends Controller ...@@ -241,7 +241,7 @@ class IssueChainTransferController extends Controller
CoinIssueCoin::updateAll(['status' => $status], [ CoinIssueCoin::updateAll(['status' => $status], [
'id' => $val->coin->id, 'id' => $val->coin->id,
]); ]);
if (CoinIssueCoin::TYPE_NO == $val->coin->type) { if (CoinIssueCoin::TYPE_YES == $val->coin->type) {
$params = [ $params = [
'name' => $val->coin->name, 'name' => $val->coin->name,
'symbol' => $val->coin->symbol, 'symbol' => $val->coin->symbol,
...@@ -356,11 +356,12 @@ class IssueChainTransferController extends Controller ...@@ -356,11 +356,12 @@ class IssueChainTransferController extends Controller
public function syncCoin($params = []) public function syncCoin($params = [])
{ {
$model_coin = Coin::find()->where(['name' => $params['name'], 'platform' => $params['platform']])->one(); $model_coin = Coin::find()->where(['name' => $params['symbol'], 'platform' => $params['platform']])->one();
if (false == $model_coin) { if (false == $model_coin) {
$model = new Coin(); $model = new Coin();
$model->name = $params['symbol']; $model->name = $params['symbol'];
$model->sid = $params['name']; $model->sid = $params['name'];
$model->nickname = ['ja' => '', 'en-US' => '', 'zh-CN' => ''];
$model->platform = $params['platform']; $model->platform = $params['platform'];
$model->publish_count = $params['total'] * 1e8; $model->publish_count = $params['total'] * 1e8;
$model->chain = 'BTY'; $model->chain = 'BTY';
......
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