Commit 95985853 authored by shajiaiming's avatar shajiaiming

调整

parent 8a887e6f
......@@ -65,16 +65,20 @@ class TradeController extends BaseController
return ['code' => 1, 'data' => [], 'msg' => '交易hash值不能为空'];
}
$model = CoinHashMemo::find()->where(['hash' => $hash])->asArray()->one();
if (empty($model)) {
return ['code' => 1, 'data' => ['memo' => '', 'coins_fee' => ''], 'msg' => '记录不存在'];
}
if (empty($version)) {
if (empty($model)) {
return ['code' => 1, 'data' => '', 'msg' => '记录不存在'];
}
return ['code' => 0, 'data' => $model['memo']];
} else {
if (empty($model)) {
return ['code' => 1, 'data' => ['memo' => '', 'coins_fee' => ''], 'msg' => '记录不存在'];
}
return ['code' => 0, 'data' => [
'memo' => $model['memo'],
'coins_fee' => $model['coins_fee']
]];
}
return ['code' => 0, 'data' => [
'memo' => $model['memo'],
'coins_fee' => $model['coins_fee']
]];
}
public function actionSyncToDb()
......
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