<?xml version="1.0" encoding="UTF-8" ?>
<select id="queryProducts" resultType="Product">
select * from t_product limit #{start},#{rows}
</select>
<select id="queryCount" resultType="int">
select count(product_id) from t_product
</select>
<select id="findProductById" parameterType="string" resultType="Product">
select * from t_product where product_id=#{id}
</select>
<insert id="saveProduct" parameterType="Product">
insert into t_product (product_id,product_category,product_name,product_price,product_imgurl,product_num,product_description)
values(#{productId},#{productCategory},#{productName},#{productPrice},#{productImgurl},#{productNum},#{productDescription})
</insert>
<update id="updateProduct" parameterType="Product">
update t_product set
product_category=#{productCategory},
product_name=#{productName},
product_price=#{productPrice},
product_imgurl=#{productImgurl},
product_num=#{productNum},
product_description=#{productDescription}
where product_id=#{productId}
</update>