select(); foreach ($rows as $row) { $this->values[$row['name']] = $row['value']; } } catch (\Exception $e) { $this->values = []; } } public function get($name, $default = '') { return array_key_exists($name, $this->values) ? $this->values[$name] : $default; } public function all() { return $this->values; } public function getOrderDetailPath() { $path = trim($this->get('order_detail_path', WxOrderPathService::defaultPath())); if ($path === '') { $path = WxOrderPathService::defaultPath(); } return $path; } public function getMaxRetry() { $v = intval($this->get('max_retry', 5)); return $v > 0 ? $v : 5; } public function getRetryInterval() { $v = intval($this->get('retry_interval', 300)); return $v > 0 ? $v : 300; } /** * upload_shipping_info 是否一律按「用户自提」(logistics_type=4),与商城 dispatch_type 无关 */ public function shippingForceSelfPickup() { return $this->get('shipping_force_self_pickup', '1') === '1'; } }