Commit db6b650c authored by shajiaiming's avatar shajiaiming

修复已知问题

parent f3648d20
...@@ -192,7 +192,7 @@ class IssueCoinController extends BaseController ...@@ -192,7 +192,7 @@ class IssueCoinController extends BaseController
$params = [ $params = [
'pre_create_tx' => $pre_create_tx, 'pre_create_tx' => $pre_create_tx,
'pre_send_transaction' => $pre_send_transaction, 'pre_send_transaction' => $pre_send_transaction,
'pre_query_transaction' => 'standby', 'pre_query_transaction' => 'success',
'finish_tx' => 'standby', 'finish_tx' => 'standby',
'finish_send_transaction' => 'standby', 'finish_send_transaction' => 'standby',
'finish_query_transaction' => 'standby', 'finish_query_transaction' => 'standby',
......
...@@ -82,8 +82,8 @@ class IssueChainTransferController extends Controller ...@@ -82,8 +82,8 @@ class IssueChainTransferController extends Controller
} }
$txHex = $result['result']; $txHex = $result['result'];
$privkey = '72c3879f1f9b523f266a9545b69bd41c0251483a93e21e348e85118afe17a5e21'; #$privkey = '72c3879f1f9b523f266a9545b69bd41c0251483a93e21e348e85118afe17a5e21';
#$privkey = $val->coin->chain->private_key; $privkey = $val->coin->chain->private_key;
$expire = '1m'; $expire = '1m';
//执行1.2签名 //执行1.2签名
$signRawTx = $chain_service->signRawTx($privkey, $txHex, $expire); $signRawTx = $chain_service->signRawTx($privkey, $txHex, $expire);
...@@ -128,11 +128,11 @@ class IssueChainTransferController extends Controller ...@@ -128,11 +128,11 @@ class IssueChainTransferController extends Controller
public function actionQueryTransaction($step) public function actionQueryTransaction($step)
{ {
if (1 == $step) { if (1 == $step) {
$model = CoinIssueChainRecord::find()->where(['<>', 'pre_send_transaction', 'standby'])->all(); $model = CoinIssueChainRecord::find()->where(['pre_query_transaction' => 'standby'])->all();
} }
if (2 == $step) { if (2 == $step) {
$model = CoinIssueChainRecord::find()->where(['pre_send_transaction' => 'success'])->andWhere(['<>', 'finish_send_transaction', 'standby'])->all(); $model = CoinIssueChainRecord::find()->where(['pre_query_transaction' => 'success'])->andWhere(['<>', 'finish_send_transaction', 'standby'])->all();
} }
if (false == $model) { if (false == $model) {
...@@ -140,7 +140,7 @@ class IssueChainTransferController extends Controller ...@@ -140,7 +140,7 @@ class IssueChainTransferController extends Controller
return 0; return 0;
} }
$node = \Yii::$app->params['chain_parallel']['primary']; $node = Yii::$app->params['chain_nodes']['STO'];
$service = new Chain33Service($node); $service = new Chain33Service($node);
foreach ($model as $val) { foreach ($model as $val) {
if (1 == $step) { if (1 == $step) {
...@@ -167,7 +167,7 @@ class IssueChainTransferController extends Controller ...@@ -167,7 +167,7 @@ class IssueChainTransferController extends Controller
foreach ($result['result']['receipt']['logs'] as $log) { foreach ($result['result']['receipt']['logs'] as $log) {
if (isset($log['tyName']) && 'LogErr' == $log['tyName']) { if (isset($log['tyName']) && 'LogErr' == $log['tyName']) {
$data = [ $data = [
'finish_query_transaction' => $log['tyName'] 'finish_query_transaction' => $log['log']
]; ];
break; break;
} }
...@@ -192,7 +192,7 @@ class IssueChainTransferController extends Controller ...@@ -192,7 +192,7 @@ class IssueChainTransferController extends Controller
]); ]);
} }
//查询后,交易成功 //查询后,交易成功
if ($status = CoinIssueCoin::SUCCESS_ISSUE) { if ($status == CoinIssueCoin::SUCCESS_ISSUE) {
CoinIssueCoin::updateAll(['status' => $status, 'charge_pay' => CoinIssueCoin::SUCCESS_PAY], [ CoinIssueCoin::updateAll(['status' => $status, 'charge_pay' => CoinIssueCoin::SUCCESS_PAY], [
'id' => $val->coin->id, 'id' => $val->coin->id,
]); ]);
......
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