From a64d7deb9c9bdf4770c25ed857976d0f149ce956 Mon Sep 17 00:00:00 2001 From: mzeros Date: Wed, 8 Jan 2025 19:53:18 +0800 Subject: [PATCH] =?UTF-8?q?feat(gateway):=20=E6=B7=BB=E5=8A=A0=E4=BA=A7?= =?UTF-8?q?=E5=93=81=E4=B8=8E=20ISP=20=E6=98=A0=E5=B0=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 Core.php 文件中增加了产品与 ISP 的映射逻辑 - 根据其他参数中的映射信息,动态修改输入产品值 - 此功能允许在特定情况下将产品映射到不同的 ISP --- app/gateway/controller/v4/Core.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/gateway/controller/v4/Core.php b/app/gateway/controller/v4/Core.php index 070fabd..cc56e11 100644 --- a/app/gateway/controller/v4/Core.php +++ b/app/gateway/controller/v4/Core.php @@ -248,7 +248,13 @@ class Core extends Controller $this->getMnp_isp($this->input['mobile']); if (isset($this->input['mnp_isp_array']) && isset($other_param['mnp_SPISP_' . $this->product . $pp_isp]) && str_contains($other_param['mnp_SPISP_' . $this->product . $pp_isp], $this->input['cash'])) { - $this->input['product'] = $this->product . $pp_isp; + + if(isset($other_param['mapping_'.$this->product . $pp_isp]) && $other_param['mapping_'.$this->product . $pp_isp]){ + $this->input['product'] = $other_param['mapping_'.$this->product . $pp_isp]; + }else{ + $this->input['product'] = $this->product; + } + } $this->product = $this->input['product'];