ILabourDao.xml 778 Bytes
Newer Older
1 2 3 4 5 6 7
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="dao.ILabourDao">
    <select id="selectAll" resultType="beans.Labour">
        select * from labour
    </select>
8 9 10
    <select id="selectById" resultType="beans.Labour">
        select * from labour where id=#{id}
    </select>
11 12 13 14 15 16 17 18 19
    <insert id="insertLabour">
        insert into budgetmanagementsystem.labour(name,price) values (#{name},#{price})
    </insert>
    <update id="updateLabour">
        update budgetmanagementsystem.labour set name=#{name},price=#{price} where id=#{id}
    </update>
    <delete id="deleteLabour">
        delete from budgetmanagementsystem.labour where id=#{id}
    </delete>
20
</mapper>