Users.php 791 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /*
  3. * @Descripttion:
  4. * @version:
  5. * @Author: likang
  6. * @Date: 2022-06-09 13:50:20
  7. * @LastEditors: sueRimn
  8. * @LastEditTime: 2022-06-09 14:33:46
  9. */
  10. namespace catchAdmin\api\controller;
  11. use catchAdmin\permissions\controller\User;
  12. use catchAdmin\permissions\model\Roles;
  13. use catchAdmin\permissions\model\Users as ModelUsers;
  14. use catcher\base\CatchRequest as Request;
  15. use catcher\CatchResponse;
  16. use catcher\base\CatchController;
  17. use think\Db;
  18. class Users extends CatchController
  19. {
  20. /**
  21. * 获取所有用户信息
  22. */
  23. public function getAllUsers()
  24. {
  25. $users_id = Roles::getUserIdByRoleIdentify('operator');
  26. $ids = implode(',',$users_id);
  27. $users = ModelUsers::where('id',$ids)->field("username,password")->select();
  28. }
  29. }