ProductExtMapper.xml
6.81 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<?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.ProductExtMapper" >
<resultMap id="BaseResultMap" type="com.yoho.search.dal.model.ProductExt" >
<id column="product_skn" property="productSkn" jdbcType="INTEGER" />
<result column="product_desc" property="productDesc" jdbcType="LONGVARCHAR" />
<result column="recommend" property="recommend" jdbcType="LONGVARCHAR" />
<result column="is_hostsell" property="isHostsell" jdbcType="CHAR" />
<result column="shelves_day" property="shelvesDay" jdbcType="INTEGER" />
<result column="search_keys" property="searchKeys" jdbcType="VARCHAR" />
<result column="vedio_url" property="vedioUrl" jdbcType="VARCHAR" />
<result column="make_crafts" property="makeCrafts" jdbcType="VARCHAR" />
<result column="brand_series" property="brandSeries" jdbcType="VARCHAR" />
<result column="brand_model" property="brandModel" jdbcType="VARCHAR" />
<result column="reject_reason" property="rejectReason" jdbcType="VARCHAR" />
<result column="deposit" property="deposit" jdbcType="DECIMAL" />
<result column="buy_time" property="buyTime" jdbcType="INTEGER" />
<result column="delay_arrival_notice" property="delayArrivalNotice" jdbcType="VARCHAR" />
<result column="advance_begin_time" property="advanceBeginTime" jdbcType="INTEGER" />
<result column="advance_end_time" property="advanceEndTime" jdbcType="INTEGER" />
<result column="deposit_multiples" property="depositMultiples" jdbcType="INTEGER" />
<result column="advance_price" property="advancePrice" jdbcType="DECIMAL" />
<result column="balance_time" property="balanceTime" jdbcType="INTEGER" />
<result column="skn_default_img" property="sknDefaultImg" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
product_skn, product_desc, recommend, is_hostsell, shelves_day, search_keys, vedio_url,
make_crafts, brand_series, brand_model, reject_reason, deposit, buy_time, delay_arrival_notice,
advance_begin_time, advance_end_time, deposit_multiples, advance_price, balance_time,
skn_default_img
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from product_ext
where product_skn = #{productSkn,jdbcType=INTEGER}
limit 1
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
delete from product_ext
where product_skn = #{productSkn,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.yoho.search.dal.model.ProductExt" >
insert into product_ext (product_skn, product_desc, recommend,
is_hostsell, shelves_day, search_keys,
vedio_url, make_crafts, brand_series,
brand_model, reject_reason, deposit,
buy_time, delay_arrival_notice, advance_begin_time,
advance_end_time, deposit_multiples, advance_price,
balance_time, skn_default_img)
values (#{productSkn,jdbcType=INTEGER}, #{productDesc,jdbcType=VARCHAR}, #{recommend,jdbcType=VARCHAR},
#{isHostsell,jdbcType=CHAR}, #{shelvesDay,jdbcType=INTEGER}, #{searchKeys,jdbcType=VARCHAR},
#{vedioUrl,jdbcType=VARCHAR}, #{makeCrafts,jdbcType=VARCHAR}, #{brandSeries,jdbcType=VARCHAR},
#{brandModel,jdbcType=VARCHAR}, #{rejectReason,jdbcType=VARCHAR}, #{deposit,jdbcType=DECIMAL},
#{buyTime,jdbcType=INTEGER}, #{delayArrivalNotice,jdbcType=VARCHAR}, #{advanceBeginTime,jdbcType=INTEGER},
#{advanceEndTime,jdbcType=INTEGER}, #{depositMultiples,jdbcType=INTEGER}, #{advancePrice,jdbcType=DECIMAL},
#{balanceTime,jdbcType=INTEGER}, #{sknDefaultImg,jdbcType=VARCHAR})
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.yoho.search.dal.model.ProductExt" >
update product_ext
<set >
<if test="productDesc != null" >
product_desc = #{productDesc,jdbcType=VARCHAR},
</if>
<if test="recommend != null" >
recommend = #{recommend,jdbcType=VARCHAR},
</if>
<if test="isHostsell != null" >
is_hostsell = #{isHostsell,jdbcType=CHAR},
</if>
<if test="shelvesDay != null" >
shelves_day = #{shelvesDay,jdbcType=INTEGER},
</if>
<if test="searchKeys != null" >
search_keys = #{searchKeys,jdbcType=VARCHAR},
</if>
<if test="vedioUrl != null" >
vedio_url = #{vedioUrl,jdbcType=VARCHAR},
</if>
<if test="makeCrafts != null" >
make_crafts = #{makeCrafts,jdbcType=VARCHAR},
</if>
<if test="brandSeries != null" >
brand_series = #{brandSeries,jdbcType=VARCHAR},
</if>
<if test="brandModel != null" >
brand_model = #{brandModel,jdbcType=VARCHAR},
</if>
<if test="rejectReason != null" >
reject_reason = #{rejectReason,jdbcType=VARCHAR},
</if>
<if test="deposit != null" >
deposit = #{deposit,jdbcType=DECIMAL},
</if>
<if test="buyTime != null" >
buy_time = #{buyTime,jdbcType=INTEGER},
</if>
<if test="delayArrivalNotice != null" >
delay_arrival_notice = #{delayArrivalNotice,jdbcType=VARCHAR},
</if>
<if test="advanceBeginTime != null" >
advance_begin_time = #{advanceBeginTime,jdbcType=INTEGER},
</if>
<if test="advanceEndTime != null" >
advance_end_time = #{advanceEndTime,jdbcType=INTEGER},
</if>
<if test="depositMultiples != null" >
deposit_multiples = #{depositMultiples,jdbcType=INTEGER},
</if>
<if test="advancePrice != null" >
advance_price = #{advancePrice,jdbcType=DECIMAL},
</if>
<if test="balanceTime != null" >
balance_time = #{balanceTime,jdbcType=INTEGER},
</if>
<if test="sknDefaultImg != null" >
skn_default_img = #{sknDefaultImg,jdbcType=VARCHAR},
</if>
</set>
where product_skn = #{productSkn,jdbcType=INTEGER}
</update>
<select id="selectBySkns" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from product_ext
where product_skn in
<foreach item="item" index="index" collection="skns"
open="(" separator="," close=")">
#{item}
</foreach>
</select>
</mapper>