|  |  |  | 
|---|
|  |  |  | package com.doumee.api.cloud; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.doumee.api.BaseController; | 
|---|
|  |  |  | import com.doumee.config.annotation.CloudRequiredPermission; | 
|---|
|  |  |  | import com.doumee.core.annotation.excel.ExcelExporter; | 
|---|
|  |  |  | import com.doumee.core.model.ApiResponse; | 
|---|
|  |  |  | import com.doumee.core.model.PageData; | 
|---|
|  |  |  | import com.doumee.core.model.PageWrap; | 
|---|
|  |  |  | import com.doumee.core.utils.Constants; | 
|---|
|  |  |  | import com.doumee.dao.system.dto.QuerySystemLoginLogDTO; | 
|---|
|  |  |  | import com.doumee.dao.system.model.SystemLoginLog; | 
|---|
|  |  |  | import com.doumee.service.system.SystemLoginLogService; | 
|---|
|  |  |  | import io.swagger.annotations.Api; | 
|---|
|  |  |  | import io.swagger.annotations.ApiOperation; | 
|---|
|  |  |  | import org.apache.shiro.authz.annotation.RequiresPermissions; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.PostMapping; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.RequestBody; | 
|---|
|  |  |  | 
|---|
|  |  |  | * @date 2023/03/21 14:49 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @RestController | 
|---|
|  |  |  | @RequestMapping("/cloudService/system/loginLog") | 
|---|
|  |  |  | @RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/system/loginLog") | 
|---|
|  |  |  | @Api(tags = "登录日志") | 
|---|
|  |  |  | public class SystemLoginLogCloudController extends BaseController { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PostMapping("/page") | 
|---|
|  |  |  | @ApiOperation("分页查询") | 
|---|
|  |  |  | @RequiresPermissions("system:loginLog:query") | 
|---|
|  |  |  | @CloudRequiredPermission("system:loginLog:query") | 
|---|
|  |  |  | public ApiResponse<PageData<SystemLoginLog>> findPage (@RequestBody PageWrap<QuerySystemLoginLogDTO> pageWrap) { | 
|---|
|  |  |  | return ApiResponse.success(systemLoginLogService.findPage(pageWrap)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PostMapping("/exportExcel") | 
|---|
|  |  |  | @ApiOperation("导出Excel") | 
|---|
|  |  |  | @RequiresPermissions("system:loginLog:query") | 
|---|
|  |  |  | @CloudRequiredPermission("system:loginLog:query") | 
|---|
|  |  |  | public void export (@RequestBody PageWrap<QuerySystemLoginLogDTO> pageWrap, HttpServletResponse response) { | 
|---|
|  |  |  | ExcelExporter.build(SystemLoginLog.class).export(systemLoginLogService.findPage(pageWrap).getRecords(), "登录日志", response); | 
|---|
|  |  |  | } | 
|---|