This commit is contained in:
2025-11-19 16:10:25 +08:00
parent 9aa041c479
commit 5a77756c33
25 changed files with 238 additions and 90 deletions

View File

@ -42,7 +42,7 @@ import java.util.*;
import java.util.stream.Collectors;
@Tag(name = "模型数据管理")
@CheckAuth
@RestController
@RequestMapping("/modelLibrary")
public class ModelLibraryController {
@ -543,7 +543,7 @@ public class ModelLibraryController {
// 先将当前分类ID加入结果列表确保包含自身
resultList.add(currentTypeId);
// 查询当前分类的「直接子分类」(按 tree_index 排序、保持树形结构原有顺序)
// 查询当前分类的「直接子分类」
String childSql = "SELECT id FROM model_type WHERE parent_id = ? ORDER BY tree_index ASC";
List<Object> childParams = new ArrayList<>();
childParams.add(currentTypeId);
@ -578,5 +578,4 @@ public class ModelLibraryController {
}
return str.startsWith(".") ? str.substring(1) : str;
}
}