1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- <?php
- namespace app\adminapi\controller\shop\admin;
- use app\dict\shop\ShopApplyDict;
- use app\service\admin\shop\admin\ShopApplyService;
- use core\base\BaseAdminController;
- use think\Response;
- class ShopApply extends BaseAdminController
- {
- /**
- * 获取店铺申请列表
- * @return \think\Response
- */
- public function pages()
- {
- $data = $this->request->params([
- ['status', ''],
- ['create_time', [] ],
- ['category_id', ''],
- ['group_id', ''],
- ['keywords', ''],
- ]);
- return success(( new ShopApplyService() )->getPage($data));
- }
- /**
- * 店铺申请详情
- * @param int $id
- * @return \think\Response
- */
- public function info(int $id)
- {
- return success(( new ShopApplyService() )->getInfo($id));
- }
- /**
- * 店铺申请审核
- * @param int $id 店铺申请id
- * @return \think\Response
- */
- public function verify($id)
- {
- $data = $this->request->params([
- ['status', ''],
- ['refuse_reason', '']
- ]);
- $this->validate($data, 'app\validate\shop\ShopApply.verify');
- ( new ShopApplyService() )->verify($id, $data);
- return success('AUDIT_SUCCESS');
- }
- /**
- * 店铺申请删除
- * @param int $id 店铺申请id
- * @return Response
- */
- public function del(int $id)
- {
- ( new ShopApplyService() )->del($id);
- return success('DELETE_SUCCESS');
- }
- /**
- * 店铺申请状态
- * @return \think\Response
- */
- public function getStatusList()
- {
- return success(ShopApplyDict::getStatus());
- }
- }
|