sql
获取数据 select * from xd.video 传参 select * from xd.video where id = #{id} 传2参 select * from xd.video where point = #{ point } and title like concat('',#{title},'%') 新增 INSERT INTO xd.video (`title`,`summary`,`price`,`point`) VALUES (#{title},#{summary},#{price},#{point}) <select id="listVideo" resultType="com.example.demoal.domain.Video"> select * from xd.video where id = #{id} </select> <select id="selectByPoinAndTitleLike" resultType="Video"> select * from xd.video where point = #{ point } and title like concat('%',#{title},'%') </select> 新增 <insert id="addLike" parameterType="Video" useGeneratedKeys="true" keyColumn="id" keyProperty="id"> INSERT INTO xd.video (`title`,`summary`,`price`,`point`) VALUES (#{title},#{summary},#{price},#{point}) </insert>
本文来自博客园,作者:zjxgdq,转载请注明原文链接:https://www.cnblogs.com/zjxzhj/p/16370891.html