<?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="jp.dip.arimodoki.mapper.UserMapper">
<select id="getUser" parameterType="int" resultType="User">
Select * From tbluser Where userid = #{value}
</select>
<select id="getUserList" resultType="User">
Select * From tbluser Order By userid
</select>
<insert id="insertNewUser" parameterType="User">
Insert into tbluser(
myname,age,phone,email,checkVal
)Values(
#{myname},#{age},#{phone},#{email},#{checkVal}
)
</insert>
<update id="updateUser" parameterType="User">
update tbluser set
myname = #{myname},
age = #{age},
phone = #{phone},
email = #{email},
checkVal = #{checkVal}
Where userid = #{userid}
</update>
<delete id="deleteUser" parameterType="int">
Delete From tbluser Where userid = #{value}
</delete>
</mapper>
|