From 5589e8e69eb2faf7d97e823c63414d6c2a31c55d Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Tue, 22 Aug 2023 11:46:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=AE=A1=E6=A0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/community/Community.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/controller/api/community/Community.php b/app/controller/api/community/Community.php index 6da04f7d..b82e9e23 100644 --- a/app/controller/api/community/Community.php +++ b/app/controller/api/community/Community.php @@ -549,10 +549,7 @@ class Community extends BaseController app('json')->fail('请设置审核状态'); } if ($status == 1) { - $res = Db::name('community')->where('uid', $this->request->uid())->where('community_id', $id)->where('is_del', 0)->update(['status' => $status]); - if (!$res) { - return app('json')->fail('审核操作失败'); - } + Db::name('community')->where('uid', $this->request->uid())->where('community_id', $id)->where('is_del', 0)->update(['status' => $status, 'mer_status' => 1]); } if ($status == 2) { Db::startTrans(); @@ -563,7 +560,7 @@ class Community extends BaseController Db::name('store_product_attr_value')->where('product_id', $prod['product_id'])->where('unique', $prod['product_attr_unique'])->inc('stock', $prod['number'])->update(); } Db::name('resale')->where('community_id', $id)->where('status', 0)->update(['is_del' => 1]); - Db::name('community')->where('uid', $this->request->uid())->where('community_id', $id)->where('is_del', 0)->update(['is_del' => 1, 'status' => $status]); + Db::name('community')->where('uid', $this->request->uid())->where('community_id', $id)->where('is_del', 0)->update(['is_del' => 1, 'status' => $status, 'mer_status' => 2]); Db::commit(); } catch (\Exception $e) { Db::rollback();