更新审核
This commit is contained in:
parent
a35b04660e
commit
5589e8e69e
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user