<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.mapper.UserMapper">
<!-- <resultMap type="com.bw.dto.Shop" id="shopMap">
<id property="id" column="id"/>
<result property="name" column="name"/>
<result property="content" column="content"/>
<result property="price" column="price"/>
<result property="num" column="num"/>
<association property="t" column="tid" resultMap="typeMap"/>
</resultMap> -->
<select id="login" resultType="com.dto.User">
select * from t_user where username=#{username}
</select>
<select id="getStudentList" resultType="com.dto.Student">
select * from t_student where sname like concat("%",#{mohu},"%") limit #{startIndex},#{pageSize}
</select>
<select id="getCount" resultType="int">
select count(*) from t_student
</select>
<insert id="add">
insert into t_student set sid=#{sid},sname=#{sname},sex=#{sex},email=#{email},birthday=#{birthday},startday=#{startday},endday=#{endday},way=#{way},other=#{other},javalesson=#{javalesson},clesson1=#{clesson1},clesson2=#{clesson2}
</insert>
<delete id="del">
delete from t_student where sid = #{sid}
</delete>
<select id="getObj" resultType="com.dto.Student">
select * from t_student where sid = #{sid}
</select>
<update id="update">
update t_student set sname=#{sname},sex=#{sex},email=#{email},birthday=#{birthday},startday=#{startday},endday=#{endday},way=#{way},other=#{other},javalesson=#{javalesson},clesson1=#{clesson1},clesson2=#{clesson2} where sid=#{sid}
</update>
</mapper>
人是寻求意义的动物。
——柏拉图
828

被折叠的 条评论
为什么被折叠?



