mybatis
<select id="selectUserList" resultType="map">
select * from user
</select>
<!--根据主键查询一条-->
<select id="selectById" resultType="map" parameterType="java.lang.Integer">
select * from user where user id = #{id1}
</select>
<!--
map.put("user_id",1);
map.put("username","root");
传人一个Map对象进行插人
--!>
<insert id="insertMap" parameterType="map">
INSERT INTO `user`(`username`,`password`,`realname`,`telephone`,`user_type` ,`lastlogin`)
VALUES
(#{#{username},#{password},#{realname},#{telephone},#{user_type},#{lastlogin})
</insert>