Showing
1 changed file
with
272 additions
and
283 deletions
1 | -<?xml version="1.0" encoding="UTF-8" ?> | ||
2 | -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > | ||
3 | -<mapper namespace="com.yoho.search.dal.CutdownPriceProductMapper"> | ||
4 | - | ||
5 | - <resultMap id="BaseResultMap" type="com.yoho.search.dal.model.CutdownPriceProduct" > | ||
6 | - <id column="id" property="id" jdbcType="INTEGER" /> | ||
7 | - <result column="activity_id" property="activityId" jdbcType="INTEGER" /> | ||
8 | - <result column="product_skn" property="productSkn" jdbcType="INTEGER" /> | ||
9 | - <result column="create_time" property="createTime" jdbcType="INTEGER" /> | ||
10 | - <result column="update_time" property="updateTime" jdbcType="INTEGER" /> | ||
11 | - <result column="status" property="status" jdbcType="INTEGER" /> | ||
12 | - <result column="product_type" property="productType" jdbcType="INTEGER" /> | ||
13 | - <result column="platform_limit" property="platformLimit" jdbcType="INTEGER" /> | ||
14 | - <result column="show_limit" property="showLimit" jdbcType="INTEGER" /> | ||
15 | - <result column="cut_total_price" property="cutTotalPrice" jdbcType="DECIMAL" /> | ||
16 | - <result column="cut_yoho_low_percent" property="cutYohoLowPercent" jdbcType="DECIMAL" /> | ||
17 | - <result column="cut_yoho_high_percent" property="cutYohoHighPercent" jdbcType="DECIMAL" /> | ||
18 | - <result column="cut_grade" property="cutGrade" jdbcType="INTEGER" /> | ||
19 | - <result column="cut_grade_config" property="cutGradeConfig" jdbcType="VARCHAR" /> | ||
20 | - <result column="order_by" property="orderBy" jdbcType="INTEGER" /> | ||
21 | - <result column="join_num" property="joinNum" jdbcType="INTEGER" /> | ||
22 | - <result column="high_price" property="highPrice" jdbcType="DECIMAL" /> | ||
23 | - <result column="low_price" property="lowPrice" jdbcType="DECIMAL" /> | ||
24 | - </resultMap> | ||
25 | - | ||
26 | - <sql id="Base_Column_List" > | ||
27 | - id, activity_id, product_skn, create_time, update_time, status, product_type, platform_limit, | ||
28 | - show_limit, cut_total_price, cut_yoho_low_percent, cut_yoho_high_percent, cut_grade, | ||
29 | - cut_grade_config, order_by, join_num, high_price, low_price | ||
30 | - </sql> | ||
31 | - | ||
32 | - <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" > | ||
33 | - select | ||
34 | - <include refid="Base_Column_List" /> | ||
35 | - from cutdown_price_product | ||
36 | - where id = #{id,jdbcType=INTEGER} | ||
37 | - </select> | ||
38 | - | ||
39 | - <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" > | ||
40 | - delete from cutdown_price_product | ||
41 | - where id = #{id,jdbcType=INTEGER} | ||
42 | - </delete> | ||
43 | - | ||
44 | - <insert id="insert" parameterType="com.yoho.search.dal.model.CutdownPriceProduct" > | ||
45 | - insert into cutdown_price_product (id, activity_id, product_skn, | ||
46 | - create_time, update_time, status, | ||
47 | - product_type, platform_limit, show_limit, | ||
48 | - cut_total_price, cut_yoho_low_percent, cut_yoho_high_percent, | ||
49 | - cut_grade, cut_grade_config, order_by, | ||
50 | - join_num, high_price, low_price | ||
51 | - ) | ||
52 | - values (#{id,jdbcType=INTEGER}, #{activityId,jdbcType=INTEGER}, #{productSkn,jdbcType=INTEGER}, | ||
53 | - #{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, | ||
54 | - #{productType,jdbcType=INTEGER}, #{platformLimit,jdbcType=INTEGER}, #{showLimit,jdbcType=INTEGER}, | ||
55 | - #{cutTotalPrice,jdbcType=DECIMAL}, #{cutYohoLowPercent,jdbcType=DECIMAL}, #{cutYohoHighPercent,jdbcType=DECIMAL}, | ||
56 | - #{cutGrade,jdbcType=INTEGER}, #{cutGradeConfig,jdbcType=VARCHAR}, #{orderBy,jdbcType=INTEGER}, | ||
57 | - #{joinNum,jdbcType=INTEGER}, #{highPrice,jdbcType=DECIMAL}, #{lowPrice,jdbcType=DECIMAL} | ||
58 | - ) | ||
59 | - </insert> | ||
60 | - | ||
61 | - <insert id="insertSelective" parameterType="com.yoho.search.dal.model.CutdownPriceProduct" > | ||
62 | - insert into cutdown_price_product | ||
63 | - <trim prefix="(" suffix=")" suffixOverrides="," > | ||
64 | - <if test="id != null" > | ||
65 | - id, | ||
66 | - </if> | ||
67 | - <if test="activityId != null" > | ||
68 | - activity_id, | ||
69 | - </if> | ||
70 | - <if test="productSkn != null" > | ||
71 | - product_skn, | ||
72 | - </if> | ||
73 | - <if test="createTime != null" > | ||
74 | - create_time, | ||
75 | - </if> | ||
76 | - <if test="updateTime != null" > | ||
77 | - update_time, | ||
78 | - </if> | ||
79 | - <if test="status != null" > | ||
80 | - status, | ||
81 | - </if> | ||
82 | - <if test="productType != null" > | ||
83 | - product_type, | ||
84 | - </if> | ||
85 | - <if test="platformLimit != null" > | ||
86 | - platform_limit, | ||
87 | - </if> | ||
88 | - <if test="showLimit != null" > | ||
89 | - show_limit, | ||
90 | - </if> | ||
91 | - <if test="cutTotalPrice != null" > | ||
92 | - cut_total_price, | ||
93 | - </if> | ||
94 | - <if test="cutYohoLowPercent != null" > | ||
95 | - cut_yoho_low_percent, | ||
96 | - </if> | ||
97 | - <if test="cutYohoHighPercent != null" > | ||
98 | - cut_yoho_high_percent, | ||
99 | - </if> | ||
100 | - <if test="cutGrade != null" > | ||
101 | - cut_grade, | ||
102 | - </if> | ||
103 | - <if test="cutGradeConfig != null" > | ||
104 | - cut_grade_config, | ||
105 | - </if> | ||
106 | - <if test="orderBy != null" > | ||
107 | - order_by, | ||
108 | - </if> | ||
109 | - <if test="joinNum != null" > | ||
110 | - join_num, | ||
111 | - </if> | ||
112 | - <if test="highPrice != null" > | ||
113 | - high_price, | ||
114 | - </if> | ||
115 | - <if test="lowPrice != null" > | ||
116 | - low_price, | ||
117 | - </if> | ||
118 | - </trim> | ||
119 | - <trim prefix="values (" suffix=")" suffixOverrides="," > | ||
120 | - <if test="id != null" > | ||
121 | - #{id,jdbcType=INTEGER}, | ||
122 | - </if> | ||
123 | - <if test="activityId != null" > | ||
124 | - #{activityId,jdbcType=INTEGER}, | ||
125 | - </if> | ||
126 | - <if test="productSkn != null" > | ||
127 | - #{productSkn,jdbcType=INTEGER}, | ||
128 | - </if> | ||
129 | - <if test="createTime != null" > | ||
130 | - #{createTime,jdbcType=INTEGER}, | ||
131 | - </if> | ||
132 | - <if test="updateTime != null" > | ||
133 | - #{updateTime,jdbcType=INTEGER}, | ||
134 | - </if> | ||
135 | - <if test="status != null" > | ||
136 | - #{status,jdbcType=INTEGER}, | ||
137 | - </if> | ||
138 | - <if test="productType != null" > | ||
139 | - #{productType,jdbcType=INTEGER}, | ||
140 | - </if> | ||
141 | - <if test="platformLimit != null" > | ||
142 | - #{platformLimit,jdbcType=INTEGER}, | ||
143 | - </if> | ||
144 | - <if test="showLimit != null" > | ||
145 | - #{showLimit,jdbcType=INTEGER}, | ||
146 | - </if> | ||
147 | - <if test="cutTotalPrice != null" > | ||
148 | - #{cutTotalPrice,jdbcType=DECIMAL}, | ||
149 | - </if> | ||
150 | - <if test="cutYohoLowPercent != null" > | ||
151 | - #{cutYohoLowPercent,jdbcType=DECIMAL}, | ||
152 | - </if> | ||
153 | - <if test="cutYohoHighPercent != null" > | ||
154 | - #{cutYohoHighPercent,jdbcType=DECIMAL}, | ||
155 | - </if> | ||
156 | - <if test="cutGrade != null" > | ||
157 | - #{cutGrade,jdbcType=INTEGER}, | ||
158 | - </if> | ||
159 | - <if test="cutGradeConfig != null" > | ||
160 | - #{cutGradeConfig,jdbcType=VARCHAR}, | ||
161 | - </if> | ||
162 | - <if test="orderBy != null" > | ||
163 | - #{orderBy,jdbcType=INTEGER}, | ||
164 | - </if> | ||
165 | - <if test="joinNum != null" > | ||
166 | - #{joinNum,jdbcType=INTEGER}, | ||
167 | - </if> | ||
168 | - <if test="highPrice != null" > | ||
169 | - #{highPrice,jdbcType=DECIMAL}, | ||
170 | - </if> | ||
171 | - <if test="lowPrice != null" > | ||
172 | - #{lowPrice,jdbcType=DECIMAL}, | ||
173 | - </if> | ||
174 | - </trim> | ||
175 | - </insert> | ||
176 | - | ||
177 | - <update id="updateByPrimaryKeySelective" parameterType="com.yoho.search.dal.model.CutdownPriceProduct" > | ||
178 | - update cutdown_price_product | ||
179 | - <set > | ||
180 | - <if test="activityId != null" > | ||
181 | - activity_id = #{activityId,jdbcType=INTEGER}, | ||
182 | - </if> | ||
183 | - <if test="productSkn != null" > | ||
184 | - product_skn = #{productSkn,jdbcType=INTEGER}, | ||
185 | - </if> | ||
186 | - <if test="createTime != null" > | ||
187 | - create_time = #{createTime,jdbcType=INTEGER}, | ||
188 | - </if> | ||
189 | - <if test="updateTime != null" > | ||
190 | - update_time = #{updateTime,jdbcType=INTEGER}, | ||
191 | - </if> | ||
192 | - <if test="status != null" > | ||
193 | - status = #{status,jdbcType=INTEGER}, | ||
194 | - </if> | ||
195 | - <if test="productType != null" > | ||
196 | - product_type = #{productType,jdbcType=INTEGER}, | ||
197 | - </if> | ||
198 | - <if test="platformLimit != null" > | ||
199 | - platform_limit = #{platformLimit,jdbcType=INTEGER}, | ||
200 | - </if> | ||
201 | - <if test="showLimit != null" > | ||
202 | - show_limit = #{showLimit,jdbcType=INTEGER}, | ||
203 | - </if> | ||
204 | - <if test="cutTotalPrice != null" > | ||
205 | - cut_total_price = #{cutTotalPrice,jdbcType=DECIMAL}, | ||
206 | - </if> | ||
207 | - <if test="cutYohoLowPercent != null" > | ||
208 | - cut_yoho_low_percent = #{cutYohoLowPercent,jdbcType=DECIMAL}, | ||
209 | - </if> | ||
210 | - <if test="cutYohoHighPercent != null" > | ||
211 | - cut_yoho_high_percent = #{cutYohoHighPercent,jdbcType=DECIMAL}, | ||
212 | - </if> | ||
213 | - <if test="cutGrade != null" > | ||
214 | - cut_grade = #{cutGrade,jdbcType=INTEGER}, | ||
215 | - </if> | ||
216 | - <if test="cutGradeConfig != null" > | ||
217 | - cut_grade_config = #{cutGradeConfig,jdbcType=VARCHAR}, | ||
218 | - </if> | ||
219 | - <if test="orderBy != null" > | ||
220 | - order_by = #{orderBy,jdbcType=INTEGER}, | ||
221 | - </if> | ||
222 | - <if test="joinNum != null" > | ||
223 | - join_num = #{joinNum,jdbcType=INTEGER}, | ||
224 | - </if> | ||
225 | - <if test="highPrice != null" > | ||
226 | - high_price = #{highPrice,jdbcType=DECIMAL}, | ||
227 | - </if> | ||
228 | - <if test="lowPrice != null" > | ||
229 | - low_price = #{lowPrice,jdbcType=DECIMAL}, | ||
230 | - </if> | ||
231 | - </set> | ||
232 | - where id = #{id,jdbcType=INTEGER} | ||
233 | - </update> | ||
234 | - | ||
235 | - <update id="updateByPrimaryKey" parameterType="com.yoho.search.dal.model.CutdownPriceProduct" > | ||
236 | - update cutdown_price_product | ||
237 | - set activity_id = #{activityId,jdbcType=INTEGER}, | ||
238 | - product_skn = #{productSkn,jdbcType=INTEGER}, | ||
239 | - create_time = #{createTime,jdbcType=INTEGER}, | ||
240 | - update_time = #{updateTime,jdbcType=INTEGER}, | ||
241 | - status = #{status,jdbcType=INTEGER}, | ||
242 | - product_type = #{productType,jdbcType=INTEGER}, | ||
243 | - platform_limit = #{platformLimit,jdbcType=INTEGER}, | ||
244 | - show_limit = #{showLimit,jdbcType=INTEGER}, | ||
245 | - cut_total_price = #{cutTotalPrice,jdbcType=DECIMAL}, | ||
246 | - cut_yoho_low_percent = #{cutYohoLowPercent,jdbcType=DECIMAL}, | ||
247 | - cut_yoho_high_percent = #{cutYohoHighPercent,jdbcType=DECIMAL}, | ||
248 | - cut_grade = #{cutGrade,jdbcType=INTEGER}, | ||
249 | - cut_grade_config = #{cutGradeConfig,jdbcType=VARCHAR}, | ||
250 | - order_by = #{orderBy,jdbcType=INTEGER}, | ||
251 | - join_num = #{joinNum,jdbcType=INTEGER}, | ||
252 | - high_price = #{highPrice,jdbcType=DECIMAL}, | ||
253 | - low_price = #{lowPrice,jdbcType=DECIMAL} | ||
254 | - where id = #{id,jdbcType=INTEGER} | ||
255 | - </update> | ||
256 | - | ||
257 | - <select id="selectCount" resultType="java.lang.Integer" timeout="20000"> | ||
258 | - SELECT count(1) FROM cutdown_price_product | ||
259 | - </select> | ||
260 | - | ||
261 | - <select id="selectPageLists" resultMap="BaseResultMap" timeout="20000"> | ||
262 | - select | ||
263 | - <include refid="Base_Column_List"/> | ||
264 | - from cutdown_price_product limit #{offset},#{pageSize} | ||
265 | - </select> | ||
266 | - | ||
267 | - <select id="selectListByActivityIdsAndSkns" resultMap="BaseResultMap" timeout="20000"> | ||
268 | - select | ||
269 | - <include refid="Base_Column_List"/> | ||
270 | - from cutdown_price_product | ||
271 | - where activity_id in | ||
272 | - <foreach item="item" index="index" collection="activityIds" | ||
273 | - open="(" separator="," close=")"> | ||
274 | - #{item} | ||
275 | - </foreach> | ||
276 | - and product_skn in | ||
277 | - <foreach item="item" index="index" collection="productSkns" | ||
278 | - open="(" separator="," close=")"> | ||
279 | - #{item} | ||
280 | - </foreach> | ||
281 | - and status = #{status,jdbcType=TINYINT} | ||
282 | - </select> | ||
283 | - | 1 | +<?xml version="1.0" encoding="UTF-8" ?> |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > | ||
3 | +<mapper namespace="com.yoho.search.dal.CutdownPriceProductMapper"> | ||
4 | + | ||
5 | + <resultMap id="BaseResultMap" type="com.yoho.search.dal.model.CutdownPriceProduct" > | ||
6 | + <id column="id" property="id" jdbcType="INTEGER" /> | ||
7 | + <result column="activity_id" property="activityId" jdbcType="INTEGER" /> | ||
8 | + <result column="product_skn" property="productSkn" jdbcType="INTEGER" /> | ||
9 | + <result column="create_time" property="createTime" jdbcType="INTEGER" /> | ||
10 | + <result column="update_time" property="updateTime" jdbcType="INTEGER" /> | ||
11 | + <result column="status" property="status" jdbcType="INTEGER" /> | ||
12 | + <result column="product_type" property="productType" jdbcType="INTEGER" /> | ||
13 | + <result column="platform_limit" property="platformLimit" jdbcType="INTEGER" /> | ||
14 | + <result column="cut_total_price" property="cutTotalPrice" jdbcType="DECIMAL" /> | ||
15 | + <result column="cut_yoho_low_percent" property="cutYohoLowPercent" jdbcType="DECIMAL" /> | ||
16 | + <result column="cut_yoho_high_percent" property="cutYohoHighPercent" jdbcType="DECIMAL" /> | ||
17 | + <result column="cut_grade" property="cutGrade" jdbcType="INTEGER" /> | ||
18 | + <result column="cut_grade_config" property="cutGradeConfig" jdbcType="VARCHAR" /> | ||
19 | + <result column="order_by" property="orderBy" jdbcType="INTEGER" /> | ||
20 | + <result column="join_num" property="joinNum" jdbcType="INTEGER" /> | ||
21 | + <result column="high_price" property="highPrice" jdbcType="DECIMAL" /> | ||
22 | + <result column="low_price" property="lowPrice" jdbcType="DECIMAL" /> | ||
23 | + </resultMap> | ||
24 | + | ||
25 | + <sql id="Base_Column_List" > | ||
26 | + id, activity_id, product_skn, create_time, update_time, status, product_type, platform_limit, | ||
27 | + cut_total_price, cut_yoho_low_percent, cut_yoho_high_percent, cut_grade, | ||
28 | + cut_grade_config, order_by, join_num, high_price, low_price | ||
29 | + </sql> | ||
30 | + | ||
31 | + <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" > | ||
32 | + select | ||
33 | + <include refid="Base_Column_List" /> | ||
34 | + from cutdown_price_product | ||
35 | + where id = #{id,jdbcType=INTEGER} | ||
36 | + </select> | ||
37 | + | ||
38 | + <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" > | ||
39 | + delete from cutdown_price_product | ||
40 | + where id = #{id,jdbcType=INTEGER} | ||
41 | + </delete> | ||
42 | + | ||
43 | + <insert id="insert" parameterType="com.yoho.search.dal.model.CutdownPriceProduct" > | ||
44 | + insert into cutdown_price_product (id, activity_id, product_skn, | ||
45 | + create_time, update_time, status, | ||
46 | + product_type, platform_limit, | ||
47 | + cut_total_price, cut_yoho_low_percent, cut_yoho_high_percent, | ||
48 | + cut_grade, cut_grade_config, order_by, | ||
49 | + join_num, high_price, low_price | ||
50 | + ) | ||
51 | + values (#{id,jdbcType=INTEGER}, #{activityId,jdbcType=INTEGER}, #{productSkn,jdbcType=INTEGER}, | ||
52 | + #{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, | ||
53 | + #{productType,jdbcType=INTEGER}, #{platformLimit,jdbcType=INTEGER}, | ||
54 | + #{cutTotalPrice,jdbcType=DECIMAL}, #{cutYohoLowPercent,jdbcType=DECIMAL}, #{cutYohoHighPercent,jdbcType=DECIMAL}, | ||
55 | + #{cutGrade,jdbcType=INTEGER}, #{cutGradeConfig,jdbcType=VARCHAR}, #{orderBy,jdbcType=INTEGER}, | ||
56 | + #{joinNum,jdbcType=INTEGER}, #{highPrice,jdbcType=DECIMAL}, #{lowPrice,jdbcType=DECIMAL} | ||
57 | + ) | ||
58 | + </insert> | ||
59 | + | ||
60 | + <insert id="insertSelective" parameterType="com.yoho.search.dal.model.CutdownPriceProduct" > | ||
61 | + insert into cutdown_price_product | ||
62 | + <trim prefix="(" suffix=")" suffixOverrides="," > | ||
63 | + <if test="id != null" > | ||
64 | + id, | ||
65 | + </if> | ||
66 | + <if test="activityId != null" > | ||
67 | + activity_id, | ||
68 | + </if> | ||
69 | + <if test="productSkn != null" > | ||
70 | + product_skn, | ||
71 | + </if> | ||
72 | + <if test="createTime != null" > | ||
73 | + create_time, | ||
74 | + </if> | ||
75 | + <if test="updateTime != null" > | ||
76 | + update_time, | ||
77 | + </if> | ||
78 | + <if test="status != null" > | ||
79 | + status, | ||
80 | + </if> | ||
81 | + <if test="productType != null" > | ||
82 | + product_type, | ||
83 | + </if> | ||
84 | + <if test="platformLimit != null" > | ||
85 | + platform_limit, | ||
86 | + </if> | ||
87 | + <if test="cutTotalPrice != null" > | ||
88 | + cut_total_price, | ||
89 | + </if> | ||
90 | + <if test="cutYohoLowPercent != null" > | ||
91 | + cut_yoho_low_percent, | ||
92 | + </if> | ||
93 | + <if test="cutYohoHighPercent != null" > | ||
94 | + cut_yoho_high_percent, | ||
95 | + </if> | ||
96 | + <if test="cutGrade != null" > | ||
97 | + cut_grade, | ||
98 | + </if> | ||
99 | + <if test="cutGradeConfig != null" > | ||
100 | + cut_grade_config, | ||
101 | + </if> | ||
102 | + <if test="orderBy != null" > | ||
103 | + order_by, | ||
104 | + </if> | ||
105 | + <if test="joinNum != null" > | ||
106 | + join_num, | ||
107 | + </if> | ||
108 | + <if test="highPrice != null" > | ||
109 | + high_price, | ||
110 | + </if> | ||
111 | + <if test="lowPrice != null" > | ||
112 | + low_price, | ||
113 | + </if> | ||
114 | + </trim> | ||
115 | + <trim prefix="values (" suffix=")" suffixOverrides="," > | ||
116 | + <if test="id != null" > | ||
117 | + #{id,jdbcType=INTEGER}, | ||
118 | + </if> | ||
119 | + <if test="activityId != null" > | ||
120 | + #{activityId,jdbcType=INTEGER}, | ||
121 | + </if> | ||
122 | + <if test="productSkn != null" > | ||
123 | + #{productSkn,jdbcType=INTEGER}, | ||
124 | + </if> | ||
125 | + <if test="createTime != null" > | ||
126 | + #{createTime,jdbcType=INTEGER}, | ||
127 | + </if> | ||
128 | + <if test="updateTime != null" > | ||
129 | + #{updateTime,jdbcType=INTEGER}, | ||
130 | + </if> | ||
131 | + <if test="status != null" > | ||
132 | + #{status,jdbcType=INTEGER}, | ||
133 | + </if> | ||
134 | + <if test="productType != null" > | ||
135 | + #{productType,jdbcType=INTEGER}, | ||
136 | + </if> | ||
137 | + <if test="platformLimit != null" > | ||
138 | + #{platformLimit,jdbcType=INTEGER}, | ||
139 | + </if> | ||
140 | + <if test="cutTotalPrice != null" > | ||
141 | + #{cutTotalPrice,jdbcType=DECIMAL}, | ||
142 | + </if> | ||
143 | + <if test="cutYohoLowPercent != null" > | ||
144 | + #{cutYohoLowPercent,jdbcType=DECIMAL}, | ||
145 | + </if> | ||
146 | + <if test="cutYohoHighPercent != null" > | ||
147 | + #{cutYohoHighPercent,jdbcType=DECIMAL}, | ||
148 | + </if> | ||
149 | + <if test="cutGrade != null" > | ||
150 | + #{cutGrade,jdbcType=INTEGER}, | ||
151 | + </if> | ||
152 | + <if test="cutGradeConfig != null" > | ||
153 | + #{cutGradeConfig,jdbcType=VARCHAR}, | ||
154 | + </if> | ||
155 | + <if test="orderBy != null" > | ||
156 | + #{orderBy,jdbcType=INTEGER}, | ||
157 | + </if> | ||
158 | + <if test="joinNum != null" > | ||
159 | + #{joinNum,jdbcType=INTEGER}, | ||
160 | + </if> | ||
161 | + <if test="highPrice != null" > | ||
162 | + #{highPrice,jdbcType=DECIMAL}, | ||
163 | + </if> | ||
164 | + <if test="lowPrice != null" > | ||
165 | + #{lowPrice,jdbcType=DECIMAL}, | ||
166 | + </if> | ||
167 | + </trim> | ||
168 | + </insert> | ||
169 | + | ||
170 | + <update id="updateByPrimaryKeySelective" parameterType="com.yoho.search.dal.model.CutdownPriceProduct" > | ||
171 | + update cutdown_price_product | ||
172 | + <set > | ||
173 | + <if test="activityId != null" > | ||
174 | + activity_id = #{activityId,jdbcType=INTEGER}, | ||
175 | + </if> | ||
176 | + <if test="productSkn != null" > | ||
177 | + product_skn = #{productSkn,jdbcType=INTEGER}, | ||
178 | + </if> | ||
179 | + <if test="createTime != null" > | ||
180 | + create_time = #{createTime,jdbcType=INTEGER}, | ||
181 | + </if> | ||
182 | + <if test="updateTime != null" > | ||
183 | + update_time = #{updateTime,jdbcType=INTEGER}, | ||
184 | + </if> | ||
185 | + <if test="status != null" > | ||
186 | + status = #{status,jdbcType=INTEGER}, | ||
187 | + </if> | ||
188 | + <if test="productType != null" > | ||
189 | + product_type = #{productType,jdbcType=INTEGER}, | ||
190 | + </if> | ||
191 | + <if test="platformLimit != null" > | ||
192 | + platform_limit = #{platformLimit,jdbcType=INTEGER}, | ||
193 | + </if> | ||
194 | + <if test="cutTotalPrice != null" > | ||
195 | + cut_total_price = #{cutTotalPrice,jdbcType=DECIMAL}, | ||
196 | + </if> | ||
197 | + <if test="cutYohoLowPercent != null" > | ||
198 | + cut_yoho_low_percent = #{cutYohoLowPercent,jdbcType=DECIMAL}, | ||
199 | + </if> | ||
200 | + <if test="cutYohoHighPercent != null" > | ||
201 | + cut_yoho_high_percent = #{cutYohoHighPercent,jdbcType=DECIMAL}, | ||
202 | + </if> | ||
203 | + <if test="cutGrade != null" > | ||
204 | + cut_grade = #{cutGrade,jdbcType=INTEGER}, | ||
205 | + </if> | ||
206 | + <if test="cutGradeConfig != null" > | ||
207 | + cut_grade_config = #{cutGradeConfig,jdbcType=VARCHAR}, | ||
208 | + </if> | ||
209 | + <if test="orderBy != null" > | ||
210 | + order_by = #{orderBy,jdbcType=INTEGER}, | ||
211 | + </if> | ||
212 | + <if test="joinNum != null" > | ||
213 | + join_num = #{joinNum,jdbcType=INTEGER}, | ||
214 | + </if> | ||
215 | + <if test="highPrice != null" > | ||
216 | + high_price = #{highPrice,jdbcType=DECIMAL}, | ||
217 | + </if> | ||
218 | + <if test="lowPrice != null" > | ||
219 | + low_price = #{lowPrice,jdbcType=DECIMAL}, | ||
220 | + </if> | ||
221 | + </set> | ||
222 | + where id = #{id,jdbcType=INTEGER} | ||
223 | + </update> | ||
224 | + | ||
225 | + <update id="updateByPrimaryKey" parameterType="com.yoho.search.dal.model.CutdownPriceProduct" > | ||
226 | + update cutdown_price_product | ||
227 | + set activity_id = #{activityId,jdbcType=INTEGER}, | ||
228 | + product_skn = #{productSkn,jdbcType=INTEGER}, | ||
229 | + create_time = #{createTime,jdbcType=INTEGER}, | ||
230 | + update_time = #{updateTime,jdbcType=INTEGER}, | ||
231 | + status = #{status,jdbcType=INTEGER}, | ||
232 | + product_type = #{productType,jdbcType=INTEGER}, | ||
233 | + platform_limit = #{platformLimit,jdbcType=INTEGER}, | ||
234 | + cut_total_price = #{cutTotalPrice,jdbcType=DECIMAL}, | ||
235 | + cut_yoho_low_percent = #{cutYohoLowPercent,jdbcType=DECIMAL}, | ||
236 | + cut_yoho_high_percent = #{cutYohoHighPercent,jdbcType=DECIMAL}, | ||
237 | + cut_grade = #{cutGrade,jdbcType=INTEGER}, | ||
238 | + cut_grade_config = #{cutGradeConfig,jdbcType=VARCHAR}, | ||
239 | + order_by = #{orderBy,jdbcType=INTEGER}, | ||
240 | + join_num = #{joinNum,jdbcType=INTEGER}, | ||
241 | + high_price = #{highPrice,jdbcType=DECIMAL}, | ||
242 | + low_price = #{lowPrice,jdbcType=DECIMAL} | ||
243 | + where id = #{id,jdbcType=INTEGER} | ||
244 | + </update> | ||
245 | + | ||
246 | + <select id="selectCount" resultType="java.lang.Integer" timeout="20000"> | ||
247 | + SELECT count(1) FROM cutdown_price_product | ||
248 | + </select> | ||
249 | + | ||
250 | + <select id="selectPageLists" resultMap="BaseResultMap" timeout="20000"> | ||
251 | + select | ||
252 | + <include refid="Base_Column_List"/> | ||
253 | + from cutdown_price_product limit #{offset},#{pageSize} | ||
254 | + </select> | ||
255 | + | ||
256 | + <select id="selectListByActivityIdsAndSkns" resultMap="BaseResultMap" timeout="20000"> | ||
257 | + select | ||
258 | + <include refid="Base_Column_List"/> | ||
259 | + from cutdown_price_product | ||
260 | + where activity_id in | ||
261 | + <foreach item="item" index="index" collection="activityIds" | ||
262 | + open="(" separator="," close=")"> | ||
263 | + #{item} | ||
264 | + </foreach> | ||
265 | + and product_skn in | ||
266 | + <foreach item="item" index="index" collection="productSkns" | ||
267 | + open="(" separator="," close=")"> | ||
268 | + #{item} | ||
269 | + </foreach> | ||
270 | + and status = #{status,jdbcType=TINYINT} | ||
271 | + </select> | ||
272 | + | ||
284 | </mapper> | 273 | </mapper> |
-
Please register or login to post a comment