2022-08-28 00:02:00 +08:00
|
|
|
package net.maku.system.controller;
|
|
|
|
|
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
|
import lombok.AllArgsConstructor;
|
|
|
|
import net.maku.framework.common.page.PageResult;
|
|
|
|
import net.maku.framework.common.utils.Result;
|
|
|
|
import net.maku.system.query.SysLogLoginQuery;
|
|
|
|
import net.maku.system.service.SysLogLoginService;
|
|
|
|
import net.maku.system.vo.SysLogLoginVO;
|
2023-01-15 20:08:11 +08:00
|
|
|
import org.springdoc.api.annotations.ParameterObject;
|
2022-08-28 00:02:00 +08:00
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
import javax.validation.Valid;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 登录日志
|
|
|
|
*
|
|
|
|
* @author 阿沐 babamu@126.com
|
|
|
|
*/
|
|
|
|
@RestController
|
|
|
|
@RequestMapping("sys/log/login")
|
|
|
|
@Tag(name = "登录日志")
|
|
|
|
@AllArgsConstructor
|
|
|
|
public class SysLogLoginController {
|
|
|
|
private final SysLogLoginService sysLogLoginService;
|
|
|
|
|
|
|
|
@GetMapping("page")
|
|
|
|
@Operation(summary = "分页")
|
|
|
|
@PreAuthorize("hasAuthority('sys:log:login')")
|
2023-01-15 20:08:11 +08:00
|
|
|
public Result<PageResult<SysLogLoginVO>> page(@ParameterObject @Valid SysLogLoginQuery query) {
|
2022-08-28 00:02:00 +08:00
|
|
|
PageResult<SysLogLoginVO> page = sysLogLoginService.page(query);
|
|
|
|
|
|
|
|
return Result.ok(page);
|
|
|
|
}
|
2022-11-03 16:38:26 +08:00
|
|
|
|
|
|
|
@GetMapping("export")
|
|
|
|
@Operation(summary = "导出excel")
|
2022-11-06 22:11:33 +08:00
|
|
|
@PreAuthorize("hasAuthority('sys:log:login')")
|
2022-11-09 17:19:39 +08:00
|
|
|
public void export() {
|
|
|
|
sysLogLoginService.export();
|
2022-11-03 16:38:26 +08:00
|
|
|
}
|
|
|
|
|
2022-08-28 00:02:00 +08:00
|
|
|
}
|