管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2022-12-21 38ef4366ad819bb3a7fc604e6c51a95193d59b00
src/main/java/com/lf/server/controller/show/DataLibController.java
@@ -15,14 +15,12 @@
import com.lf.server.entity.data.MetaEntity;
import com.lf.server.entity.data.MetaFileEntity;
import com.lf.server.entity.sys.UserEntity;
import com.lf.server.helper.ClassHelper;
import com.lf.server.helper.Md5Helper;
import com.lf.server.helper.StringHelper;
import com.lf.server.helper.WebHelper;
import com.lf.server.helper.*;
import com.lf.server.mapper.all.BasicMapper;
import com.lf.server.service.all.BaseQueryService;
import com.lf.server.service.data.DownloadService;
import com.lf.server.service.data.MetaService;
import com.lf.server.service.show.DataLibService;
import com.lf.server.service.sys.TokenService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
@@ -51,6 +49,9 @@
    @Autowired
    TokenService tokenService;
    @Autowired
    DataLibService dataLibService;
    @Autowired
    DownloadService downloadService;
@@ -130,31 +131,9 @@
    }
    @SysLog()
    @ApiOperation(value = "查询字段信息")
    @ApiOperation(value = "请求元数据下载")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "ns", value = "名称空间", dataType = "String", paramType = "query", example = "bd"),
            @ApiImplicitParam(name = "tab", value = "表名", dataType = "String", paramType = "query", example = "dlg25wAanp")
    })
    @GetMapping(value = "/selectTabFields")
    public ResponseMsg<List<DictEntity>> selectTabFields(String ns, String tab) {
        try {
            if (StringHelper.isEmpty(ns) || StringHelper.isEmpty(tab)) {
                return fail("名称空间和表名不能为空", null);
            }
            List<DictEntity> list = baseQueryService.selectFields(ns, tab);
            return success(list);
        } catch (Exception ex) {
            return fail(ex.getMessage(), null);
        }
    }
    @SysLog()
    @ApiOperation(value = "请求下载")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pwd", value = "密码", dataType = "String", paramType = "body", example = ""),
            @ApiImplicitParam(name = "ids", value = "ID数组", dataType = "Integer", paramType = "body", example = "1,2")
            @ApiImplicitParam(name = "reqEntity", value = "请求下载实体", dataType = "DownloadReqEntity", paramType = "body")
    })
    @ResponseBody
    @PostMapping(value = "/downloadReq")