diff --git a/app/controller/api/community/Community.php b/app/controller/api/community/Community.php index 0cf57516..a554723c 100644 --- a/app/controller/api/community/Community.php +++ b/app/controller/api/community/Community.php @@ -609,7 +609,7 @@ class Community extends BaseController */ public function editResale($id) { - $communityInfo = Db::name('community')->where('uid', $this->request->uid())->where('community_id', $id)->whereIn('status', '0,-1')->where('is_del', 0)->find(); + $communityInfo = Db::name('community')->where('uid', $this->request->uid())->where('community_id', $id)->where('is_del', 0)->find(); if (!$communityInfo) { return app('json')->fail('转售商品不存在'); } @@ -623,7 +623,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)->update(['is_del' => 1]); + Db::name('community')->where('uid', $this->request->uid())->where('community_id', $id)->update(['is_del' => 1, 'status' => -1]); Db::commit(); } catch (\Exception $e) { Db::rollback();