|
|
<?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.order.SellerChangePriceRecordMapper">
|
|
|
<resultMap id="BaseResultMap" type="com.yohoufo.dal.order.model.SellerChangePriceRecord">
|
|
|
<id column="id" jdbcType="INTEGER" property="id" />
|
|
|
<result column="pre_skup" jdbcType="INTEGER" property="preSkup" />
|
|
|
<result column="pre_order_code" jdbcType="BIGINT" property="preOrderCode" />
|
|
|
<result column="skup" jdbcType="INTEGER" property="skup" />
|
|
|
<result column="order_code" jdbcType="BIGINT" property="orderCode" />
|
|
|
<result column="status" jdbcType="SMALLINT" property="status" />
|
|
|
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
|
|
<result column="create_time" jdbcType="INTEGER" property="createTime" />
|
|
|
<result column="update_time" jdbcType="INTEGER" property="updateTime" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
id, pre_skup, pre_order_code, skup, order_code, status, remark, create_time, update_time
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from seller_change_price_record
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</select>
|
|
|
|
|
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yohoufo.dal.order.model.SellerChangePriceRecord" useGeneratedKeys="true">
|
|
|
insert into seller_change_price_record (pre_skup, pre_order_code, skup,
|
|
|
order_code, status, remark,
|
|
|
create_time, update_time)
|
|
|
values (#{preSkup,jdbcType=INTEGER}, #{preOrderCode,jdbcType=BIGINT}, #{skup,jdbcType=INTEGER},
|
|
|
#{orderCode,jdbcType=BIGINT}, #{status,jdbcType=SMALLINT}, #{remark,jdbcType=VARCHAR},
|
|
|
#{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yohoufo.dal.order.model.SellerChangePriceRecord" useGeneratedKeys="true">
|
|
|
insert into seller_change_price_record
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="preSkup != null">
|
|
|
pre_skup,
|
|
|
</if>
|
|
|
<if test="preOrderCode != null">
|
|
|
pre_order_code,
|
|
|
</if>
|
|
|
<if test="skup != null">
|
|
|
skup,
|
|
|
</if>
|
|
|
<if test="orderCode != null">
|
|
|
order_code,
|
|
|
</if>
|
|
|
<if test="status != null">
|
|
|
status,
|
|
|
</if>
|
|
|
<if test="remark != null">
|
|
|
remark,
|
|
|
</if>
|
|
|
<if test="createTime != null">
|
|
|
create_time,
|
|
|
</if>
|
|
|
<if test="updateTime != null">
|
|
|
update_time,
|
|
|
</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="preSkup != null">
|
|
|
#{preSkup,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="preOrderCode != null">
|
|
|
#{preOrderCode,jdbcType=BIGINT},
|
|
|
</if>
|
|
|
<if test="skup != null">
|
|
|
#{skup,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="orderCode != null">
|
|
|
#{orderCode,jdbcType=BIGINT},
|
|
|
</if>
|
|
|
<if test="status != null">
|
|
|
#{status,jdbcType=SMALLINT},
|
|
|
</if>
|
|
|
<if test="remark != null">
|
|
|
#{remark,jdbcType=VARCHAR},
|
|
|
</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.order.model.SellerChangePriceRecord">
|
|
|
update seller_change_price_record
|
|
|
<set>
|
|
|
<if test="status != null">
|
|
|
status = #{status,jdbcType=SMALLINT},
|
|
|
</if>
|
|
|
<if test="remark != null">
|
|
|
remark = #{remark,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="updateTime != null">
|
|
|
update_time = #{updateTime,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
</set>
|
|
|
where order_code = #{orderCode,jdbcType=BIGINT}
|
|
|
</update>
|
|
|
|
|
|
<select id="selectByPreOrderCode" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from seller_change_price_record
|
|
|
where pre_order_code = #{preOrderCode,jdbcType=BIGINT}
|
|
|
</select>
|
|
|
|
|
|
<select id="selectByOrderCode" resultMap="BaseResultMap">
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from seller_change_price_record
|
|
|
where order_code = #{orderCode,jdbcType=BIGINT}
|
|
|
</select>
|
|
|
|
|
|
<select id="selectByPreOrderCodeNStatus" resultMap="BaseResultMap">
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from seller_change_price_record
|
|
|
where pre_order_code = #{preOrderCode,jdbcType=BIGINT}
|
|
|
<if test="status != null">
|
|
|
and status in
|
|
|
<foreach collection="statusList" item="status" open="(" close=")" separator=",">
|
|
|
#{status,jdbcType=SMALLINT}
|
|
|
</foreach>
|
|
|
</if>
|
|
|
</select>
|
|
|
</mapper> |
|
|
\ No newline at end of file |
...
|
...
|
|