|
|
|
@ -34,17 +34,26 @@ |
|
|
|
|
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.editor_id) as editorUser |
|
|
|
|
(SELECT u.username from sys_user u WHERE u.id = s.editor_id) as editorUser |
|
|
|
|
FROM |
|
|
|
|
sys_column s |
|
|
|
|
WHERE deleted = 1 and site_id = #{vo.siteId} |
|
|
|
|
<if test="vo.columnName != '' and vo.columnName!= null"> |
|
|
|
|
and column_name LIKE CONCAT('%',#{vo.columnName},'%') |
|
|
|
|
</if> |
|
|
|
|
ORDER BY |
|
|
|
|
s.father_id, |
|
|
|
|
s.sort ASC, |
|
|
|
|
s.create_time desc |
|
|
|
|
|
|
|
|
|
<if test="vo.isSort== 1"> |
|
|
|
|
ORDER BY |
|
|
|
|
s.father_id, |
|
|
|
|
s.sort ASC, |
|
|
|
|
s.create_time desc |
|
|
|
|
</if> |
|
|
|
|
<if test="vo.isSort== 0"> |
|
|
|
|
ORDER BY |
|
|
|
|
s.create_time asc |
|
|
|
|
</if> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -59,12 +68,11 @@ |
|
|
|
|
ORDER BY c.create_time asc |
|
|
|
|
</select> |
|
|
|
|
<select id="getParentInformationBasedOnChild" resultType="com.huoran.iasf.vo.FatherContentRespVO"> |
|
|
|
|
SELECT |
|
|
|
|
T2.id, |
|
|
|
|
T2.column_name , |
|
|
|
|
T2.father_id, |
|
|
|
|
T2.level, |
|
|
|
|
T2.sort |
|
|
|
|
SELECT T2.id, |
|
|
|
|
T2.column_name, |
|
|
|
|
T2.father_id, |
|
|
|
|
T2.level, |
|
|
|
|
T2.sort |
|
|
|
|
FROM ( |
|
|
|
|
SELECT @r AS _id, |
|
|
|
|
( SELECT @r := father_id FROM sys_column WHERE id = _id ) AS parent_id, |
|
|
|
@ -77,7 +85,8 @@ |
|
|
|
|
) T1 |
|
|
|
|
JOIN sys_column T2 ON T1._id = T2.id |
|
|
|
|
WHERE |
|
|
|
|
deleted = 1 and id != #{id} |
|
|
|
|
deleted = 1 |
|
|
|
|
and id != #{id} |
|
|
|
|
ORDER BY |
|
|
|
|
T1.lvl DESC |
|
|
|
|
</select> |
|
|
|
|