|
|
@@ -4,6 +4,7 @@
|
|
|
namespace App\Servers;
|
|
|
|
|
|
use App\Models\Broadcast;
|
|
|
+use App\Models\ContractDistribution;
|
|
|
use App\Servers\Icon\BanRPC;
|
|
|
use App\Servers\Icon\Utils;
|
|
|
use Web3p\EthereumTx\Transaction;
|
|
|
@@ -78,7 +79,7 @@ class BroadcastServer
|
|
|
*/
|
|
|
public function getBroadcast()
|
|
|
{
|
|
|
- $list = Broadcast::where('status', '2')->select(['id', 'm_id', 'from', 'to', 'send_money', 'value', 'coin_id', 'type', 'sign', 'money', 'from_key', 'coin_id', 'hash', 'send_money', 'order_id'])->limit(100)->get();
|
|
|
+ $list = Broadcast::where('status', '2')->select(['id', 'm_id', 'from', 'to', 'value', 'coin_id', 'type', 'sign', 'money', 'from_key', 'coin_id', 'hash', 'order_id'])->limit(100)->get();
|
|
|
$ret_type=false;
|
|
|
if (empty($list)) return $ret_type;
|
|
|
$bnbServer=BanRPC::creatServer();
|
|
|
@@ -89,14 +90,16 @@ class BroadcastServer
|
|
|
continue;
|
|
|
} else {
|
|
|
//交易已完成 返回数据格式数据 ,将数据json保存
|
|
|
+ $distribution=ContractDistribution::where('id',$value->{'order_id'})->where('type',$value->{'type'})->first();
|
|
|
if ($receipt['status'] != '0x1') {
|
|
|
$update_info['error'] = '广播提交失败';
|
|
|
$update_info['status'] = 3;
|
|
|
+ $distribution->update(['status' => 2]);
|
|
|
} else {
|
|
|
$update_info['status'] = 4;
|
|
|
$update_info['end_time'] = time();
|
|
|
+ $distribution->update(['status' => 3]);
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
return $list->count();
|