Commit 95b872d0 authored by rlgy's avatar rlgy

提币交易信息任务队列

parent ed72c0af
......@@ -66,8 +66,8 @@ class QueryTransJob extends BaseObject implements JobInterface
//转账失败
$coin_release_list->status = 2;
$coin_release_check->status = 3;
$trans = CoinReleaseCheck::getDb()->beginTransaction();
try {
$trans = CoinReleaseCheck::getDb()->beginTransaction();
if ($coin_release_check->save() && $coin_release_list->save()) {
//退换资产
$coin_release_member = CoinReleaseMember::findOne($coin_release_list->mid);
......@@ -83,14 +83,14 @@ class QueryTransJob extends BaseObject implements JobInterface
$trans->rollBack();
} catch (\Exception $exception) {
Yii::$app->queue->delay(15)->push($this);
return 0;
}
return 0;
} elseif ($result == 2) {
//转账成功
$coin_release_list->status = 1;
$coin_release_check->status = 4;
$trans = CoinReleaseCheck::getDb()->beginTransaction();
try {
$trans = CoinReleaseCheck::getDb()->beginTransaction();
if ($coin_release_check->save() && $coin_release_list->save()) {
$trans->commit();
return 0;
......@@ -98,12 +98,12 @@ class QueryTransJob extends BaseObject implements JobInterface
$trans->rollBack();
} catch (\Exception $exception) {
Yii::$app->queue->delay(15)->push($this);
return 0;
}
}
} else {
Yii::$app->queue->delay(15)->push($this);
}
}
Yii::$app->queue->delay(15)->push($this);
return 0;
}
}
\ No newline at end of file
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