很简单的啊
1. .xml文件中
<mapper namespace="">
<select id="list" resultType="Category">
select * from category order by id desc
<
if
test
=
"start!=null and count!=null"
>
limit #{start},#{count}
</select>
<mapper>
2.mapper
3.service
4.controller