CmsStorehouseDataMapper.xml 1.77 KB
<?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>