|
@@ -9,12 +9,13 @@ use StatesHelper;
|
|
|
|
|
|
class policy extends ProviderManager implements IPolicy
|
|
|
{
|
|
|
- const normal_times = 3;
|
|
|
- const normle_time_out = 900;
|
|
|
+ const normal_times = 15;
|
|
|
+ const normal_time_out = 900;
|
|
|
+ const normal_req_secs = 60;
|
|
|
|
|
|
const high_times = 3;
|
|
|
const high_time_out = 60;
|
|
|
-
|
|
|
+
|
|
|
protected $mChannelControl;
|
|
|
protected $mMchctl;
|
|
|
public function __construct()
|
|
@@ -58,8 +59,6 @@ class policy extends ProviderManager implements IPolicy
|
|
|
}
|
|
|
|
|
|
return [$result,$overload];
|
|
|
-// $this->sort_price($providers,$spec,$card_type,$quality);
|
|
|
-// return [$providers,false];
|
|
|
}
|
|
|
|
|
|
//按价格从低到高排序
|
|
@@ -120,7 +119,7 @@ class policy extends ProviderManager implements IPolicy
|
|
|
return $checker($refill_info, $order_info,$time_out,$quality);
|
|
|
}
|
|
|
else {
|
|
|
- return $checker($refill_info, $order_info,policy::normle_time_out,1);
|
|
|
+ return $checker($refill_info, $order_info,policy::normal_time_out,1);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -138,7 +137,7 @@ class policy extends ProviderManager implements IPolicy
|
|
|
}
|
|
|
}
|
|
|
elseif($quality == 1) {
|
|
|
- return $commit_times < policy::normal_times && time() - $order_time < policy::normle_time_out;
|
|
|
+ return $commit_times < policy::normal_times && time() - $order_time < policy::normal_time_out;
|
|
|
}
|
|
|
else {
|
|
|
return $commit_times < policy::high_times && time() - $order_time < policy::high_time_out;
|