09041214:编写规则引擎要调用的接口

master
冷调 2024-09-04 12:15:08 +08:00
parent 0c71f5add7
commit 68df926995
3 changed files with 9 additions and 9 deletions

View File

@ -236,13 +236,12 @@ public class TableInfoController {
/**
*
* parentId
* @param parentId id
* @return
*/
@PostMapping("/selectById")
@Operation(summary = "根据parentId查询数据接入" , description = "根据parentId查询数据接入")
public Result<List<TableInfo>> selectById(@RequestParam("parentId") Long parentId){
List<TableInfo> tableInfo =tableInfoService.selectById(parentId);
public Result<List<TableInfo>> selectById(){
List<TableInfo> tableInfo =tableInfoService.selectById();
return Result.success(tableInfo);
}
@ -254,11 +253,8 @@ public class TableInfoController {
@PostMapping("/findTableIdByParentId/{id}")
@Operation(summary = "根据parentId向下查询出子表" , description = "根据parentId向下查询出子表")
public Result<List<TableInfo>> findTableIdByParentId(@PathVariable("id") Long id) {
List<TableInfo> tableInfoList = null;
List<Long> structureIds = tableInfoService.findTableIdByParentId(id);
for (Long structureId : structureIds) {
tableInfoList = tableInfoService.selectById(structureId);
}
List<TableInfo> tableInfoList=tableInfoService.listByIds(structureIds);
return Result.success(tableInfoList);
}
}

View File

@ -67,11 +67,13 @@ public class TableServiceImpl extends ServiceImpl<TableInfoMapper, TableInfo> im
}
@Override
public List<TableInfo> selectById(Long parentId) {
public List<TableInfo> selectById() {
LambdaQueryWrapper<TableInfo> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(TableInfo::getParentId, 0);
List<TableInfo> tableInfoList = tableInfoMapper.selectList(queryWrapper);
return tableInfoList;
}
}

View File

@ -42,5 +42,7 @@ public interface TableInfoService extends IService<TableInfo> {
*/
List<Long> findTableIdByParentId(Long basicId);
List<TableInfo> selectById(Long parentId);
List<TableInfo> selectById();
}