09041214:编写规则引擎要调用的接口
parent
0c71f5add7
commit
68df926995
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -42,5 +42,7 @@ public interface TableInfoService extends IService<TableInfo> {
|
|||
*/
|
||||
List<Long> findTableIdByParentId(Long basicId);
|
||||
|
||||
List<TableInfo> selectById(Long parentId);
|
||||
List<TableInfo> selectById();
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue