UserController.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | LARAVEL8.0 框架 [ LARAVEL ][ RXThinkCMF ]
  4. // +----------------------------------------------------------------------
  5. // | 版权所有 2017~2021 LARAVEL研发中心
  6. // +----------------------------------------------------------------------
  7. // | 官方网站: http://www.laravel.cn
  8. // +----------------------------------------------------------------------
  9. // | Author: laravel开发员 <laravel.qq.com>
  10. // +----------------------------------------------------------------------
  11. namespace App\Http\Controllers\Admin;
  12. use App\Services\Common\UserService;
  13. /**
  14. * 用户管理-控制器
  15. * @author laravel开发员
  16. * @package App\Http\Controllers
  17. */
  18. class UserController extends Backend
  19. {
  20. /**
  21. * 构造函数
  22. * @author laravel开发员
  23. * @since 2020/11/11
  24. * UserController constructor.
  25. */
  26. public function __construct()
  27. {
  28. parent::__construct();
  29. $this->service = new UserService();
  30. }
  31. /**
  32. * 承兑商
  33. * @return array
  34. */
  35. public function business()
  36. {
  37. $pageSize = request()->get('limit', 15);
  38. $list = $this->service->getDataList(request()->all(), $pageSize);
  39. $message = array(
  40. "msg" => '操作成功',
  41. "code" => 0,
  42. "data" => isset($list['list'])? $list['list']:[],
  43. "count" => isset($list['total'])? $list['total']:0,
  44. );
  45. return $message;
  46. }
  47. /**
  48. * 重置密码
  49. * @return mixed
  50. * @since 2020/11/11
  51. * @author laravel开发员
  52. */
  53. public function resetPwd()
  54. {
  55. $result = $this->service->resetPwd();
  56. return $result;
  57. }
  58. public function updateGoogle()
  59. {
  60. $result = $this->service->updateGoogle($this->userId);
  61. return $result;
  62. }
  63. }