这篇文章我们将来学习一些 association 用法 表结构 DROP TABLE IF EXISTS `student`; CREATE TABLE `student` ( `id` int(11) NOT NULL auto_increment, `name` varchar(10) NOT NULL, `gender` char(1) NOT NULL, `major` varchar(20) NOT NULL, `grade` char(4) NOT NULL, `supe
一.mybatis查询 public abstract List<Model> findByIds(@Param("ids")List<Integer> ids); select * from table <where> id in <foreach collection="ids" item="item" index="index" open="(" separa
<select id="selectAny" resultType="user" parameterType="user"> select id, name, age, gmt_create gmtCreate from users <where> <if test="ids!=null"> and id in <foreach collection="ids" i