|
|
@ -148,53 +148,51 @@ |
|
|
|
</select>--> |
|
|
|
</select>--> |
|
|
|
<select id="getsTheSubColumn" resultType="com.huoran.iasf.entity.SysColumn"> |
|
|
|
<select id="getsTheSubColumn" resultType="com.huoran.iasf.entity.SysColumn"> |
|
|
|
SELECT *, |
|
|
|
SELECT *, |
|
|
|
(SELECT u.username FROM sys_user u WHERE u.id = s.founder_id) AS creteUser, |
|
|
|
(SELECT u.username FROM sys_user u WHERE u.id = s.founder_id) AS creteUser, |
|
|
|
(SELECT u.username FROM sys_user u WHERE u.id = s.editor_id) AS editorUser, |
|
|
|
(SELECT u.username FROM sys_user u WHERE u.id = s.editor_id) AS editorUser, |
|
|
|
(SELECT t.template_type FROM sys_template t WHERE t.id = s.template_id) AS templateName, |
|
|
|
(SELECT t.template_type FROM sys_template t WHERE t.id = s.template_id) AS templateName, |
|
|
|
(SELECT sty.style FROM sys_template_style sty WHERE sty.id = s.list_style_id) AS listStyle, |
|
|
|
(SELECT sty.style FROM sys_template_style sty WHERE sty.id = s.list_style_id) AS listStyle, |
|
|
|
(SELECT sty.style FROM sys_template_style sty WHERE sty.id = s.detail_style_id) AS detailStyle, |
|
|
|
(SELECT sty.style FROM sys_template_style sty WHERE sty.id = s.detail_style_id) AS detailStyle, |
|
|
|
(SELECT sty.path FROM sys_template_style sty WHERE sty.id = s.list_style_id) AS path |
|
|
|
(SELECT sty.path FROM sys_template_style sty WHERE sty.id = s.list_style_id) AS path |
|
|
|
FROM sys_column s |
|
|
|
FROM sys_column s |
|
|
|
WHERE deleted = 1 |
|
|
|
WHERE deleted = 1 |
|
|
|
AND site_id = 1 |
|
|
|
AND site_id = 1 |
|
|
|
<if test="ids != '' and ids!= null"> |
|
|
|
<if test="ids != '' and ids!= null"> |
|
|
|
and FIND_IN_SET(s.id, #{ids}) |
|
|
|
and FIND_IN_SET(s.id, #{ids}) |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
|
|
|
|
|
|
|
|
ORDER BY |
|
|
|
|
|
|
|
s.create_time asc |
|
|
|
<if test="isSort== 1"> |
|
|
|
|
|
|
|
ORDER BY |
|
|
|
|
|
|
|
s.sort ASC |
|
|
|
|
|
|
|
</if> |
|
|
|
|
|
|
|
<if test="isSort=='' and isSort == null"> |
|
|
|
|
|
|
|
ORDER BY |
|
|
|
|
|
|
|
s.create_time asc |
|
|
|
|
|
|
|
</if> |
|
|
|
</select> |
|
|
|
</select> |
|
|
|
<select id="oneLevelChecksThemAll" resultType="java.lang.Integer"> |
|
|
|
<select id="oneLevelChecksThemAll" resultType="java.lang.Integer"> |
|
|
|
SELECT |
|
|
|
SELECT id |
|
|
|
id |
|
|
|
FROM (SELECT @r AS _id, |
|
|
|
FROM |
|
|
|
|
|
|
|
( |
|
|
|
|
|
|
|
SELECT |
|
|
|
|
|
|
|
@r AS _id, |
|
|
|
|
|
|
|
( SELECT @r := father_id FROM sys_column WHERE id = _id ) AS fatherId, |
|
|
|
( SELECT @r := father_id FROM sys_column WHERE id = _id ) AS fatherId, |
|
|
|
@l := @l + 1 AS lvl |
|
|
|
@l := @l + 1 AS lvl |
|
|
|
FROM |
|
|
|
FROM |
|
|
|
( SELECT @r := #{theChildId}, @l := 0 ) vars, |
|
|
|
( SELECT @r := #{theChildId}, @l := 0 ) vars, sys_column h |
|
|
|
sys_column h |
|
|
|
WHERE |
|
|
|
WHERE |
|
|
|
@r != 0) T1 |
|
|
|
@r != 0 |
|
|
|
JOIN sys_column T2 ON T1._id = T2.id |
|
|
|
) T1 |
|
|
|
|
|
|
|
JOIN sys_column T2 ON T1._id = T2.id |
|
|
|
|
|
|
|
WHERE |
|
|
|
WHERE |
|
|
|
deleted = 1 |
|
|
|
deleted = 1 |
|
|
|
ORDER BY |
|
|
|
ORDER BY |
|
|
|
T1.lvl DESC limit 0,1 |
|
|
|
T1.lvl DESC limit 0, 1 |
|
|
|
</select> |
|
|
|
</select> |
|
|
|
<select id="queryByColumnType" resultType="com.huoran.iasf.entity.SysColumn"> |
|
|
|
<select id="queryByColumnType" resultType="com.huoran.iasf.entity.SysColumn"> |
|
|
|
SELECT |
|
|
|
SELECT id, |
|
|
|
id, |
|
|
|
father_id, |
|
|
|
father_id, |
|
|
|
column_name, |
|
|
|
column_name, |
|
|
|
list_style_id |
|
|
|
list_style_id |
|
|
|
FROM sys_column s |
|
|
|
FROM |
|
|
|
WHERE FIND_IN_SET(s.id, #{ids}) |
|
|
|
sys_column s |
|
|
|
|
|
|
|
WHERE |
|
|
|
|
|
|
|
FIND_IN_SET( s.id, #{ids} ) |
|
|
|
|
|
|
|
GROUP BY list_style_id |
|
|
|
GROUP BY list_style_id |
|
|
|
</select> |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|