From 8ac573030c8fc795d9a30afb739f44393f8b63eb Mon Sep 17 00:00:00 2001 From: cuilei <ray_tsu1@163.com> Date: 星期一, 18 八月 2025 18:03:07 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/main/java/org/jeecg/modules/base/mapper/xml/FactoryMapper.xml | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/src/main/java/org/jeecg/modules/base/mapper/xml/FactoryMapper.xml b/src/main/java/org/jeecg/modules/base/mapper/xml/FactoryMapper.xml index 0832f10..b818615 100644 --- a/src/main/java/org/jeecg/modules/base/mapper/xml/FactoryMapper.xml +++ b/src/main/java/org/jeecg/modules/base/mapper/xml/FactoryMapper.xml @@ -2,4 +2,22 @@ <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="org.jeecg.modules.base.mapper.FactoryMapper"> + <select id="recursionChildren" resultType="java.lang.String"> + WITH temp ( id ) AS ( + SELECT + id + FROM + base_factory + WHERE + id = #{ factoryId } UNION ALL + SELECT + a.id + FROM + base_factory a + INNER JOIN temp ON a.parent_id = temp.id + ) SELECT + * + FROM + temp + </select> </mapper> \ No newline at end of file -- Gitblit v1.9.3