|
|
<?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.UfoScoreProductRuleMapper">
|
|
|
<resultMap id="BaseResultMap" type="com.yoho.search.dal.model.UfoScoreProductRule">
|
|
|
<id column="id" property="id" jdbcType="INTEGER"/>
|
|
|
<result column="product_id" property="productId" jdbcType="INTEGER"/>
|
|
|
<result column="update_time" property="updateTime" jdbcType="INTEGER"/>
|
|
|
<result column="create_time" property="createTime" jdbcType="INTEGER"/>
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
id, product_id, update_time, create_time
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
|
|
|
select
|
|
|
<include refid="Base_Column_List"/>
|
|
|
from ufo_score_product_rule
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</select>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
delete from ufo_score_product_rule
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.yoho.search.dal.model.UfoScoreProductRule">
|
|
|
insert into ufo_score_product_rule (id, product_id, update_time,
|
|
|
create_time)
|
|
|
values (#{id,jdbcType=INTEGER}, #{productId,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER},
|
|
|
#{createTime,jdbcType=INTEGER})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.yoho.search.dal.model.UfoScoreProductRule">
|
|
|
insert into ufo_score_product_rule
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="id != null">
|
|
|
id,
|
|
|
</if>
|
|
|
<if test="productId != null">
|
|
|
product_id,
|
|
|
</if>
|
|
|
<if test="updateTime != null">
|
|
|
update_time,
|
|
|
</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="updateTime != null">
|
|
|
#{updateTime,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="createTime != null">
|
|
|
#{createTime,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.yoho.search.dal.model.UfoScoreProductRule">
|
|
|
update ufo_score_product_rule
|
|
|
<set>
|
|
|
<if test="productId != null">
|
|
|
product_id = #{productId,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="updateTime != null">
|
|
|
update_time = #{updateTime,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="createTime != null">
|
|
|
create_time = #{createTime,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.yoho.search.dal.model.UfoScoreProductRule">
|
|
|
update ufo_score_product_rule
|
|
|
set product_id = #{productId,jdbcType=INTEGER},
|
|
|
update_time = #{updateTime,jdbcType=INTEGER},
|
|
|
create_time = #{createTime,jdbcType=INTEGER}
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
<select id="selectByIdList" resultType="java.lang.Integer">
|
|
|
select product_id
|
|
|
from ufo_score_product_rule
|
|
|
where product_id in
|
|
|
<foreach item="item" collection="idList" open="(" separator="," close=")">
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
</select>
|
|
|
</mapper> |
|
|
\ No newline at end of file |
...
|
...
|
|