UserOperateController.java 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. package com.qrservice.admin.controller.usermanager;
  2. import com.qrservice.admin.model.dto.sso.UserOperateLogDto;
  3. import com.qrservice.admin.model.manage.UserOperateLog;
  4. import com.qrservice.admin.model.vo.ResultVO;
  5. import com.qrservice.admin.service.UserOperateService;
  6. import lombok.extern.slf4j.Slf4j;
  7. import org.springframework.beans.factory.annotation.Autowired;
  8. import org.springframework.data.domain.Page;
  9. import org.springframework.data.domain.Pageable;
  10. import org.springframework.data.domain.Sort;
  11. import org.springframework.data.web.PageableDefault;
  12. import org.springframework.web.bind.annotation.CrossOrigin;
  13. import org.springframework.web.bind.annotation.RequestMapping;
  14. import org.springframework.web.bind.annotation.RequestMethod;
  15. import org.springframework.web.bind.annotation.RestController;
  16. import javax.servlet.http.HttpServletRequest;
  17. import java.text.ParseException;
  18. /**
  19. * @Company: AllPay
  20. * @Author: lei.chen
  21. * @Date: 2020/9/9 17:44
  22. */
  23. @RestController
  24. @RequestMapping("sso/user/log")
  25. @Slf4j
  26. @CrossOrigin
  27. public class UserOperateController {
  28. private final UserOperateService service;
  29. @Autowired
  30. public UserOperateController(UserOperateService service) {
  31. this.service = service;
  32. }
  33. /**
  34. * 查询机构用户操作日志
  35. * @return
  36. */
  37. @RequestMapping(value = "find",method = RequestMethod.GET)
  38. public ResultVO findUserOperateLog(@PageableDefault( sort = { "createTime" }, direction = Sort.Direction.DESC) Pageable pageable,
  39. UserOperateLogDto dto,
  40. HttpServletRequest request) throws ParseException {
  41. Page<UserOperateLog> page = service.findUserOperateLog(pageable,dto,request);
  42. ResultVO vo = new ResultVO();
  43. vo.setData(page);
  44. return vo;
  45. }
  46. }