一:问题1:文章归档的内容不显示
1.问题点
2:原因
原因sql中create_date给写成creat_date
3:解决方案
修改sql语句如下就可以了
<select id="listArchives" resultType="com.mszlu.blog.dao.dos.Archives">
select year(create_date) as year, month(create_date) as month,count(*) as count from ms_article
group by year,month
</select>

二:问题2:文章归档内容显示了,当是小括号内的条数不显示
1.问题点
2:原因
也是sql的原因,此处没有写
count(*) as count
修改前:
<select id="listArchives" resultType="com.mszlu.blog.dao.dos.Archives">
select year(create_date) as year, month(create_date) as month count from ms_article
group by year,month
</select>
3:解决方案
修改后:
<select id="listArchives" resultType="com.mszlu.blog.dao.dos.Archives">
select year(create_date) as year, month(create_date) as month,count(*) as count from ms_article
group by year,month
</select>



被折叠的 条评论
为什么被折叠?



