1. <! A namespace is a namespace and a full path to a mapper interface. --resultMap -- is the most complex and powerful element, SELECT * FROM table WHERE create_time desc WHERE create_time desc = 1 order by create_time desc LIMIT #{length} offset #{start} : Isreleased = 1 AND school_id = #{schoolId} : <if test="search! =null and search! ='' '>AND("name" LIKE #{search}) </if> : Optional concatenation parameter 7.count () returns the number of rows matching the specified condition. ParameterType has both basic data types and complex data type configurations. Now () : current time 10. KeyProperty Specifies the key value of the ID. If the primary key is incremented, you can directly use the primary key value after the primary key is added. 11. Select query table general return value resultMap other can not! ParameterType ="java.util.List" set List collection to "java.util.List" : Item: alias for iterating elements in the collection. This parameter is mandatory. Index: In list and array,index is the sequence number of an element. In map,index is the key of an element. This parameter is optional: where id in(<foreach collection="list" item="item" index="index" open="" close="" separator=","> #{item.id} </foreach> ) The condition is multiple dynamic idsCopy the code