管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2022-12-16 b5f561f79d59f876f8d3266d49928b47d7b1ec66
1
已修改2个文件
90 ■■■■ 文件已修改
src/main/java/com/lf/server/controller/all/BaseQueryController.java 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/lf/server/controller/data/DataQueryController.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/lf/server/controller/all/BaseQueryController.java
@@ -24,6 +24,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
@@ -37,27 +38,6 @@
    @Autowired
    BaseQueryService baseQueryService;
    @SysLog()
    @ApiOperation(value = "查询文件")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "tabName", value = "表名", dataType = "String", paramType = "query", example = "lf.sys_style"),
            @ApiImplicitParam(name = "eventid", value = "主键", dataType = "String", paramType = "query", example = "fa25979a5ef8b43ba82a0be35b3fb0d4")
    })
    @GetMapping(value = "/selectFiles")
    public ResponseMsg<List<AttachEntity>> selectFiles(String tabName, String eventid) {
        try {
            if (StringHelper.isEmpty(tabName) || StringHelper.isEmpty(eventid)) {
                return fail("参数不能为空", null);
            }
            List<AttachEntity> list = attachService.selectByTab(tabName, eventid);
            return success(list);
        } catch (Exception ex) {
            return fail(ex.getMessage(), null);
        }
    }
    @SysLog()
    @ApiOperation(value = "查询记录数")
@@ -283,4 +263,45 @@
            return fail(ex.getMessage(), null);
        }
    }
}
    @SysLog()
    @ApiOperation(value = "查询文件")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "tabName", value = "表名", dataType = "String", paramType = "query", example = "lf.sys_style"),
            @ApiImplicitParam(name = "eventid", value = "主键", dataType = "String", paramType = "query", example = "fa25979a5ef8b43ba82a0be35b3fb0d4")
    })
    @GetMapping(value = "/selectFiles")
    public ResponseMsg<List<AttachEntity>> selectFiles(String tabName, String eventid) {
        try {
            if (StringHelper.isEmpty(tabName) || StringHelper.isEmpty(eventid)) {
                return fail("参数不能为空", null);
            }
            List<AttachEntity> list = attachService.selectByTab(tabName, eventid);
            return success(list);
        } catch (Exception ex) {
            return fail(ex.getMessage(), null);
        }
    }
    @SysLog()
    @ApiOperation(value = "删除文件")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "ids", value = "ID数组", dataType = "Integer", paramType = "query", example = "1,2")
    })
    @GetMapping(value = "/deletes")
    public ResponseMsg<Integer> deleteFiles(@RequestParam List<Integer> ids) {
        try {
            if (ids == null || ids.isEmpty()) {
                return fail("id数组不能为空", -1);
            }
            int rows = attachService.deletes(ids);
            return success(rows);
        } catch (Exception ex) {
            return fail(ex.getMessage(), 0);
        }
    }
}
src/main/java/com/lf/server/controller/data/DataQueryController.java
@@ -6,7 +6,6 @@
import com.lf.server.entity.sys.UserEntity;
import com.lf.server.helper.StringHelper;
import com.lf.server.service.data.DataQueryService;
import com.lf.server.service.sys.AttachService;
import com.lf.server.service.sys.TokenService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
@@ -17,7 +16,6 @@
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/**
 * 数据检索
@@ -31,30 +29,7 @@
    TokenService tokenService;
    @Autowired
    AttachService attachService;
    @Autowired
    DataQueryService dataQueryService;
    @SysLog()
    @ApiOperation(value = "删除文件")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "ids", value = "ID数组", dataType = "Integer", paramType = "query", example = "1,2")
    })
    @GetMapping(value = "/deletes")
    public ResponseMsg<Integer> deleteFiles(@RequestParam List<Integer> ids) {
        try {
            if (ids == null || ids.isEmpty()) {
                return fail("id数组不能为空", -1);
            }
            int rows = attachService.deletes(ids);
            return success(rows);
        } catch (Exception ex) {
            return fail(ex.getMessage(), 0);
        }
    }
    @SysLog()
    @ApiOperation(value = "上传文件")