Commit b7896582 authored by shajiaiming's avatar shajiaiming

fix

parent 0a0cf7dc
...@@ -66,15 +66,17 @@ class CrossChainController extends Controller ...@@ -66,15 +66,17 @@ class CrossChainController extends Controller
$redis->hdel(CoinCrossChain::CROSS_CHAIN_TRANSFERING, $val['address'] . ':' . $val['is_with_draw'] . ':' . $val['id']); $redis->hdel(CoinCrossChain::CROSS_CHAIN_TRANSFERING, $val['address'] . ':' . $val['is_with_draw'] . ':' . $val['id']);
} }
if (0 != $result['code'] && (true == strstr($result['msg'], 'Balance'))) { if (0 == $result['code']) {
$send_result = $result['result'];
$currentModel = CoinCrossChain::findOne($val['id']); $currentModel = CoinCrossChain::findOne($val['id']);
$currentModel->msg = $result['msg']; $currentModel->send_result = $send_result;
$currentModel->msg = 0;
$currentModel->save(); $currentModel->save();
$redis->hdel(CoinCrossChain::CROSS_CHAIN_TRANSFERING, $val['address'] . ':' . $val['is_with_draw'] . ':' . $val['id']); $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 { } else {
$currentModel = CoinCrossChain::findOne($val['id']);
$currentModel->msg = $result['msg'];
$currentModel->save();
} }
}); });
} }
...@@ -124,7 +126,6 @@ class CrossChainController extends Controller ...@@ -124,7 +126,6 @@ class CrossChainController extends Controller
#$result = $service->QueryTransaction($send_result); #$result = $service->QueryTransaction($send_result);
$switch = true; $switch = true;
$result = $this->queryTransaction($node_params, $send_result); $result = $this->queryTransaction($node_params, $send_result);
echo json_encode($result);exit;
if (isset($result['result']['actionName']) && 'unknown' == $result['result']['actionName']) { if (isset($result['result']['actionName']) && 'unknown' == $result['result']['actionName']) {
$redis->hdel(CoinCrossChain::CROSS_CHAIN_CACHE_FAIL, $val['address'] . ':' . $val['is_with_draw']); $redis->hdel(CoinCrossChain::CROSS_CHAIN_CACHE_FAIL, $val['address'] . ':' . $val['is_with_draw']);
$query_result = 'success'; $query_result = 'success';
......
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