package com.qrservice.admin.controller.usermanager; import com.qrservice.admin.model.dto.sso.UserOperateLogDto; import com.qrservice.admin.model.manage.UserOperateLog; import com.qrservice.admin.model.vo.ResultVO; import com.qrservice.admin.service.UserOperateService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Sort; import org.springframework.data.web.PageableDefault; import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletRequest; import java.text.ParseException; /** * @Company: AllPay * @Author: lei.chen * @Date: 2020/9/9 17:44 */ @RestController @RequestMapping("sso/user/log") @Slf4j @CrossOrigin public class UserOperateController { private final UserOperateService service; @Autowired public UserOperateController(UserOperateService service) { this.service = service; } /** * 查询机构用户操作日志 * @return */ @RequestMapping(value = "find",method = RequestMethod.GET) public ResultVO findUserOperateLog(@PageableDefault( sort = { "createTime" }, direction = Sort.Direction.DESC) Pageable pageable, UserOperateLogDto dto, HttpServletRequest request) throws ParseException { Page page = service.findUserOperateLog(pageable,dto,request); ResultVO vo = new ResultVO(); vo.setData(page); return vo; } }