|
@@ -6,7 +6,7 @@
|
|
|
select * from(
|
|
|
<foreach collection="types" item="item" index="index" separator="union all">
|
|
|
(select
|
|
|
- id, type, title, introduction, picture, created_Time, update_time
|
|
|
+ id, type, parent_id, title, introduction, picture, created_Time, update_time
|
|
|
from
|
|
|
t_article where type = ${item} order by update_time DESC limit 0,6)
|
|
|
</foreach>
|
|
@@ -15,5 +15,8 @@
|
|
|
<if test="keyword != null and keyword != ''">
|
|
|
and A.title like concat('%',#{keyword},'%')
|
|
|
</if>
|
|
|
+ <if test="parentId != null and parentId != ''">
|
|
|
+ and A.parent_id = parentId
|
|
|
+ </if>
|
|
|
</select>
|
|
|
</mapper>
|