Commit 95985853 authored by shajiaiming's avatar shajiaiming

调整

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