主表的编辑界面把子表数据删除后没有触发子表的java增强

主表的编辑界面把子表数据删除后没有触发子表的java删除增强, 但是会触发子表编辑的java增强, 都是用的在线编辑的环绕增强

评论区

超级管理员 2025-03-19 14:23

收到,后续修复这个问题

超级管理员 2025-03-19 15:46

image.png

SqlInfoQueryWrapper.Wrapper wrapper = SqlHelper.getQueryWrapper()
        .select("id")
        .setTableName(subTableName)
        .setWhere(where -> {
            where.eq(subFieldCode, obj);
            where.eq("is_deleted", 0);
        })
        .build();
List<Map<String, Object>> oldDataList = sqlService.getDataListByPlus(wrapper);
Set<Long> collect = oldDataList.stream()
        .filter(oldData -> !idSet.contains(Func.getMap2Str(oldData, "id")))
        .map(oldData -> Func.getMap2Long(oldData, "id"))
        .collect(Collectors.toSet());
if (Func.isNotEmpty(collect)) {
    Map<String,Object> subDelParams=new HashMap<>();
    subDelParams.put("dataIdList", new ArrayList<>(collect));
    subDelParams.put("whereFieldCode","id");
    proxyService.delData(subFormId, subDelParams);
}

修改对应的代码

回复