Commit bfdee632 authored by shajiaiming's avatar shajiaiming

fix

parent 96422613
...@@ -27,12 +27,15 @@ class PlatformCoinsController extends BaseController ...@@ -27,12 +27,15 @@ class PlatformCoinsController extends BaseController
} }
$is_exist = true; $is_exist = true;
if (41 == $platform_id) {
if (41 !== $platform_id) {
return ['code' => -1, 'data' => null, 'msg' => '缺少必要的参数'];
}
$model = CoinPlatformCoins::find()->where(['platform_id' => $platform_id, 'deviceCode' => $deviceCode])->one(); $model = CoinPlatformCoins::find()->where(['platform_id' => $platform_id, 'deviceCode' => $deviceCode])->one();
if (!$model) { if (!$model) {
$is_exist = false; $is_exist = false;
} }
}
$item_array = []; $item_array = [];
$to_address = ''; $to_address = '';
...@@ -69,7 +72,7 @@ class PlatformCoinsController extends BaseController ...@@ -69,7 +72,7 @@ class PlatformCoinsController extends BaseController
return ['code' => -1, 'data' => null, 'msg' => '数据导入失败']; return ['code' => -1, 'data' => null, 'msg' => '数据导入失败'];
} }
if (41 == $platform_id && false == $is_exist) { if (false == $is_exist) {
$is_air_drop = CoinAirDropTransfer::find()->where(['to_address' => $to_address, 'origin' => CoinAirDropTransfer::ORIGIN_API, 'type' => CoinAirDropTransfer::TYPE_COINS])->one(); $is_air_drop = CoinAirDropTransfer::find()->where(['to_address' => $to_address, 'origin' => CoinAirDropTransfer::ORIGIN_API, 'type' => CoinAirDropTransfer::TYPE_COINS])->one();
if (false == $is_air_drop) { if (false == $is_air_drop) {
$model = new CoinAirDropTransfer(); $model = new CoinAirDropTransfer();
......
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