提交代码

This commit is contained in:
jiang 2024-12-02 13:48:56 +08:00
parent f2e354b221
commit 84a2063a58
2 changed files with 4 additions and 1 deletions

View File

@ -102,6 +102,6 @@ public class DataSetLabelsController extends BaseController
@PostMapping("/getLabelsTree/{labelId}")
public AjaxResult getLabelsTree(@PathVariable Long labelId){
return dataSetLabelsService.getLabelsTree(labelId);
return dataSetLabelsService.getLabelsTree(labelId);
}
}

View File

@ -130,6 +130,9 @@ public class DataSetLabelsServiceImpl implements DataSetLabelsService
public AjaxResult getLabelsTree(Long labelId) {
DataSetLabels entity = new DataSetLabels();
List<DataSetLabels> dataSetLabels = dataSetLabelsMapper.selectDataSetLabelsList(entity);
if (labelId==0){
return AjaxResult.success(dataSetLabels);
}
Set<Long> labelIds = getFileWithChildren(labelId);
for (Long id : labelIds){
dataSetLabels.removeIf(item -> item.getLabelId().equals(id));