diff --git a/app/controller/admin/community/Community.php b/app/controller/admin/community/Community.php index 7d0419ac..ac8bfb87 100644 --- a/app/controller/admin/community/Community.php +++ b/app/controller/admin/community/Community.php @@ -53,6 +53,20 @@ class Community extends BaseController 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 * @return mixed @@ -113,7 +127,6 @@ class Community extends BaseController return app('json')->fail('请填写下架原因'); if (!$this->repository->exists($id)) return app('json')->fail('数据不存在'); - $this->repository->setStatus($id,$data); return app('json')->success('操作成功'); } diff --git a/route/admin/product.php b/route/admin/product.php index 6c64907b..d52ab1c8 100644 --- a/route/admin/product.php +++ b/route/admin/product.php @@ -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(AdminTokenMiddleware::class, true) ->middleware(AdminAuthMiddleware::class)