更新编辑转售商品接口

This commit is contained in:
yaooo 2023-08-18 10:44:32 +08:00
parent 879a69aa64
commit 1833a735f9

View File

@ -605,6 +605,8 @@ class Community extends BaseController
if (!$communityInfo) {
app('json')->fail('转售商品不存在');
}
$data = $this->checkParams();
$this->checkUserAuth();
Db::startTrans();
try {
$list = Db::name('resale')->where('community_id', $id)->where('is_del', 0)->where('status', 0)->select();
@ -619,9 +621,6 @@ class Community extends BaseController
Db::rollback();
return app('json')->fail('编辑转售商品失败');
}
$data = $this->checkParams();
$this->checkUserAuth();
$data['uid'] = $this->request->uid();
$res = $this->repository->create($data);
return app('json')->success(['community_id' => $res]);