diff --git a/app/service/OptimizeService.php b/app/service/OptimizeService.php index 41a8678..2e51510 100644 --- a/app/service/OptimizeService.php +++ b/app/service/OptimizeService.php @@ -146,17 +146,19 @@ class OptimizeService if (empty($iplist)) { continue; } + $record_num = $row['recordnum']; $get_ips = array_column($iplist, 'ip'); if ($drow['type'] == 'huawei') { sort($get_ips); + $get_ips = array_slice($get_ips, 0, $row['recordnum']); $get_ips = [implode(',', $get_ips)]; - $row['recordnum'] = 1; + $record_num = 1; } if ($row['type'] == 1 && $line == 'CT') { $line = 'DEF'; } $line_name = DnsHelper::$line_name[$drow['type']][$line]; - $this->process_dns_line($dns, $row, $domainRecords['list'], $get_ips, $line_name, $ip_type); + $this->process_dns_line($dns, $row, $domainRecords['list'], $record_num, $get_ips, $line_name, $ip_type); } } @@ -164,9 +166,8 @@ class OptimizeService } //处理单个线路的解析记录 - private function process_dns_line($dns, $row, $record_list, $get_ips, $line_name, $ip_type) + private function process_dns_line($dns, $row, $record_list, $record_num, $get_ips, $line_name, $ip_type) { - $record_num = $row['recordnum']; $records = array_filter($record_list, function ($v) use ($line_name) { return $v['Line'] == $line_name; }); diff --git a/config/app.php b/config/app.php index 353e919..20821cf 100644 --- a/config/app.php +++ b/config/app.php @@ -31,7 +31,7 @@ return [ 'show_error_msg' => true, 'exception_tmpl' => \think\facade\App::getAppPath() . 'view/exception.tpl', - 'version' => '1028', + 'version' => '1029', 'dbversion' => '1023' ];