SystemOperLogLogic.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | saiadmin [ saiadmin快速开发框架 ]
  4. // +----------------------------------------------------------------------
  5. // | Author: sai <1430792918@qq.com>
  6. // +----------------------------------------------------------------------
  7. namespace plugin\saiadmin\app\logic\system;
  8. use plugin\saiadmin\app\model\system\SystemOperLog;
  9. use plugin\saiadmin\basic\think\BaseLogic;
  10. use plugin\saiadmin\utils\Helper;
  11. /**
  12. * 操作日志逻辑层
  13. */
  14. class SystemOperLogLogic extends BaseLogic
  15. {
  16. /**
  17. * 构造函数
  18. */
  19. public function __construct()
  20. {
  21. $this->model = new SystemOperLog();
  22. }
  23. /**
  24. * 获取自己的操作日志
  25. * @param mixed $where
  26. * @return array
  27. */
  28. public function getOwnOperLogList($where): array
  29. {
  30. $query = $this->search($where);
  31. $query->field('id, username, method, router, service_name, ip, ip_location, create_time');
  32. return $this->getList($query);
  33. }
  34. }