Commit 2f71423e authored by shajiaiming's avatar shajiaiming

去掉多余字段

parent 09c85fb4
...@@ -49,7 +49,7 @@ class WalletCoinController extends BaseController ...@@ -49,7 +49,7 @@ class WalletCoinController extends BaseController
foreach ($condition as $val) { foreach ($condition as $val) {
if (is_array($val)) { if (is_array($val)) {
$model = WalletCoin::find()->select('id,sid,icon,name,nickname,introduce,platform,chain,address as contract_address,treaty') $model = WalletCoin::find()->select('id,icon,name,nickname,introduce,platform,chain,address as contract_address,treaty')
->where(['name' => $val[0], 'platform' => $val[1]]) ->where(['name' => $val[0], 'platform' => $val[1]])
->andWhere(['in', 'id', $relation_ids]) ->andWhere(['in', 'id', $relation_ids])
->asArray() ->asArray()
...@@ -57,7 +57,7 @@ class WalletCoinController extends BaseController ...@@ -57,7 +57,7 @@ class WalletCoinController extends BaseController
} }
if (is_string($val)) { if (is_string($val)) {
$model = WalletCoin::find()->select('id,sid,icon,name,nickname,introduce,platform,chain,address as contract_address,treaty') $model = WalletCoin::find()->select('id,icon,name,nickname,introduce,platform,chain,address as contract_address,treaty')
->where(['name' => $val]) ->where(['name' => $val])
->andWhere(['in', 'id', $relation_ids]) ->andWhere(['in', 'id', $relation_ids])
->asArray() ->asArray()
...@@ -136,7 +136,7 @@ class WalletCoinController extends BaseController ...@@ -136,7 +136,7 @@ class WalletCoinController extends BaseController
$relation_ids = array_column($relation_model, 'coin_id'); $relation_ids = array_column($relation_model, 'coin_id');
$query = WalletCoin::find() $query = WalletCoin::find()
->select('id, sid, icon, name, nickname, platform, chain, address as contract_address, treaty') ->select('id, icon, name, nickname, platform, chain, address as contract_address, treaty')
->where(['in', 'id', $relation_ids]) ->where(['in', 'id', $relation_ids])
->orderBy('id'); ->orderBy('id');
...@@ -188,7 +188,7 @@ class WalletCoinController extends BaseController ...@@ -188,7 +188,7 @@ class WalletCoinController extends BaseController
goto doEnd; goto doEnd;
} }
$relation = WalletCoinRelation::find()->where(['coin_id' => $id, 'platform_id' => (int)$platform_id])->one(); $relation = WalletCoinRelation::find()->where(['coin_id' => $id, 'platform_id' => (int)$platform_id])->one();
if (empty($relation)){ if (empty($relation)) {
goto doEnd; goto doEnd;
} }
......
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