|
|
<?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.PageRecallStrategyDetailMapper">
|
|
|
<resultMap id="BaseResultMap" type="com.yoho.search.dal.model.PageRecallStrategyDetail">
|
|
|
<id column="id" property="id" jdbcType="INTEGER" />
|
|
|
<result column="page_id" property="pageId" jdbcType="TINYINT" />
|
|
|
<result column="recall_type" property="recallType" jdbcType="INTEGER" />
|
|
|
<result column="recall_percent" property="recallPercent" jdbcType="INTEGER" />
|
|
|
<result column="value_type" property="valueType" jdbcType="TINYINT" />
|
|
|
<result column="update_time" property="updateTime" jdbcType="INTEGER" />
|
|
|
<result column="status" property="status" jdbcType="TINYINT" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="Base_Column_List" >
|
|
|
id, page_id, recall_type, recall_percent, value_type, update_time, status
|
|
|
</sql>
|
|
|
|
|
|
<delete id="deleteByPrimaryKey">
|
|
|
delete from page_recall_strategy_detail where id = #{id,jdbcType=INTEGER}
|
|
|
</delete>
|
|
|
|
|
|
<insert id="insert">
|
|
|
insert ignore into page_recall_strategy_detail (id, page_id, recall_type, recall_percent, value_type, update_time, status)
|
|
|
values (#{record.id,jdbcType=INTEGER},
|
|
|
#{record.pageId,jdbcType=TINYINT},
|
|
|
#{record.recallType,jdbcType=INTEGER},
|
|
|
#{record.recallPercent,jdbcType=INTEGER},
|
|
|
#{record.valueType,jdbcType=TINYINT},
|
|
|
#{record.updateTime,jdbcType=INTEGER},
|
|
|
#{record.status,jdbcType=TINYINT})
|
|
|
</insert>
|
|
|
|
|
|
<update id="update">
|
|
|
update page_recall_strategy_detail
|
|
|
set page_id = #{record.pageId,jdbcType=TINYINT},
|
|
|
recall_type = #{record.recallType,jdbcType=INTEGER},
|
|
|
recall_percent = #{record.recallPercent,jdbcType=INTEGER},
|
|
|
value_type = #{record.valueType,jdbcType=TINYINT},
|
|
|
update_time = #{record.updateTime,jdbcType=INTEGER},
|
|
|
status = #{record.status,jdbcType=TINYINT}
|
|
|
where id = #{record.id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
|
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap">
|
|
|
select <include refid="Base_Column_List"/> from page_recall_strategy_detail
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</select>
|
|
|
|
|
|
<select id="getAllExistStrategies" resultMap="BaseResultMap">
|
|
|
SELECT <include refid="Base_Column_List" /> FROM page_recall_strategy_detail where status =1
|
|
|
</select>
|
|
|
|
|
|
</mapper> |
|
|
\ No newline at end of file |
...
|
...
|
|