插入一条数据后返回主键
<insert id="insertAndGetId" useGeneratedKeys="true" keyProperty="userId" parameterType="com.chenzhou.mybatis.User">
insert into user(userName,password,comment)
values(#{userName},#{password},#{comment})
</insert>
其中keyProperty是PO类中映射的字段
内置方法排序
CarouselExample carouselExample = new CarouselExample();
carouselExample.setOrderByClause("字段名 desc");