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();