DynamicRulePageRelMapper.xml 1.77 KB
<?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.DynamicRulePageRelMapper">
	<resultMap id="DynamicRulePageRelResultMap" type="com.yoho.search.dal.model.DynamicRulePageRel">
		<id column="id" property="id" jdbcType="INTEGER" />
		<result column="rule_id" property="ruleId" jdbcType="INTEGER" />
		<result column="page_type" property="pageType" jdbcType="INTEGER" />
		<result column="status" property="status" jdbcType="INTEGER" />
	</resultMap>
	<sql id="DynamicRulePageRel_Column_List">
		id, rule_id, page_type, status
	</sql>

	<insert id="insert" parameterType="com.yoho.search.dal.model.DynamicRulePageRel">
		insert ignore into dynamic_rule_page_rel (id, rule_id, page_type, status)
		values (#{id, jdbcType=INTEGER},
		#{ruleId, jdbcType=INTEGER},
		#{pageType, jdbcType=INTEGER},
		#{status, jdbcType=INTEGER})
	</insert>

	<select id="selectById" resultMap="DynamicRulePageRelResultMap" parameterType="java.lang.Integer">
		select <include refid="DynamicRulePageRel_Column_List"/> from dynamic_rule_page_rel where id = #{id, jdbcType=INTEGER}
	</select>

	<select id="selectAll" resultMap="DynamicRulePageRelResultMap">
		select <include refid="DynamicRulePageRel_Column_List"/> from dynamic_rule_page_rel
	</select>

	<update id="updateById" parameterType="com.yoho.search.dal.model.DynamicRulePageRel">
		update dynamic_rule_page_rel
		set rule_id = #{ruleId, jdbcType=INTEGER},
		page_type = #{pageType,jdbcType=INTEGER},
		status = #{status, jdbcType=INTEGER}
		where id = #{id, jdbcType=INTEGER}
	</update>

	<delete id="delete" parameterType="java.lang.Integer">
		delete from dynamic_rule_page_rel where id = #{id, jdbcType=INTEGER}
	</delete>
</mapper>