<?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.hao.mapper.IShowMapper">
<select id="findShowList" resultType="map">
select * from show0910 order by id
</select>
<select id="findTypeList" resultType="map">
select * from t_showtype0910
</select>
<insert id="add" parameterType="com.hao.dto.Show">
insert into show0910 values(seq_t_show0910.nextval,#{showtime},#{showtype},#{showman},#{shownum},#{showcontent})
</insert>
<select id="getObj" parameterType="int" resultType="com.hao.dto.Show">
select * from show0910 where id = #{id}
</select>
<update id="update" parameterType="com.hao.dto.Show">
update show0910 set showtime=#{showtime},showtype=#{showtype},showman=#{showman},shownum=#{shownum},showcontent=#{showcontent} where id = #{id}
</update>
<delete id="del" parameterType="int">
delete from show0910 where id=#{id}
</delete>
</mapper>
“得不高不低之位,争不荣不辱之地,才得长久平安。”
《如懿传》
本文档详细介绍了使用MyBatis框架进行数据库操作的映射文件配置方法,包括查询、插入、更新和删除等核心SQL语句的定义。通过具体的例子展示了如何映射Java对象与数据库表之间的关系。
1157

被折叠的 条评论
为什么被折叠?



