DynamicRulePageRelMapper.xml
1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?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>