更新编辑转售商品接口
This commit is contained in:
parent
1833a735f9
commit
6462c0b186
@ -515,7 +515,7 @@ class Community extends BaseController
|
||||
{
|
||||
$communityInfo = Db::name('community')->where('uid', $this->request->uid())->where('community_id', $id)->where('is_del', 0)->find();
|
||||
if (!$communityInfo) {
|
||||
app('json')->fail('转售商品不存在');
|
||||
return app('json')->fail('转售商品不存在');
|
||||
}
|
||||
Db::startTrans();
|
||||
try {
|
||||
@ -542,7 +542,7 @@ class Community extends BaseController
|
||||
{
|
||||
$communityInfo = Db::name('community')->where('uid', $this->request->uid())->where('community_id', $id)->where('is_del', 0)->find();
|
||||
if (!$communityInfo) {
|
||||
app('json')->fail('转售商品不存在');
|
||||
return app('json')->fail('转售商品不存在');
|
||||
}
|
||||
$status = $this->request->param('status');
|
||||
if (!$status) {
|
||||
@ -570,7 +570,7 @@ class Community extends BaseController
|
||||
return app('json')->fail('审核商品折扣价失败');
|
||||
}
|
||||
}
|
||||
return app('json')->fail('审核操作成功');
|
||||
return app('json')->success('审核操作成功');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -581,7 +581,7 @@ class Community extends BaseController
|
||||
{
|
||||
$communityInfo = Db::name('community')->where('uid', $this->request->uid())->where('community_id', $id)->where('is_del', 0)->find();
|
||||
if (!$communityInfo) {
|
||||
app('json')->fail('转售商品不存在');
|
||||
return app('json')->fail('转售商品不存在');
|
||||
}
|
||||
if (!empty($communityInfo['image'])) {
|
||||
$communityInfo['image'] = explode(',', $communityInfo['image']);
|
||||
@ -592,7 +592,7 @@ class Community extends BaseController
|
||||
$resaleList[$k]['detail'] = json_decode($v['detail'], true);
|
||||
}
|
||||
$communityInfo['resale'] = $resaleList;
|
||||
return app('json')->fail($communityInfo);
|
||||
return app('json')->success($communityInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -603,7 +603,7 @@ class Community extends BaseController
|
||||
{
|
||||
$communityInfo = Db::name('community')->where('uid', $this->request->uid())->where('community_id', $id)->where('is_del', 0)->find();
|
||||
if (!$communityInfo) {
|
||||
app('json')->fail('转售商品不存在');
|
||||
return app('json')->fail('转售商品不存在');
|
||||
}
|
||||
$data = $this->checkParams();
|
||||
$this->checkUserAuth();
|
||||
|
Loading…
x
Reference in New Issue
Block a user