JobsController.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <?php
  2. namespace App\Http\Controllers\Admin;
  3. use App\Services\Common\JobsService;
  4. /**
  5. * 招聘信息控制器
  6. */
  7. class JobsController extends Backend
  8. {
  9. public function __construct()
  10. {
  11. parent::__construct();
  12. $this->service = new JobsService();
  13. }
  14. /**
  15. * 列表
  16. */
  17. public function index()
  18. {
  19. $params = request()->all();
  20. $pageSize = isset($params['limit']) ? intval($params['limit']) : PERPAGE;
  21. return $this->service->getDataList($params, $pageSize, $this->storeId);
  22. }
  23. /**
  24. * 添加
  25. */
  26. public function add()
  27. {
  28. return $this->service->add($this->storeId);
  29. }
  30. /**
  31. * 编辑
  32. */
  33. public function edit()
  34. {
  35. return $this->service->edit([], $this->storeId);
  36. }
  37. /**
  38. * 审核
  39. */
  40. public function confirm()
  41. {
  42. return $this->service->confirm();
  43. }
  44. /**
  45. * 删除
  46. */
  47. public function delete()
  48. {
  49. return $this->service->delete($this->storeId);
  50. }
  51. /**
  52. * 修改状态
  53. */
  54. public function status()
  55. {
  56. return $this->service->status();
  57. }
  58. /**
  59. * 获取详情
  60. */
  61. public function info()
  62. {
  63. $id = request()->get('id');
  64. return $this->service->getInfo($id, $this->storeId);
  65. }
  66. }