根节点父级穿他本身

This commit is contained in:
liang.chao 2025-09-17 11:03:17 +08:00
parent f64f7559db
commit 2fc5e2216d
1 changed files with 1 additions and 1 deletions

View File

@ -123,7 +123,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="list" resultType="com.bonus.web.domain.DaKyProFilesContentsDto">
SELECT
dkp.*,
dkp2.content_name as parentName
COALESCE(dkp2.content_name, dkp.content_name) AS parentName
FROM
da_ky_pro_files_contents dkp
LEFT JOIN da_ky_pro_files_contents dkp2 on dkp.parent_id = dkp2.id