Commit 0e931346 authored by shajiaiming's avatar shajiaiming

fix

parent 8d96197e
...@@ -67,27 +67,17 @@ class CoinTransferController extends BaseController ...@@ -67,27 +67,17 @@ class CoinTransferController extends BaseController
public function actionBatchTransfer() public function actionBatchTransfer()
{ {
$model = CoinTransfer::find()->where(['hash' => '-----------------'])->limit(30)->all(); $model = CoinTransfer::find()->where(['status' => 0])->limit(30)->all();
foreach ($model as $val){ foreach ($model as $val){
echo $val->address."<br/>";
$id = $val->id; $id = $val->id;
$to = $val->address; $to = $val->address;
#$amount = str_replace(" TSC", "", $val->amount) * 1e8;
$amount = $val->amount * 1e8; $amount = $val->amount * 1e8;
$fee = 100000; $fee = 100000;
$note = ''; $note = '';
$execer = 'user.p.tschain.coins'; $execer = 'user.p.tschain.coins';
// $isExist = CoinTransfer::find()->where(['address' => $val->address, 'status' => 1])->one(); $isExist = CoinTransfer::find()->where(['address' => $val->address, 'status' => 1])->one();
// if($isExist){ if($isExist) continue;
// $updateModel = CoinTransfer::findOne($val->id);
// $updateModel->hash = '-----------------';
// $updateModel->status = 1;
// $updateModel->save();
// continue;
// }
$service = new Chain33Service(); $service = new Chain33Service();
$createRawTransaction = $service->createRawTransaction($to, $amount, $fee, $note, $execer); $createRawTransaction = $service->createRawTransaction($to, $amount, $fee, $note, $execer);
......
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