Action.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. namespace app\api\controller\v1;
  3. use app\api\controller\Base;
  4. use app\hander\HelpHander;
  5. use think\Db;
  6. class Action extends Base
  7. {
  8. // 列表
  9. public function list(){
  10. $ret = model('Action')->lists();
  11. HelpHander::success($ret);
  12. }
  13. // 列表
  14. public function selectActionLog(){
  15. $page = input('page/d',1);
  16. $size = input('size/d',10);
  17. $name = input('name','','trim');
  18. $code = input('code','','trim');
  19. $startTime = input('startTime','','trim');
  20. $endTime = input('endTime','','trim');
  21. $actionId = input('actionId/d',0);
  22. $ret = model('Action')->selectActionLog($page,$size,$name,$code,$actionId,$startTime,$endTime);
  23. HelpHander::success($ret);
  24. }
  25. // 导出接口列表
  26. public function selectOperationLog(){
  27. $name = input('name','','trim');
  28. $code = input('code','','trim');
  29. $startTime = input('startTime','','trim');
  30. $endTime = input('endTime','','trim');
  31. $actionId = input('actionId/d',0);
  32. $ret = model('Action')->selectOperationLog($name,$code,$actionId,$startTime,$endTime);
  33. HelpHander::success($ret);
  34. }
  35. // 日志详情
  36. public function logInfo(){
  37. $id = input('id/d',0);
  38. $ret = model('Action')->logInfo($id);
  39. HelpHander::success($ret);
  40. }
  41. }