CsRecallConfigProductMapper.xml
4.24 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?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.CsRecallConfigProductMapper">
<resultMap id="BaseResultMap" type="com.yoho.search.dal.model.CsRecallConfigProduct">
<id column="id" property="id" jdbcType="INTEGER"/>
<result column="config_page" property="configPage" jdbcType="INTEGER"/>
<result column="config_type" property="configType" jdbcType="VARCHAR"/>
<result column="config_type_id" property="configTypeId" jdbcType="VARCHAR"/>
<result column="config_status" property="configStatus" jdbcType="INTEGER"/>
<result column="new_shelve" property="newShelve" jdbcType="INTEGER"/>
<result column="promotion" property="promotion" jdbcType="INTEGER"/>
<result column="reduce_price" property="reducePrice" jdbcType="INTEGER"/>
<result column="ctr_value" property="ctrValue" jdbcType="INTEGER"/>
<result column="heat_value" property="heatValue" jdbcType="INTEGER"/>
<result column="random" property="random" jdbcType="INTEGER"/>
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
</resultMap>
<sql id="Base_Column_List">
id, config_page, config_type,config_type_id,config_status,new_shelve,promotion,reduce_price,ctr_value,heat_value,random,update_time
</sql>
<insert id="insert" parameterType="com.yoho.search.dal.model.CsRecallConfigProduct" timeout="20000">
insert ignore into cs_recall_config_product (id,config_page,config_type, config_type_id,config_status,new_shelve,promotion,reduce_price,ctr_value,heat_value,random)
values (#{id,jdbcType=INTEGER},#{configPage,jdbcType=INTEGER},#{configType,jdbcType=VARCHAR}, #{configTypeId,jdbcType=INTEGER}, #{configStatus,jdbcType=INTEGER}, #{newShelve,jdbcType=INTEGER},#{promotion,jdbcType=INTEGER}, #{reducePrice,jdbcType=INTEGER}, #{ctrValue,jdbcType=INTEGER}, #{heatValue,jdbcType=INTEGER}, #{random,jdbcType=INTEGER})
</insert>
<update id="updateByPrimaryKey" parameterType="com.yoho.search.dal.model.CsRecallConfigProduct" timeout="20000">
update cs_recall_config_product
<set>
<if test="configPage != null">
config_page = #{configPage,jdbcType=INTEGER},
</if>
<if test="configType != null">
config_type = #{configType,jdbcType=VARCHAR},
</if>
<if test="configTypeId != null">
config_type_id = #{configTypeId,jdbcType=VARCHAR},
</if>
<if test="configStatus != null">
config_status = #{configStatus,jdbcType=INTEGER},
</if>
<if test="newShelve != null">
new_shelve = #{newShelve,jdbcType=INTEGER},
</if>
<if test="promotion != null">
promotion = #{promotion,jdbcType=INTEGER},
</if>
<if test="reducePrice != null">
reduce_price = #{reducePrice,jdbcType=INTEGER},
</if>
<if test="ctrValue != null">
ctr_value = #{ctrValue,jdbcType=INTEGER},
</if>
<if test="heatValue != null">
heat_value = #{heatValue,jdbcType=INTEGER},
</if>
<if test="random != null">
random = #{random,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" timeout="20000">
select
<include refid="Base_Column_List"/>
from cs_recall_config_product
where id = #{id,jdbcType=INTEGER}
LIMIT 1
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" timeout="20000">
delete from cs_recall_config_product
where id = #{id,jdbcType=INTEGER}
</delete>
<select id="selectCount" resultType="int">
select count(0) from cs_recall_config_product
</select>
<select id="selectPageLists" resultMap="BaseResultMap" timeout="20000">
select <include refid="Base_Column_List" /> from cs_recall_config_product limit #{start}, #{limit}
</select>
</mapper>