From 4d09418cfd125af5fe45acbcaa0d70a9949f8e23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=8D=8E=E6=B8=85?= <18691022700@163.com> Date: Tue, 19 Aug 2025 14:38:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A8=E6=80=81=E5=88=A0=E9=99=A4=20?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=AF=B9=E5=BA=94=E7=9A=84=E5=BC=95=E7=94=A8?= =?UTF-8?q?topic=20=E5=85=B3=E7=B3=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/model/UserZone.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/application/api/model/UserZone.php b/application/api/model/UserZone.php index 2372db6..3d85fe6 100644 --- a/application/api/model/UserZone.php +++ b/application/api/model/UserZone.php @@ -548,6 +548,12 @@ class UserZone extends Model $data['is_delete'] = 2; $data['delete_time'] = time(); $reslut = db::name('user_zone')->where('id', $zid)->update($data); + $top_zone = db::name('user_zone_topic')->where('zone_id',$zid)->select(); + if($top_zone){ + foreach ($top_zone as $v){ + db::name('user_zone_topic')->where('id',$v['id'])->delete(); + } + } if ($reslut) { return ['code' => 1, 'msg' => '删除成功', 'data' => null]; } else {