SuperDao.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?php
  2. namespace app\api\dao\super;
  3. use app\api\actions\ZskkCache;
  4. use app\api\dao\ZskkDefaultDao;
  5. use app\api\model\institution\InstitutionModel;
  6. use think\facade\Log;
  7. use app\api\utils\UUIDUtils;
  8. /**
  9. * 后台控制器基类
  10. * 接口方法权限 必传参数 接口返回 错误抛出 通用参数处理
  11. */
  12. class SuperDao extends ZskkDefaultDao {
  13. protected $flag = true;
  14. protected $logName = "SuperDao";
  15. protected $institution = null;
  16. public function __construct(InstitutionModel $institutionModel)
  17. {
  18. parent::__construct();
  19. $this->institution = $institutionModel;
  20. }
  21. public function getUser($token)
  22. {
  23. $user = $this->getCache($token);
  24. if(!$user){
  25. $this->throwError('登陆信息失效,请重新进行登陆','0099');
  26. }
  27. return $user;
  28. }
  29. public function getRemoteIns($id)
  30. {
  31. $data = $this->institution->getRemoteIns($id);
  32. return $data;
  33. }
  34. public function getSpecialIns()
  35. {
  36. $data = $this->institution->getSpecialIns();
  37. return $data;
  38. }
  39. public function getPayType($local,$super)
  40. {
  41. $type = $this->institution->getPayType($local,$super);
  42. return $type;
  43. }
  44. public function getInstitutionInfo($id,$field)
  45. {
  46. $info = $this->institution->getInfo($id,$field);
  47. return $info;
  48. }
  49. public function getSpecialDoctor($id)
  50. {
  51. $info = $this->institution->getSpecialDoctor($id);
  52. return $info;
  53. }
  54. public function getDoctor($id,$class,$remote)
  55. {
  56. $info = $this->institution->getDoctor($id,$class,$remote);
  57. return $info;
  58. }
  59. }