CmsStorehouseDataMapper.xml
1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?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.yoho.search.dal.CmsStorehouseDataMapper">
<resultMap id="BaseResultMap" type="com.yoho.search.dal.model.CmsStorehouseData">
<result column="cs_id" property="csId" jdbcType="INTEGER" />
</resultMap>
<resultMap id="ResultMapWithBLOBs" type="com.yoho.search.dal.model.CmsStorehouseData"
extends="BaseResultMap">
<result column="content" property="content" jdbcType="LONGVARCHAR" />
</resultMap>
<sql id="Base_Column_List">
cs_id,content
</sql>
<insert id="insert" parameterType="com.yoho.search.dal.model.CmsStorehouseData"
timeout="20000">
insert ignore into cms_storehouse_data (cs_id, content)
values (#{csId,jdbcType=INTEGER}, #{content,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.yoho.search.dal.model.CmsStorehouseData"
timeout="20000">
insert into cms_storehouse_data
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="csId != null">
cs_id,
</if>
<if test="content != null">
content,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="csId != null">
#{csId,jdbcType=INTEGER},
</if>
<if test="content != null">
#{content,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select id="selectByPrimaryKey" resultMap="BaseResultMap"
parameterType="java.lang.Integer" timeout="20000">
select
<include refid="Base_Column_List" />
from cms_storehouse_data
where cs_id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"
timeout="20000">
delete from cms_storehouse_data
where cs_id = #{id,jdbcType=INTEGER}
</delete>
</mapper>