新增转售管理模块
This commit is contained in:
parent
1bbe212c77
commit
07ff8ff146
@ -53,6 +53,20 @@ class Community extends BaseController
|
|||||||
return app('json')->success($this->repository->getList($where, $page, $limit));
|
return app('json')->success($this->repository->getList($where, $page, $limit));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return mixed
|
||||||
|
* @author Qinii
|
||||||
|
*/
|
||||||
|
public function resale()
|
||||||
|
{
|
||||||
|
$where = $this->request->params(['keyword','status','username','category_id','topic_id','is_show','is_type']);
|
||||||
|
$where['is_type'] = '3';
|
||||||
|
$where['order'] = 'start';
|
||||||
|
$where['is_del'] = 0;
|
||||||
|
[$page, $limit] = $this->getPage();
|
||||||
|
return app('json')->success($this->repository->getList($where, $page, $limit));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $id
|
* @param $id
|
||||||
* @return mixed
|
* @return mixed
|
||||||
@ -113,7 +127,6 @@ class Community extends BaseController
|
|||||||
return app('json')->fail('请填写下架原因');
|
return app('json')->fail('请填写下架原因');
|
||||||
if (!$this->repository->exists($id))
|
if (!$this->repository->exists($id))
|
||||||
return app('json')->fail('数据不存在');
|
return app('json')->fail('数据不存在');
|
||||||
|
|
||||||
$this->repository->setStatus($id,$data);
|
$this->repository->setStatus($id,$data);
|
||||||
return app('json')->success('操作成功');
|
return app('json')->success('操作成功');
|
||||||
}
|
}
|
||||||
|
@ -417,6 +417,22 @@ Route::group(function () {
|
|||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
//转售管理
|
||||||
|
Route::group('product/resale', function () {
|
||||||
|
Route::get('lst', '/resale')->name('systemProductCommunityLst')->option([
|
||||||
|
'_alias' => '转售列表',
|
||||||
|
]);
|
||||||
|
Route::get('detail/:id', '/detail')->name('systemProductCommunityDetail')->option([
|
||||||
|
'_alias' => '转售详情',
|
||||||
|
]);
|
||||||
|
Route::post('show/:id', '/switchShow')->name('systemProductCommunityShow')->option([
|
||||||
|
'_alias' => '显示状态',
|
||||||
|
]);
|
||||||
|
})->prefix('admin.community.Community')->option([
|
||||||
|
'_path' => '/product/resale',
|
||||||
|
'_auth' => true,
|
||||||
|
]);
|
||||||
|
|
||||||
})->middleware(AllowOriginMiddleware::class)
|
})->middleware(AllowOriginMiddleware::class)
|
||||||
->middleware(AdminTokenMiddleware::class, true)
|
->middleware(AdminTokenMiddleware::class, true)
|
||||||
->middleware(AdminAuthMiddleware::class)
|
->middleware(AdminAuthMiddleware::class)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user