更新转售商品查询条件
This commit is contained in:
parent
45fb87ffa9
commit
84d6c47f66
@ -609,7 +609,7 @@ class Community extends BaseController
|
|||||||
*/
|
*/
|
||||||
public function editResale($id)
|
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) {
|
if (!$communityInfo) {
|
||||||
return app('json')->fail('转售商品不存在');
|
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('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('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();
|
Db::commit();
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
Db::rollback();
|
Db::rollback();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user