SysLogController.java 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. package com.nb.log.controller;
  2. import cn.dev33.satoken.annotation.SaCheckPermission;
  3. import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  4. import com.nb.log.service.ISysLogService;
  5. import com.nb.log.service.dto.SysLogQueryDTO;
  6. import com.nb.core.annotation.Log;
  7. import com.nb.core.result.R;
  8. import io.swagger.annotations.Api;
  9. import org.springframework.web.bind.annotation.GetMapping;
  10. import org.springframework.web.bind.annotation.RequestMapping;
  11. import org.springframework.web.bind.annotation.RequestParam;
  12. import org.springframework.web.bind.annotation.RestController;
  13. import javax.annotation.Resource;
  14. /**
  15. * <p>
  16. * 操作日志表 前端控制器
  17. * </p>
  18. *
  19. * @author Kevin
  20. * @since 2021-07-12
  21. */
  22. @RestController
  23. @Api(tags = "操作日志")
  24. @RequestMapping("/system/sysLog")
  25. public class SysLogController {
  26. @Resource
  27. private ISysLogService sysLogService;
  28. /**
  29. * 分页查询
  30. */
  31. @GetMapping("/page")
  32. @SaCheckPermission("system:sysLog:page")
  33. @Log(title = "操作日志分页查询")
  34. public R page(Page reqPage, SysLogQueryDTO req) {
  35. return R.success(sysLogService.page(reqPage, req));
  36. }
  37. /**
  38. * 查看
  39. */
  40. @GetMapping("/view")
  41. @SaCheckPermission("system:sysLog:view")
  42. @Log(title = "操作日志查看")
  43. public R view(@RequestParam String id) {
  44. return R.success(sysLogService.view(id));
  45. }
  46. }