|
|
<?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.order.dal.ProductSizeMapper" >
|
|
|
|
|
|
<resultMap id="BaseResultMap" type="com.yoho.order.model.ProductSize" >
|
|
|
<id column="id" property="id" jdbcType="INTEGER" />
|
|
|
<result column="size_id" property="sizeId" jdbcType="INTEGER" />
|
|
|
<result column="size_name" property="sizeName" jdbcType="VARCHAR" />
|
|
|
<result column="order_by" property="orderBy" 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, size_id, size_name, order_by, create_time, update_time
|
|
|
</sql>
|
|
|
|
|
|
<insert id="insert" parameterType="com.yoho.order.model.ProductSize" >
|
|
|
insert into product_size (id, size_id, size_name,
|
|
|
order_by, create_time,
|
|
|
update_time)
|
|
|
values (#{id,jdbcType=INTEGER}, #{sizeId,jdbcType=INTEGER}, #{sizeName,jdbcType=VARCHAR},
|
|
|
#{orderBy,jdbcType=INTEGER}, #{createTime,jdbcType=INTEGER},
|
|
|
#{updateTime,jdbcType=INTEGER})
|
|
|
</insert>
|
|
|
|
|
|
<update id="updateBySizeId" parameterType="com.yoho.order.model.ProductSize" >
|
|
|
update product_size
|
|
|
<set >
|
|
|
<if test="sizeName != null" >
|
|
|
size_name = #{sizeName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="orderBy != null" >
|
|
|
order_by = #{orderBy,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 size_id = #{sizeId,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
|
|
|
</mapper> |
|
|
\ No newline at end of file |
...
|
...
|
|