|
@@ -30,7 +30,7 @@ class RefillSender
|
|
|
$res = Swoole\Coroutine::stats();
|
|
|
$num = $res['coroutine_num'];
|
|
|
|
|
|
- if($num > 1000) {
|
|
|
+ if($num > 2000) {
|
|
|
sleep(1);
|
|
|
continue;
|
|
|
}
|
|
@@ -44,10 +44,14 @@ class RefillSender
|
|
|
|
|
|
private function push_order($mchid,$time,$index)
|
|
|
{
|
|
|
+ $pid = getmypid();
|
|
|
+ $cid = Swoole\Coroutine::getCid();
|
|
|
+ $order_sn = "{$pid}{$cid}{$time}" . sprintf("%'010d",$index);
|
|
|
+
|
|
|
$notify_url = "https://test.xyzshops.cn/mobile/callback/bridge_test.php";
|
|
|
$params = [ 'mchid' => $mchid,
|
|
|
'amount' => 30,
|
|
|
- 'order_sn' => "{$time}" . sprintf("%'010d",$index),
|
|
|
+ 'order_sn' => $order_sn,
|
|
|
'cardno' => '13911129867',
|
|
|
"act" => "refill",
|
|
|
"op" => "add",
|