ScheduleJobLogController.java 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /**
  2. * Copyright (c) 2016-2019 人人开源 All rights reserved.
  3. *
  4. * https://www.renren.io
  5. *
  6. * 版权所有,侵权必究!
  7. */
  8. package io.renren.modules.job.controller;
  9. import io.renren.common.utils.PageUtils;
  10. import io.renren.common.utils.R;
  11. import io.renren.modules.job.entity.ScheduleJobLogEntity;
  12. import io.renren.modules.job.service.ScheduleJobLogService;
  13. import org.apache.shiro.authz.annotation.RequiresPermissions;
  14. import org.springframework.beans.factory.annotation.Autowired;
  15. import org.springframework.web.bind.annotation.PathVariable;
  16. import org.springframework.web.bind.annotation.RequestMapping;
  17. import org.springframework.web.bind.annotation.RequestParam;
  18. import org.springframework.web.bind.annotation.RestController;
  19. import java.util.Map;
  20. /**
  21. * 定时任务日志
  22. *
  23. * @author Mark sunlightcs@gmail.com
  24. */
  25. @RestController
  26. @RequestMapping("/sys/scheduleLog")
  27. public class ScheduleJobLogController {
  28. @Autowired
  29. private ScheduleJobLogService scheduleJobLogService;
  30. /**
  31. * 定时任务日志列表
  32. */
  33. @RequestMapping("/list")
  34. @RequiresPermissions("sys:schedule:log")
  35. public R list(@RequestParam Map<String, Object> params){
  36. PageUtils page = scheduleJobLogService.queryPage(params);
  37. return R.ok().put("page", page);
  38. }
  39. /**
  40. * 定时任务日志信息
  41. */
  42. @RequestMapping("/info/{logId}")
  43. public R info(@PathVariable("logId") Long logId){
  44. ScheduleJobLogEntity log = scheduleJobLogService.getById(logId);
  45. return R.ok().put("log", log);
  46. }
  47. }