From 7f4f2396c192e323eb82d37a7a5db658b3e0bb43 Mon Sep 17 00:00:00 2001 From: lcc <805383944@qq.com> Date: Tue, 9 Sep 2025 17:55:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=BE=91=E4=BA=A7?= =?UTF-8?q?=E5=93=81=E6=8E=A8=E5=B9=BF=E8=8C=83=E5=9B=B4bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/models/agent/Auto_product_city_model.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/models/agent/Auto_product_city_model.php b/common/models/agent/Auto_product_city_model.php index e1951042..d4b70385 100644 --- a/common/models/agent/Auto_product_city_model.php +++ b/common/models/agent/Auto_product_city_model.php @@ -22,9 +22,15 @@ class Auto_product_city_model extends HD_Model $cityIds = []; foreach ($citys as $item) { $cityIds[] = $item[1]; + $replace_batch[] = [ + 'productId' => $productId, + 'provinceId' => $item[0], + 'cityId' => $item[1], + ]; } $cityIdString = implode(',', $cityIds); $cityIdString && $this->delete(['productId' => $productId, "cityId not in ($cityIdString)" => null]); + is_array($replace_batch) && $this->replace_batch($replace_batch); } else { $this->delete(['productId' => $productId]); }