重构项目2
parent
c61947614a
commit
d7fd3e9135
|
@ -0,0 +1,53 @@
|
|||
package com.muyu.etl.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 资产数据字典对象 AssetDataDict
|
||||
*
|
||||
* @author xiaohuang
|
||||
* on 2024/5/11
|
||||
*/
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
public class AssetDataDict extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
|
||||
/**
|
||||
* 数据接入id
|
||||
*/
|
||||
@Excel(name = "数据接入id")
|
||||
private Long basicId;
|
||||
|
||||
|
||||
/**
|
||||
* 字典名称
|
||||
*/
|
||||
@Excel(name = "字典名称")
|
||||
private String dictName;
|
||||
|
||||
|
||||
/**
|
||||
* 字典类型
|
||||
*/
|
||||
@Excel(name = "字典类型")
|
||||
private String dictType;
|
||||
}
|
|
@ -0,0 +1,66 @@
|
|||
package com.muyu.etl.domain;
|
||||
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 资产赋权对象 AssetImpower
|
||||
*
|
||||
* @author xiaohuang
|
||||
* on 2024/5/11
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@SuperBuilder
|
||||
public class AssetImpower extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID =1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
|
||||
/**
|
||||
* 表id
|
||||
*/
|
||||
@Excel(name = "表id")
|
||||
private Long tableId;
|
||||
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
@Excel(name = "部门id")
|
||||
private Long deptId;
|
||||
|
||||
|
||||
/**
|
||||
* 接入id
|
||||
*/
|
||||
@Excel(name = "接入id")
|
||||
private Long basicId;
|
||||
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@Excel(name = "用户id")
|
||||
private Long userId;
|
||||
|
||||
|
||||
public static AssetImpower saveAssetImpower(Long deptId, Long userId, AssetImpower assetImpower){
|
||||
return AssetImpower.builder()
|
||||
.basicId(assetImpower.getBasicId())
|
||||
.tableId(assetImpower.getTableId())
|
||||
.deptId(deptId)
|
||||
.userId(userId)
|
||||
.build();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.muyu.etl.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 字典详细内容对象 DictInfo
|
||||
*
|
||||
* @author xiaohuang
|
||||
* on 2024/5/11
|
||||
*/
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@SuperBuilder
|
||||
public class DictInfo extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
|
||||
/**
|
||||
* 接入id
|
||||
*/
|
||||
@Excel(name = "字典id")
|
||||
private Long dictId;
|
||||
|
||||
|
||||
/**
|
||||
* 字典名称
|
||||
*/
|
||||
@Excel(name = "字典名称")
|
||||
private String infoName;
|
||||
|
||||
|
||||
/**
|
||||
* 字典类型
|
||||
*/
|
||||
@Excel(name = "字典类型")
|
||||
private String infoValue;
|
||||
|
||||
|
||||
@JsonProperty("isEdit")
|
||||
private boolean isEdit;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
package com.muyu.etl.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 结构对象 Structure
|
||||
*
|
||||
* @author xiaohuang
|
||||
* on 2024/5/11
|
||||
*/
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
public class Structure extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 表id
|
||||
*/
|
||||
@Excel(name = "表id")
|
||||
private Long tableId;
|
||||
|
||||
|
||||
/**
|
||||
* 字段名称
|
||||
*/
|
||||
@Excel(name = "字段名称")
|
||||
private String columnName;
|
||||
|
||||
|
||||
/**
|
||||
* 字段注释
|
||||
*/
|
||||
@Excel(name = "字段注释")
|
||||
private String columnRemark;
|
||||
|
||||
|
||||
/**
|
||||
* 是否主键 'Y'是主键 'N'不是主键
|
||||
*/
|
||||
@Excel(name = "是否主键 'Y'是主键 'N'不是主键")
|
||||
private String isPrimary;
|
||||
|
||||
|
||||
/**
|
||||
* 数据类型
|
||||
*/
|
||||
@Excel(name = "数据类型")
|
||||
private String columnType;
|
||||
|
||||
|
||||
/**
|
||||
* 映射类型
|
||||
*/
|
||||
@Excel(name = "映射类型")
|
||||
private String javaType;
|
||||
|
||||
|
||||
/**
|
||||
* 字段长度
|
||||
*/
|
||||
@Excel(name = "字段长度")
|
||||
private String columnLength;
|
||||
|
||||
|
||||
/**
|
||||
* 小数位数
|
||||
*/
|
||||
@Excel(name = "小数位数")
|
||||
private String columnDecimals;
|
||||
|
||||
|
||||
/**
|
||||
* 是否为空 'Y' 是 'N'不是
|
||||
*/
|
||||
@Excel(name = "是否为空 '是' 'N'不是")
|
||||
private String isNull;
|
||||
|
||||
|
||||
/**
|
||||
* 默认值
|
||||
*/
|
||||
@Excel(name = "默认值")
|
||||
private String defaultValue;
|
||||
|
||||
|
||||
/**
|
||||
* 是否字典 'Y'是 'N'不是
|
||||
*/
|
||||
@Excel(name = "是否字典 'Y'是 'N'不是")
|
||||
private String isDictionary;
|
||||
|
||||
|
||||
/**
|
||||
* 映射字典
|
||||
*/
|
||||
@Excel(name = "映射字典")
|
||||
private String dictionaryTable;
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
package com.muyu.etl.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.common.core.web.domain.TreeEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 库表基础信息对象 TableInfo
|
||||
*
|
||||
* @author xiaohuang
|
||||
* on 2024/5/11
|
||||
*/
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@SuperBuilder
|
||||
public class TableInfo extends TreeEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
|
||||
/**
|
||||
* 表名称/数据库/
|
||||
*/
|
||||
@Excel(name = "表名称/数据库")
|
||||
private String tableName;
|
||||
|
||||
|
||||
/**
|
||||
* 表备注
|
||||
*/
|
||||
@Excel(name = "表备注")
|
||||
private String tableRemark;
|
||||
|
||||
|
||||
/**
|
||||
* 数据来源类型
|
||||
*/
|
||||
@Excel(name = "数据来源类型")
|
||||
private String type;
|
||||
|
||||
|
||||
/**
|
||||
* 数据量
|
||||
*/
|
||||
@Excel(name = "数据量")
|
||||
private Long dataNum;
|
||||
|
||||
|
||||
/**
|
||||
* 是否核心 'Y'是 'N'不是
|
||||
*/
|
||||
@Excel(name = "是否核心 'Y'是 'N'不是")
|
||||
private String center;
|
||||
|
||||
|
||||
private Long parentId;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
package com.muyu.etl.domain.req;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 资产赋权对象 AssetImpowerReq
|
||||
*
|
||||
* @author xiaohuang
|
||||
* on 2024/5/11
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@SuperBuilder
|
||||
public class AssetImpowerReq {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
|
||||
/**
|
||||
* 表id
|
||||
*/
|
||||
@Excel(name = "表id")
|
||||
private Long tableId;
|
||||
|
||||
|
||||
/**
|
||||
* 接入id
|
||||
*/
|
||||
@Excel(name = "接入id")
|
||||
private Long basicId;
|
||||
|
||||
|
||||
/**
|
||||
* 部门Id
|
||||
*/
|
||||
@Excel(name = "部门id")
|
||||
private Long doptId;
|
||||
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@Excel(name = "用户id")
|
||||
private Long userId;
|
||||
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
package com.muyu.etl.domain.resp;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 响应对象 BasicConfigResp
|
||||
*
|
||||
* @author xiaohuang
|
||||
* on 2024/5/11
|
||||
*/
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@SuperBuilder
|
||||
public class BasicConfigResp {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
|
||||
/**
|
||||
* 接入源名称
|
||||
*/
|
||||
private String dataResourceName;
|
||||
|
||||
|
||||
/**
|
||||
* 数据来源系统名称
|
||||
*/
|
||||
private String dataSourcesSystemName;
|
||||
|
||||
|
||||
/**
|
||||
* 主机ip地址
|
||||
*/
|
||||
private String host;
|
||||
|
||||
|
||||
/**
|
||||
* 端口
|
||||
*/
|
||||
private String port;
|
||||
|
||||
|
||||
/**
|
||||
* 数据接入类型
|
||||
*/
|
||||
private String databaseType;
|
||||
|
||||
|
||||
/**
|
||||
* 数据库名称
|
||||
*/
|
||||
private String databaseName;
|
||||
|
||||
|
||||
/**
|
||||
* 初始化连接数量
|
||||
*/
|
||||
private Long initLinkNum;
|
||||
|
||||
|
||||
/**
|
||||
* 最大连接数量
|
||||
*/
|
||||
private Long maxLinkNum;
|
||||
|
||||
|
||||
/**
|
||||
* 最大等待时间
|
||||
*/
|
||||
private Long maxWaitTime;
|
||||
|
||||
|
||||
/**
|
||||
* 最大等待次数
|
||||
*/
|
||||
private Long maxWaitTimes;
|
||||
|
||||
|
||||
/**
|
||||
* 拼接链接
|
||||
*/
|
||||
private String connectionParams;
|
||||
private String remark;
|
||||
private String createBy;
|
||||
private String updateBy;
|
||||
private Date createTime;
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
package com.muyu.etl.domain.resp;
|
||||
|
||||
import com.muyu.etl.domain.DictInfo;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 字典响应对象 BasicDictResp
|
||||
*
|
||||
* @author xiaohuang
|
||||
* on 2024/5/11
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
public class BasicDictResp {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 数据接入id
|
||||
*/
|
||||
private Long basicId;
|
||||
|
||||
|
||||
/**
|
||||
* 字典名称
|
||||
*/
|
||||
private String dictName;
|
||||
|
||||
|
||||
/**
|
||||
* 字典类型
|
||||
*/
|
||||
private String dictType;
|
||||
|
||||
|
||||
private List<DictInfo> dictInfoList;
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
package com.muyu.etl.domain.resp;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 接入--表基础信息(授权) BasicTableInfoResp
|
||||
*
|
||||
* @author xiaohuang
|
||||
* on 2024/5/11
|
||||
*/
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
public class BasicTableInfoResp {
|
||||
|
||||
/**
|
||||
* 表id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
|
||||
/**
|
||||
* 接入id
|
||||
*/
|
||||
private Long basicId;
|
||||
|
||||
|
||||
/**
|
||||
* 数据接入名
|
||||
*/
|
||||
private String dataResourceName;
|
||||
|
||||
|
||||
/**
|
||||
* 数据接入系统名
|
||||
*/
|
||||
private String dataSourcesSystemName;
|
||||
|
||||
|
||||
/**
|
||||
* 数据库名
|
||||
*/
|
||||
private String databaseName;
|
||||
|
||||
|
||||
/**
|
||||
* 表名(中文
|
||||
*/
|
||||
private String tableRemark;
|
||||
|
||||
|
||||
/**
|
||||
* 表名(英文
|
||||
*/
|
||||
private String tableName;
|
||||
|
||||
|
||||
/**
|
||||
* 数据条数
|
||||
*/
|
||||
private Long tatalNum;
|
||||
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
package com.muyu.etl.domain.resp;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.etl.domain.Structure;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 库表基础信息对象 TableInfoStructureResp
|
||||
*
|
||||
* @author xiaohuang
|
||||
* on 2024/5/11
|
||||
*/
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
@AllArgsConstructor
|
||||
public class TableInfoStructureResp {
|
||||
|
||||
public static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
private Long basicId;
|
||||
|
||||
|
||||
/**
|
||||
* 表名称/数据库
|
||||
*/
|
||||
@Excel(name = "表名称/数据库")
|
||||
private String tableName;
|
||||
|
||||
|
||||
/**
|
||||
* 表备注
|
||||
*/
|
||||
@Excel(name = "表备注")
|
||||
private String tableRemark;
|
||||
|
||||
private Long parentId;
|
||||
|
||||
|
||||
/**
|
||||
* 数据量
|
||||
*/
|
||||
@Excel(name = "数据量")
|
||||
private Long dataNum;
|
||||
|
||||
|
||||
/**
|
||||
* 是否核心'Y'是 'N'不是
|
||||
*/
|
||||
@Excel(name = "是否核心 'Y'是 'N'不是 ")
|
||||
private String center;
|
||||
|
||||
|
||||
private String databaseType;
|
||||
|
||||
private List<Structure> structureList;
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
package com.muyu.etl.domain.resp;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.muyu.etl.domain.BasicConfigInfo;
|
||||
import com.muyu.etl.domain.TableInfo;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 树级结构 TableTreeResp
|
||||
*
|
||||
* @author xiaohuang
|
||||
* on 2024/5/11
|
||||
*/
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
public class TableTreeResp {
|
||||
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
private Long Id;
|
||||
|
||||
|
||||
/**
|
||||
* 父级信息
|
||||
*/
|
||||
private TableInfo tableInfo;
|
||||
|
||||
|
||||
/**
|
||||
* 链接信息
|
||||
*/
|
||||
private BasicConfigInfo basicConfigInfo;
|
||||
|
||||
|
||||
/**
|
||||
* 子级信息
|
||||
*/
|
||||
private List<TableInfoStructureResp> Children;
|
||||
|
||||
}
|
|
@ -8,6 +8,7 @@ import com.muyu.common.log.annotation.Log;
|
|||
import com.muyu.common.log.enums.BusinessType;
|
||||
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||
import com.muyu.etl.domain.BasicConfigInfo;
|
||||
import com.muyu.etl.domain.resp.TableTreeResp;
|
||||
import com.muyu.etl.service.BasicConfigInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
@ -28,7 +29,7 @@ import java.util.List;
|
|||
public class BasicConfigInfoController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private BasicConfigInfoService service;
|
||||
private BasicConfigInfoService basicConfigInfoService;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -36,30 +37,22 @@ public class BasicConfigInfoController extends BaseController {
|
|||
*/
|
||||
@RequiresPermissions("etl:info:list")
|
||||
@GetMapping("/list")
|
||||
public Result<TableDataInfo<BasicConfigInfo>> list(BasicConfigInfo basicConfigInfo){
|
||||
startPage();;
|
||||
List<BasicConfigInfo> list = service.selectBasicConfigInfoList(basicConfigInfo);
|
||||
public Result<TableDataInfo<BasicConfigInfo>> list(BasicConfigInfo basicConfigInfo) {
|
||||
startPage();
|
||||
List<BasicConfigInfo> list = basicConfigInfoService.selectBasicConfigInfoList(basicConfigInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出基础信息列表
|
||||
*/
|
||||
@RequiresPermissions("etl:info:export")
|
||||
@Log(title = "基础信息",businessType = BusinessType.EXPORT)
|
||||
@Log(title = "基础信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
//数据接入到basicConfigInfo
|
||||
public void export(HttpServletResponse response,BasicConfigInfo basicConfigInfo){
|
||||
|
||||
//数据接入后查询列表
|
||||
List<BasicConfigInfo> list = service.selectBasicConfigInfoList(basicConfigInfo);
|
||||
|
||||
//new一个excelUtil 接入到basicConfigInfo
|
||||
public void export(HttpServletResponse response, BasicConfigInfo basicConfigInfo) {
|
||||
List<BasicConfigInfo> list = basicConfigInfoService.selectBasicConfigInfoList(basicConfigInfo);
|
||||
ExcelUtil<BasicConfigInfo> util = new ExcelUtil<>(BasicConfigInfo.class);
|
||||
|
||||
//可以导出到表单
|
||||
util.exportExcel(response,list,"基础信息数据");
|
||||
util.exportExcel(response, list, "基础信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -67,55 +60,60 @@ public class BasicConfigInfoController extends BaseController {
|
|||
*/
|
||||
@RequiresPermissions("etl:info:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
//响应信息主体
|
||||
public Result getInfo(@PathVariable("id") Long id){
|
||||
//返回成功消息
|
||||
return success(service.selectBasicConfigInfoById(id));
|
||||
public Result getInfo(@PathVariable("id") Long id) {
|
||||
return success(basicConfigInfoService.selectBasicConfigInfoById(id));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增基础信息
|
||||
*/
|
||||
@RequiresPermissions("etl:info:add")
|
||||
@Log(title = "基础信息",businessType = BusinessType.INSERT)
|
||||
@Log(title = "基础信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
//数据接入到basicConfigInfo
|
||||
public Result add(@RequestBody BasicConfigInfo configQueryReq){
|
||||
//响应返回结果
|
||||
return toAjax(service.insertBasicConfigInfo(configQueryReq));
|
||||
public Result add(@RequestBody BasicConfigInfo configQueryReq) {
|
||||
return toAjax(basicConfigInfoService.insertBasicConfigInfo(configQueryReq));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改基础信息
|
||||
*/
|
||||
@RequiresPermissions("etl:info:edit")
|
||||
@Log(title = "基础信息",businessType = BusinessType.UPDATE)
|
||||
@PostMapping
|
||||
//数据接入basicConfigInfo
|
||||
public Result edit(@RequestBody BasicConfigInfo configQueryReq){
|
||||
//响应返回结果
|
||||
return toAjax(service.updateBasicConfigInfo(configQueryReq));
|
||||
@Log(title = "基础信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public Result edit(@RequestBody BasicConfigInfo basicConfigInfo) {
|
||||
return toAjax(basicConfigInfoService.updateBasicConfigInfo(basicConfigInfo));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除基础信息
|
||||
*/
|
||||
@RequiresPermissions("etl:info:remove")
|
||||
@Log(title = "基础信息",businessType = BusinessType.DELETE)
|
||||
@Log(title = "基础信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public Result remove(@PathVariable Long[] ids){
|
||||
return toAjax(service.deleteBasicConfigInfoByIds(ids));
|
||||
public Result remove(@PathVariable Long[] ids) {
|
||||
return toAjax(basicConfigInfoService.deleteBasicConfigInfoByIds(ids));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 测试连接
|
||||
*/
|
||||
@RequiresPermissions("etl:info:test")
|
||||
@Log(title = "测试连接")
|
||||
@PostMapping("/connectionTest")
|
||||
public Result connectionTest(@RequestBody BasicConfigInfo basicConfigInfo) throws ServletException {
|
||||
return toAjax(service.connectionTest(basicConfigInfo));
|
||||
return toAjax(basicConfigInfoService.connectionTest(basicConfigInfo));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 树级结构数据
|
||||
*/
|
||||
@RequiresPermissions("etl:table:list")
|
||||
@Log(title = "获取已成功链接的树级结构")
|
||||
@GetMapping("/getTableTree")
|
||||
public Result<List<TableTreeResp>> getTableTree(){
|
||||
return Result.success(basicConfigInfoService.getTableTree());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.muyu.etl.service;
|
|||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.etl.domain.BasicConfigInfo;
|
||||
import com.muyu.etl.domain.resp.TableTreeResp;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.sql.rowset.serial.SerialException;
|
||||
|
@ -32,4 +33,5 @@ public interface BasicConfigInfoService extends IService<BasicConfigInfo> {
|
|||
|
||||
boolean connectionTest(BasicConfigInfo basicConfigInfo) throws ServletException;
|
||||
|
||||
List<TableTreeResp> getTableTree();
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.muyu.etl.service.impl;
|
|||
import com.baomidou.mybatisplus.core.metadata.TableInfo;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.etl.domain.BasicConfigInfo;
|
||||
import com.muyu.etl.domain.resp.TableTreeResp;
|
||||
import com.muyu.etl.mapper.BasicConfigInfoMapper;
|
||||
import com.muyu.etl.service.BasicConfigInfoService;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
|
@ -92,6 +93,7 @@ public class BasicConfigInfoServiceImpl extends ServiceImpl<BasicConfigInfoMappe
|
|||
//树级结构 库 表
|
||||
|
||||
|
||||
|
||||
} catch (SQLException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
@ -100,5 +102,11 @@ public class BasicConfigInfoServiceImpl extends ServiceImpl<BasicConfigInfoMappe
|
|||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TableTreeResp> getTableTree() {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue