|
|
<?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.yohoufo.dal.product.ProductSelfShelvesMapper" >
|
|
|
<resultMap id="BaseResultMap" type="com.yohoufo.dal.product.model.ProductSelfShelves" >
|
|
|
<id column="id" property="id" jdbcType="INTEGER" />
|
|
|
<result column="brand" property="brand" jdbcType="VARCHAR" />
|
|
|
<result column="product_name" property="productName" jdbcType="VARCHAR" />
|
|
|
<result column="price" property="price" jdbcType="DECIMAL" />
|
|
|
<result column="sale_time" property="saleTime" jdbcType="INTEGER" />
|
|
|
<result column="product_code" property="productCode" jdbcType="VARCHAR" />
|
|
|
<result column="status" property="status" jdbcType="INTEGER" />
|
|
|
<result column="uid" property="uid" jdbcType="INTEGER" />
|
|
|
<result column="create_time" property="createTime" jdbcType="INTEGER" />
|
|
|
<result column="update_time" property="updateTime" jdbcType="INTEGER" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List" >
|
|
|
id, brand, product_name, price, sale_time, product_code, status, uid, create_time,
|
|
|
update_time
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from product_self_shelves
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</select>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
|
|
delete from product_self_shelves
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.yohoufo.dal.product.model.ProductSelfShelves" >
|
|
|
insert into product_self_shelves (id, brand, product_name,
|
|
|
price, sale_time, product_code,
|
|
|
status, uid, create_time,
|
|
|
update_time)
|
|
|
values (#{id,jdbcType=INTEGER}, #{brand,jdbcType=VARCHAR}, #{productName,jdbcType=VARCHAR},
|
|
|
#{price,jdbcType=DECIMAL}, #{saleTime,jdbcType=INTEGER}, #{productCode,jdbcType=VARCHAR},
|
|
|
#{status,jdbcType=INTEGER}, #{uid,jdbcType=INTEGER}, #{createTime,jdbcType=INTEGER},
|
|
|
#{updateTime,jdbcType=INTEGER})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.yohoufo.dal.product.model.ProductSelfShelves" >
|
|
|
insert into product_self_shelves
|
|
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
|
|
<if test="id != null" >
|
|
|
id,
|
|
|
</if>
|
|
|
<if test="brand != null" >
|
|
|
brand,
|
|
|
</if>
|
|
|
<if test="productName != null" >
|
|
|
product_name,
|
|
|
</if>
|
|
|
<if test="price != null" >
|
|
|
price,
|
|
|
</if>
|
|
|
<if test="saleTime != null" >
|
|
|
sale_time,
|
|
|
</if>
|
|
|
<if test="productCode != null" >
|
|
|
product_code,
|
|
|
</if>
|
|
|
<if test="status != null" >
|
|
|
status,
|
|
|
</if>
|
|
|
<if test="uid != null" >
|
|
|
uid,
|
|
|
</if>
|
|
|
<if test="createTime != null" >
|
|
|
create_time,
|
|
|
</if>
|
|
|
<if test="updateTime != null" >
|
|
|
update_time,
|
|
|
</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
<if test="id != null" >
|
|
|
#{id,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="brand != null" >
|
|
|
#{brand,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="productName != null" >
|
|
|
#{productName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="price != null" >
|
|
|
#{price,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
<if test="saleTime != null" >
|
|
|
#{saleTime,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="productCode != null" >
|
|
|
#{productCode,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="status != null" >
|
|
|
#{status,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="uid != null" >
|
|
|
#{uid,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="createTime != null" >
|
|
|
#{createTime,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="updateTime != null" >
|
|
|
#{updateTime,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.yohoufo.dal.product.model.ProductSelfShelves" >
|
|
|
update product_self_shelves
|
|
|
<set >
|
|
|
<if test="brand != null" >
|
|
|
brand = #{brand,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="productName != null" >
|
|
|
product_name = #{productName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="price != null" >
|
|
|
price = #{price,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
<if test="saleTime != null" >
|
|
|
sale_time = #{saleTime,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="productCode != null" >
|
|
|
product_code = #{productCode,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="status != null" >
|
|
|
status = #{status,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="uid != null" >
|
|
|
uid = #{uid,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="createTime != null" >
|
|
|
create_time = #{createTime,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="updateTime != null" >
|
|
|
update_time = #{updateTime,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.yohoufo.dal.product.model.ProductSelfShelves" >
|
|
|
update product_self_shelves
|
|
|
set brand = #{brand,jdbcType=VARCHAR},
|
|
|
product_name = #{productName,jdbcType=VARCHAR},
|
|
|
price = #{price,jdbcType=DECIMAL},
|
|
|
sale_time = #{saleTime,jdbcType=INTEGER},
|
|
|
product_code = #{productCode,jdbcType=VARCHAR},
|
|
|
status = #{status,jdbcType=INTEGER},
|
|
|
uid = #{uid,jdbcType=INTEGER},
|
|
|
create_time = #{createTime,jdbcType=INTEGER},
|
|
|
update_time = #{updateTime,jdbcType=INTEGER}
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
</mapper> |
|
|
\ No newline at end of file |
...
|
...
|
|