Commit b4a5d991 authored by shajiaiming's avatar shajiaiming

Merge branch 'master' into feature/ws_ticker

parents f58371d8 5a9c02a0
......@@ -17,7 +17,7 @@ class CrossChainController extends Controller
public function actionAutoTransfer($step, $is_with_draw)
{
$redis = Yii::$app->redis;
$model = CoinCrossChain::find()->where(['send_result' => "0", 'step' => (int)$step, 'is_with_draw' => (int)$is_with_draw])->asArray()->all();
$model = CoinCrossChain::find()->where(['send_result' => "0", 'step' => (int)$step, 'is_with_draw' => (int)$is_with_draw, 'query_result' => '0'])->asArray()->all();
if (empty($model)) {
echo date('Y-m-d H:i:s') . ' STEP: ' . $step . '暂无跨链交易计划' . PHP_EOL;
return 0;
......@@ -66,8 +66,15 @@ class CrossChainController extends Controller
$redis->hdel(CoinCrossChain::CROSS_CHAIN_TRANSFERING, $val['address'] . ':' . $val['is_with_draw'] . ':' . $val['id']);
}
if (0 != $result['code'] && (false == strstr($result['msg'], 'ErrDupTx'))) {
if (0 != $result['code'] && (true == strstr($result['msg'], 'Balance'))) {
$currentModel = CoinCrossChain::findOne($val['id']);
$currentModel->msg = $result['msg'];
$currentModel->save();
$redis->hdel(CoinCrossChain::CROSS_CHAIN_TRANSFERING, $val['address'] . ':' . $val['is_with_draw'] . ':' . $val['id']);
} else if (0 != $result['code'] && (false == strstr($result['msg'], 'ErrDupTx'))) {
$redis->hdel(CoinCrossChain::CROSS_CHAIN_TRANSFERING, $val['address'] . ':' . $val['is_with_draw'] . ':' . $val['id']);
} else {
}
});
}
......
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