@MapperpublicinterfaceGoodsDAO{
@Select("select * from t_goods where current_price between #{min} and #{max} order by current_price limit 0,#{limt}")publicList<Goods>selectByPriceRange(@Param("min")Float min,@Param("max")Float max,@Param("limt")Integer limt);@Insert("insert into t_goods(title,sub_title,original_cost,current_price,discount,is_free_delivery,category_id) values (#{title},#{sub_title},#{original_cost},#{current_price},#{discount},#{is_free_delivery},#{category_id})")@SelectKey(statement="select last_insert_id()",before=false,keyProperty="goodsId",resultType=Integer.class)publicintinsert(Goods goods);@Select("select * from t_goods")@Results({
@Result(column="goods_id",property="goodsId",id=true),@Result(column="title",property="title"),@Result(column="current_price",property="currentPrice")})publicList<GoodsDTO>selectAll();}