|
|
@ -51,10 +51,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
<select id="getFirstCategory" resultType="com.jingcheng.cms.model.Category">
|
|
|
|
<select id="getFirstCategory" resultType="com.jingcheng.cms.model.Category">
|
|
|
|
select c.`id`,c.`name`,c.`level`,c.`type_name`,c.`sort_num`
|
|
|
|
select c.`id`,c.`name`,c.`level`,c.`type_name`,c.`sort_num`
|
|
|
|
from article ar
|
|
|
|
from article_category ac
|
|
|
|
left join category c
|
|
|
|
left join category c
|
|
|
|
on c.id = ar.`first_category`
|
|
|
|
on c.id = ac.`category_id`
|
|
|
|
where c.level = 1 and ar.state = 1
|
|
|
|
where c.level = 1 and ac.state = 1
|
|
|
|
group by c.name
|
|
|
|
group by c.name
|
|
|
|
order by c.sort_num ASC
|
|
|
|
order by c.sort_num ASC
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|