|
|
<?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.PriceTrendDayMapper" >
|
|
|
<resultMap id="BaseResultMap" type="com.yohoufo.dal.product.model.PriceTrendDay" >
|
|
|
<id column="id" property="id" jdbcType="INTEGER" />
|
|
|
<result column="product_id" property="productId" jdbcType="INTEGER" />
|
|
|
<result column="size_id" property="sizeId" jdbcType="INTEGER" />
|
|
|
<result column="skn_price" property="sknPrice" jdbcType="DECIMAL" />
|
|
|
<result column="sku_price" property="skuPrice" jdbcType="DECIMAL" />
|
|
|
<result column="create_time" property="createTime" jdbcType="INTEGER" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List" >
|
|
|
id, product_id, size_id, skn_price, sku_price, create_time
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from price_trend_day
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</select>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
|
|
delete from price_trend_day
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.yohoufo.dal.product.model.PriceTrendDay" >
|
|
|
insert into price_trend_day (id, product_id, size_id,
|
|
|
skn_price, sku_price, create_time
|
|
|
)
|
|
|
values (#{id,jdbcType=INTEGER}, #{productId,jdbcType=INTEGER}, #{sizeId,jdbcType=INTEGER},
|
|
|
#{sknPrice,jdbcType=DECIMAL}, #{skuPrice,jdbcType=DECIMAL}, #{createTime,jdbcType=INTEGER}
|
|
|
)
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.yohoufo.dal.product.model.PriceTrendDay" >
|
|
|
insert into price_trend_day
|
|
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
|
|
<if test="id != null" >
|
|
|
id,
|
|
|
</if>
|
|
|
<if test="productId != null" >
|
|
|
product_id,
|
|
|
</if>
|
|
|
<if test="sizeId != null" >
|
|
|
size_id,
|
|
|
</if>
|
|
|
<if test="sknPrice != null" >
|
|
|
skn_price,
|
|
|
</if>
|
|
|
<if test="skuPrice != null" >
|
|
|
sku_price,
|
|
|
</if>
|
|
|
<if test="createTime != null" >
|
|
|
create_time,
|
|
|
</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
<if test="id != null" >
|
|
|
#{id,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="productId != null" >
|
|
|
#{productId,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="sizeId != null" >
|
|
|
#{sizeId,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="sknPrice != null" >
|
|
|
#{sknPrice,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
<if test="skuPrice != null" >
|
|
|
#{skuPrice,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
<if test="createTime != null" >
|
|
|
#{createTime,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.yohoufo.dal.product.model.PriceTrendDay" >
|
|
|
update price_trend_day
|
|
|
<set >
|
|
|
<if test="productId != null" >
|
|
|
product_id = #{productId,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="sizeId != null" >
|
|
|
size_id = #{sizeId,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="sknPrice != null" >
|
|
|
skn_price = #{sknPrice,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
<if test="skuPrice != null" >
|
|
|
sku_price = #{skuPrice,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
<if test="createTime != null" >
|
|
|
create_time = #{createTime,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.yohoufo.dal.product.model.PriceTrendDay" >
|
|
|
update price_trend_day
|
|
|
set product_id = #{productId,jdbcType=INTEGER},
|
|
|
size_id = #{sizeId,jdbcType=INTEGER},
|
|
|
skn_price = #{sknPrice,jdbcType=DECIMAL},
|
|
|
sku_price = #{skuPrice,jdbcType=DECIMAL},
|
|
|
create_time = #{createTime,jdbcType=INTEGER}
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
</mapper> |
|
|
\ No newline at end of file |
...
|
...
|
|