feat(AssetStructureServiceImpl):新增资产数据查询接口
parent
102e252f73
commit
01c567140e
|
@ -5,6 +5,7 @@ import com.ruoyi.common.core.web.page.TableDataInfo;
|
|||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.etl.domain.ColumnInfo;
|
||||
import com.ruoyi.etl.domain.DataSource;
|
||||
import com.ruoyi.etl.domain.TableInfo;
|
||||
import com.ruoyi.etl.domain.req.ColumnInfoReq;
|
||||
import com.ruoyi.etl.domain.req.DataSourceQueryReq;
|
||||
import com.ruoyi.etl.domain.resp.AssetStructureResp;
|
||||
|
@ -60,10 +61,20 @@ public class AssetStructureController{
|
|||
}
|
||||
|
||||
/**
|
||||
* 通过数据库名查询资产结构数据
|
||||
* 通过数据库名查询资产数据
|
||||
*/
|
||||
@ApiOperation("通过数据库名查询表信息")
|
||||
@RequiresPermissions("etl:structure:query")
|
||||
@GetMapping("/getAssetData/{databaseName}")
|
||||
public Result<List<TableInfo>> getAssetData(@PathVariable String databaseName) {
|
||||
return Result.success(assetStructureService.getAssetData(databaseName));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过数据库名查询资产结构数据
|
||||
*/
|
||||
@ApiOperation("通过数据库名查询表结构信息")
|
||||
@RequiresPermissions("etl:structure:query")
|
||||
@GetMapping("/getAssetStructureData/{databaseName}")
|
||||
public Result<List<AssetStructureResp>> getAssetStructureData(@PathVariable String databaseName) {
|
||||
return Result.success(assetStructureService.getAssetStructureData(databaseName));
|
||||
|
|
|
@ -82,4 +82,11 @@ public class AssetStructureServiceImpl implements AssetStructureService {
|
|||
.eq(ColumnInfo::getTableId, tableInfoId)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TableInfo> getAssetData(String databaseName) {
|
||||
//TODO 优化查询逻辑
|
||||
return tableInfoService.list(new LambdaQueryWrapper<TableInfo>()
|
||||
.eq(TableInfo::getDatabaseName, databaseName));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue