UserSearchController.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. namespace app\api\controller\v2\user;
  12. use app\services\user\UserSearchServices;
  13. use think\Request;
  14. /**
  15. * Class UserInvoiceController
  16. * @package app\api\controller\v2\user
  17. */
  18. class UserSearchController
  19. {
  20. /**
  21. * @var UserSearchServices
  22. */
  23. protected $services;
  24. /**
  25. * UserSearchController constructor.
  26. * @param UserSearchServices $services
  27. */
  28. public function __construct(UserSearchServices $services)
  29. {
  30. $this->services = $services;
  31. }
  32. public function getUserSeachList(Request $request)
  33. {
  34. return app('json')->success($this->services->getUserList((int)$request->uid()));
  35. }
  36. public function cleanUserSearch(Request $request)
  37. {
  38. $uid = (int)$request->uid();
  39. $this->services->update(['uid' => $uid], ['is_del' => 1]);
  40. return app('json')->success(100002);
  41. }
  42. }