|
@@ -10,7 +10,8 @@ include(BASE_CONFIG_PATH . CONFIG_PREFIX . '/refill.ini.php');
|
|
|
require_once(BASE_HELPER_PATH . '/stat_helper.php');
|
|
|
require_once(BASE_ROOT_PATH . '/helper/refill/functional.php');
|
|
|
require_once(BASE_HELPER_PATH . '/task/task_helper.php');
|
|
|
-use refill\Quality;
|
|
|
+require_once(BASE_HELPER_PATH . '/refill/functional.php');
|
|
|
+
|
|
|
use refill\quality_ploy;
|
|
|
|
|
|
class merchantControl extends SystemControl
|
|
@@ -1222,7 +1223,7 @@ class merchantControl extends SystemControl
|
|
|
$night_timeout += $retry_times_cfg['qualities'][$quality]['night_secs'];
|
|
|
}
|
|
|
|
|
|
- if ($this->is_day()) {
|
|
|
+ if (refill\functional::isDay()) {
|
|
|
$time_out = $day_timeout;
|
|
|
} else {
|
|
|
$time_out = $night_timeout;
|
|
@@ -1234,16 +1235,6 @@ class merchantControl extends SystemControl
|
|
|
$model_merchant->editMerchant($update, ['mchid' => $mchid]);
|
|
|
}
|
|
|
|
|
|
- private function is_day(): bool
|
|
|
- {
|
|
|
- $hour = date("H");
|
|
|
- if ($hour >= 23 || $hour <= 7) {
|
|
|
- return false;
|
|
|
- } else {
|
|
|
- return true;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
private function merchant_intercept($merchant)
|
|
|
{
|
|
|
$intercept_cfg = $merchant['intercept_cfg'];
|