本系列博文包含 h5全栈 java全栈Python基础、前端开发、Web框架、缓存以及队列等,希望可以给正在学习编程的童鞋提供一点帮助!!!

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> 
posted on 2020-01-14 14:08  李俊互联网技术传播者  阅读(84)  评论(0编辑  收藏  举报