提交代码
This commit is contained in:
parent
f2e354b221
commit
84a2063a58
|
|
@ -102,6 +102,6 @@ public class DataSetLabelsController extends BaseController
|
||||||
|
|
||||||
@PostMapping("/getLabelsTree/{labelId}")
|
@PostMapping("/getLabelsTree/{labelId}")
|
||||||
public AjaxResult getLabelsTree(@PathVariable Long labelId){
|
public AjaxResult getLabelsTree(@PathVariable Long labelId){
|
||||||
return dataSetLabelsService.getLabelsTree(labelId);
|
return dataSetLabelsService.getLabelsTree(labelId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -130,6 +130,9 @@ public class DataSetLabelsServiceImpl implements DataSetLabelsService
|
||||||
public AjaxResult getLabelsTree(Long labelId) {
|
public AjaxResult getLabelsTree(Long labelId) {
|
||||||
DataSetLabels entity = new DataSetLabels();
|
DataSetLabels entity = new DataSetLabels();
|
||||||
List<DataSetLabels> dataSetLabels = dataSetLabelsMapper.selectDataSetLabelsList(entity);
|
List<DataSetLabels> dataSetLabels = dataSetLabelsMapper.selectDataSetLabelsList(entity);
|
||||||
|
if (labelId==0){
|
||||||
|
return AjaxResult.success(dataSetLabels);
|
||||||
|
}
|
||||||
Set<Long> labelIds = getFileWithChildren(labelId);
|
Set<Long> labelIds = getFileWithChildren(labelId);
|
||||||
for (Long id : labelIds){
|
for (Long id : labelIds){
|
||||||
dataSetLabels.removeIf(item -> item.getLabelId().equals(id));
|
dataSetLabels.removeIf(item -> item.getLabelId().equals(id));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue