表单开发左树右表,用表视图做数据来源,查询报错

用表视图做数据来源,开发左树右表,页面清空按钮报错和左侧树筛选接口报错,后台报错原因为视图不存在,表视图不是不会创建视图吗,直接根据sql查询的吗,后台接口怎么会查视图名呢,这是个bug??image.png

image.png

image.png


评论区

超级管理员 2025-11-19 13:55

    private void checkTreehasChildren(FormEntity formEntity, List<Map<String, Object>> treeDataList) {

        if (Func.isEmpty(treeDataList)) {

            return;

        }

        ForkJoinPool pool = null;

        try {

            pool = FuncBase.jeelowcodeForkJoinPool();

            pool.submit(() -> treeDataList.parallelStream().forEach(dataMap -> {

                Long id = Func.getMap2Long(dataMap, "id");


                Map<String, Object> params = new HashMap<>();

                params.put("pid",id);

                SqlInfoQueryWrapper.Wrapper wrapper = this.getDataQueryWrapper(formEntity, params);

                Map<String, Object> subMap = sqlService.getDataOneByPlus(wrapper);

                boolean hasChildren = Func.isNotEmpty(subMap);

                dataMap.put("hasChildren", hasChildren);

                dataMap.put("leaf", !hasChildren);

            })).get();

        } catch (InterruptedException | ExecutionException e) {

            throw new RuntimeException(e.getMessage());

        } finally {

            if (pool != null) {

                pool.shutdown();

            }

        }

    }


Yolo 2025-11-20 09:05

@超级管理员

在后端2.2.3版本中只查找到了下面这个方法,和上面两个都不太一样,请问这个具体应该怎么修改呢

超级管理员 2025-11-20 09:08

@超级管理员 @Yolo

替换我上面发的,然后有两次错误,修改一下传入的属性就可以了

回复

扫码关注

添加客服
图片未加载,请刷新后再试
联系我们