feat(gateway): 添加产品与 ISP 映射功能

- 在 Core.php 文件中增加了产品与 ISP 的映射逻辑
- 根据其他参数中的映射信息,动态修改输入产品值
- 此功能允许在特定情况下将产品映射到不同的 ISP
This commit is contained in:
mzeros 2025-01-08 19:53:18 +08:00
parent 25439b988e
commit a64d7deb9c

View File

@ -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'];