1
<?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.mengxuegu.springcloud.mapper.ProductMapper">
<select id="findById" resultType="Product" parameterType="Long">
select pid, product_name, db_source from product where pid=#{pid};
</select>
<select id="findAll" resultType="Product">
select pid, product_name, db_source from product;
</select>
<insert id="addProduct" parameterType="Product">
INSERT INTO product(product_name, db_source) VALUES(#{productName},
DATABASE());
</insert>
</mapper>
本系列博文包含H5全栈 java全栈 Python基础、前端开发、Web框架、缓存以及队列等,希望可以给正在学习编程的童鞋提供一点帮助!!!