rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/BasContainerController.java
@@ -51,6 +51,10 @@
    @GetMapping("/basContainer/{id}")
    public R get(@PathVariable("id") Long id) {
        BasContainer basContainer = basContainerService.getById(id);
        // 确保返回的areas按sort字段排序
        if (basContainer != null) {
            basContainer.sortAreas();
        }
        return R.ok().add(basContainer);
    }
@@ -62,6 +66,10 @@
        basContainer.setCreateTime(new Date());
        basContainer.setUpdateBy(getLoginUserId());
        basContainer.setUpdateTime(new Date());
        // 确保areas按sort字段排序
        basContainer.sortAreas();
        BasContainer container = basContainerService.getOne(new LambdaQueryWrapper<BasContainer>().eq(BasContainer::getContainerType, basContainer.getContainerType()));
        if (null != container) {
            return R.error("该类型已被初始化");
@@ -78,6 +86,10 @@
    public R update(@RequestBody BasContainer basContainer) {
        basContainer.setUpdateBy(getLoginUserId());
        basContainer.setUpdateTime(new Date());
        // 确保areas按sort字段排序
        basContainer.sortAreas();
        if (!basContainerService.updateById(basContainer)) {
            return R.error("Update Fail");
        }