12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- package com.bizmatics.controller.web;
- import com.bizmatics.common.core.bean.ApiResult;
- import com.bizmatics.common.core.bean.CommonPage;
- import com.bizmatics.model.vo.SysLoginLogVo;
- import com.bizmatics.service.SysLoginLogService;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.GetMapping;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RequestParam;
- import org.springframework.web.bind.annotation.RestController;
- /**
- * 统计管理-用户登录记录
- *
- * @author ya
- * @since 2022-06-02
- */
- @RestController
- @RequestMapping("/sysLoginLog")
- public class SysLoginLogController {
- @Autowired
- private SysLoginLogService sysLoginLogService;
- /**
- * 统计管理-用户登录记录-列表查询
- *
- * @param ipaddr 登录地址
- * @param userName 账号
- * @param nickName 用户名称
- * @param status 登录状态(0成功 1失败)
- * @param startTime 开始时间 2021-01-01 15:15:15
- * @param endTime 结束时间 2021-01-01 15:15:15
- * @param page 当前页
- * @param size 条数
- * @return
- */
- @GetMapping("/getLoginLogList")
- public ApiResult<CommonPage<SysLoginLogVo>> getLoginLogList(@RequestParam(value = "ipaddr", required = false) String ipaddr,
- @RequestParam(value = "userName", required = false) String userName,
- @RequestParam(value = "nickName", required = false) String nickName,
- @RequestParam(value = "status", required = false, defaultValue = "2") Integer status,
- @RequestParam(value = "startTime", required = false) String startTime,
- @RequestParam(value = "endTime", required = false) String endTime,
- @RequestParam(value = "page", required = false, defaultValue = "1") Integer page,
- @RequestParam(value = "size", required = false, defaultValue = "10") Integer size) {
- return ApiResult.success(sysLoginLogService.getLoginLogList(ipaddr, userName, nickName, status, startTime, endTime, page, size));
- }
- }
|