<?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="org.dao.IDeptDao">
<select id="getDeptAll" resultType="org.entity.Dept">
select * from dept
</select>
<insert id="saveEntity" parameterType="org.entity.Dept">
insert into dept (id,name,loc) values(#{id},#{name},#{loc})
</insert>
<update id="updateEntity" parameterType="org.entity.Dept">
update dept set name=#{name},loc=#{loc} where id=#{id}
</update>
<delete id="delEntity" parameterType="org.entity.Dept">
delete from dept where id = #{id}
</delete>
<select id="getDeptById" resultType="org.entity.Dept" parameterType="int">
select * from dept where id = #{id}
</select>
</mapper>