SysLogController.java 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /**
  2. * Copyright 2018 人人开源 http://www.renren.io
  3. * <p>
  4. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  5. * use this file except in compliance with the License. You may obtain a copy of
  6. * the License at
  7. * <p>
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. * <p>
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  12. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  13. * License for the specific language governing permissions and limitations under
  14. * the License.
  15. */
  16. package io.renren.modules.sys.controller;
  17. import io.renren.common.utils.PageUtils;
  18. import io.renren.common.utils.R;
  19. import io.renren.modules.sys.service.SysLogService;
  20. import org.apache.shiro.authz.annotation.RequiresPermissions;
  21. import org.springframework.beans.factory.annotation.Autowired;
  22. import org.springframework.stereotype.Controller;
  23. import org.springframework.web.bind.annotation.GetMapping;
  24. import org.springframework.web.bind.annotation.RequestMapping;
  25. import org.springframework.web.bind.annotation.RequestParam;
  26. import org.springframework.web.bind.annotation.ResponseBody;
  27. import java.util.Map;
  28. /**
  29. * 系统日志
  30. *
  31. * @author chenshun
  32. * @email sunlightcs@gmail.com
  33. * @date 2017-03-08 10:40:56
  34. */
  35. @Controller
  36. @RequestMapping("/sys/log")
  37. public class SysLogController {
  38. @Autowired
  39. private SysLogService sysLogService;
  40. /**
  41. * 列表
  42. */
  43. @ResponseBody
  44. @GetMapping("/list")
  45. @RequiresPermissions("sys:log:list")
  46. public R list(@RequestParam Map<String, Object> params){
  47. PageUtils page = sysLogService.queryPage(params);
  48. return R.ok().put("page", page);
  49. }
  50. }