13693261870
7 天以前 73e913fb24bf163ab9c5332ab960b1eb56a6402b
se-system/src/main/java/com/terra/system/controller/sys/ReportController.java
@@ -1,17 +1,18 @@
package com.terra.system.controller.sys;
import com.terra.system.annotation.SysLog;
import com.terra.system.controller.all.BaseController;
import com.terra.system.entity.all.ResponseMsg;
import com.terra.common.controller.all.BaseController;
import com.terra.common.entity.all.ResponseMsg;
import com.terra.system.entity.sys.ReportEntity;
import com.terra.system.entity.sys.UserEntity;
import com.terra.system.service.all.UploadAttachService;
import com.terra.system.service.sys.ReportService;
import com.terra.system.service.sys.TokenService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.bind.annotation.*;
@@ -24,7 +25,7 @@
 * 报告模板
 * @author WWW
 */
@Api(tags = "运维管理\\模板管理")
@Tag(name = "运维管理\\模板管理")
@RestController
@RequestMapping("/report")
public class ReportController extends BaseController {
@@ -40,11 +41,11 @@
    private final static String TAB_NAME = "lf.sys_report";
    @SysLog()
    @ApiOperation(value = "分页查询并返回记录数")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "name", value = "名称", dataType = "String", paramType = "query", example = ""),
            @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "Integer", paramType = "query", example = "10"),
            @ApiImplicitParam(name = "pageIndex", value = "分页数(从1开始)", dataType = "Integer", paramType = "query", example = "1")
    @Operation(summary = "分页查询并返回记录数")
    @Parameters({
            @Parameter(name = "name", description = "名称", in = ParameterIn.QUERY, example = ""),
            @Parameter(name = "pageSize", description = "每页条数", in = ParameterIn.QUERY, example = "10"),
            @Parameter(name = "pageIndex", description = "分页数(从1开始)", in = ParameterIn.QUERY, example = "1")
    })
    @GetMapping(value = "/selectByPageAndCount")
    public ResponseMsg<List<ReportEntity>> selectByPageAndCount(String name, Integer pageSize, Integer pageIndex) {
@@ -67,9 +68,9 @@
    }
    @SysLog()
    @ApiOperation(value = "根据ID查询")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "ID", dataType = "int", paramType = "query", example = "1")
    @Operation(summary = "根据ID查询")
    @Parameters({
            @Parameter(name = "id", description = "ID", in = ParameterIn.QUERY, example = "1")
    })
    @GetMapping(value = "/selectById")
    public ResponseMsg<ReportEntity> selectById(int id) {
@@ -83,9 +84,9 @@
    }
    @SysLog()
    @ApiOperation(value = "插入一条")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "entity", value = "实体类", dataType = "ReportEntity", paramType = "body")
    @Operation(summary = "插入一条")
    @Parameters({
            @Parameter(name = "entity", description = "实体类")
    })
    @PostMapping(value = "/insert", produces = "application/json; charset=UTF-8")
    public ResponseMsg<Integer> insert(@RequestBody ReportEntity entity, HttpServletRequest req) {
@@ -104,9 +105,9 @@
    }
    @SysLog()
    @ApiOperation(value = "删除一条")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "ID", dataType = "Integer", paramType = "query", example = "1")
    @Operation(summary = "删除一条")
    @Parameters({
            @Parameter(name = "id", description = "ID", in = ParameterIn.QUERY, example = "1")
    })
    @GetMapping(value = "/delete")
    public ResponseMsg<Integer> delete(int id) {
@@ -120,9 +121,9 @@
    }
    @SysLog()
    @ApiOperation(value = "删除多条")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "ids", value = "ID数组", dataType = "Integer", paramType = "query", example = "1,2")
    @Operation(summary = "删除多条")
    @Parameters({
            @Parameter(name = "ids", description = "ID数组", in = ParameterIn.QUERY, example = "1,2")
    })
    @GetMapping(value = "/deletes")
    public ResponseMsg<Integer> deletes(@RequestParam List<Integer> ids) {
@@ -140,9 +141,9 @@
    }
    @SysLog()
    @ApiOperation(value = "更新一条")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "entity", value = "实体类", dataType = "ReportEntity", paramType = "body")
    @Operation(summary = "更新一条")
    @Parameters({
            @Parameter(name = "entity", description = "实体类")
    })
    @ResponseBody
    @PostMapping(value = "/update", produces = "application/json; charset=UTF-8")
@@ -162,7 +163,7 @@
    }
    @SysLog()
    @ApiOperation(value = "上传文件")
    @Operation(summary = "上传文件")
    @ResponseBody
    @PostMapping(value = "/upload")
    public ResponseMsg<String> upload(@RequestParam("file") MultipartFile file, HttpServletRequest req) {
@@ -172,9 +173,9 @@
    }
    @SysLog()
    @ApiOperation(value = "下载文件")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "guid", value = "附件Guid", dataType = "String", paramType = "body")
    @Operation(summary = "下载文件")
    @Parameters({
            @Parameter(name = "guid", description = "附件Guid")
    })
    @GetMapping(value = "/download")
    public void download(String guid, HttpServletResponse res) {