Showing
1 changed file
with
781 additions
and
0 deletions
inferface-document/limitProduct_update.md
0 → 100644
1 | +# 平台端限定商品接口服务定义 | ||
2 | +--------------------- | ||
3 | + | ||
4 | + | ||
5 | +# 获取限定商品列表接口 | ||
6 | + | ||
7 | +> 接口名: `/limitProduct/getLimitProductList` | ||
8 | + | ||
9 | +### 方法 | ||
10 | +> POST JSONRAW | ||
11 | + | ||
12 | +### 入参 | ||
13 | + | ||
14 | +------------------------- | ||
15 | +|属性名称|类型|例子|说明|是否必填|长度限制| | ||
16 | +|-------|----|----|----|-------|--------| | ||
17 | +|productName|String|活动23451|限定商品名称|否|255 | ||
18 | +|productSkn|String||限定商品SKN|否|11 | ||
19 | +|showFlag|String|0|是否前台展示状态,0:不展示 1:展示|否|11 | ||
20 | +|hotFlag|String|0|是否热门商品,0:非热门 1:热门|否|11 | ||
21 | +-------------------------------- | ||
22 | + | ||
23 | +```xml | ||
24 | + <select id="selectLimitProductList" resultMap="BaseResultMap" parameterType="com.yohobuy.platform.model.product.req.LimitProductReq" > | ||
25 | + select | ||
26 | + <include refid="Base_Column_List" /> | ||
27 | + from limit_product p | ||
28 | + where 1=1 | ||
29 | + <if test="id != null and id != ''" > | ||
30 | + and p.id = #{id,jdbcType=INTEGER} | ||
31 | + </if> | ||
32 | + | ||
33 | + <if test="productSkn != null and productSkn != ''" > | ||
34 | + and p.productSkn=#{productSkn,jdbcType=INTEGER} | ||
35 | + </if> | ||
36 | + | ||
37 | + <if test="productName != null and productName != ''" > | ||
38 | + and p.productName like '%' #{productName,jdbcType=VARCHAR} '%' | ||
39 | + </if> | ||
40 | + | ||
41 | + <if test="status != null and status != ''" > | ||
42 | + and p.status = #{status,jdbcType=VARCHAR} | ||
43 | + </if> | ||
44 | + | ||
45 | + <if test="batchNo != null and batchNo != ''" > | ||
46 | + and p.batchno like '%' #{batchNo,jdbcType=VARCHAR} '%' | ||
47 | + </if> | ||
48 | + | ||
49 | + <if test="hotFlag != null and hotFlag != ''" > | ||
50 | + and p.hotFlag = #{hotFlag,jdbcType=VARCHAR} | ||
51 | + </if> | ||
52 | + | ||
53 | + <if test="showFlag != null and showFlag != ''" > | ||
54 | + and p.showFlag = #{showFlag,jdbcType=VARCHAR} | ||
55 | + </if> | ||
56 | + | ||
57 | + <if test="saleFlag != null and saleFlag != '' and saleFlag == 1" > | ||
58 | + and p.sale_time < #{currentTime,jdbcType=INTEGER} | ||
59 | + </if> | ||
60 | + | ||
61 | + <if test="saleFlag != null and saleFlag != '' and saleFlag == 0" > | ||
62 | + and p.sale_time > #{currentTime,jdbcType=INTEGER} | ||
63 | + </if> | ||
64 | + | ||
65 | + order by p.create_time desc limit #{offset},#{limit} | ||
66 | + </select> | ||
67 | +``` | ||
68 | + | ||
69 | +```xml | ||
70 | +<select id="selectLimitProductAttachByProductIds" resultMap="BaseResultMap" parameterType="java.lang.Integer" > | ||
71 | + select | ||
72 | + <include refid="Base_Column_List" /> | ||
73 | + from limit_product_attach p | ||
74 | + where | ||
75 | + <foreach item="item" collection="list" index="index" separator="or" open="(" close=")"> | ||
76 | + p.product_id = #{item} | ||
77 | + </foreach> | ||
78 | + </select> | ||
79 | +``` | ||
80 | + | ||
81 | +### 响应码 | ||
82 | + | ||
83 | +------------------------- | ||
84 | +|响应码code|消息|说明| | ||
85 | +|--------|----|----| | ||
86 | +|200|获取列表成功| | | ||
87 | + | ||
88 | +### 返回 | ||
89 | + | ||
90 | +``` json | ||
91 | +{ | ||
92 | + "code": 200, | ||
93 | + "message": "", | ||
94 | + "data": { | ||
95 | + "code": 200, | ||
96 | + "data": { | ||
97 | + "list": [ | ||
98 | + { | ||
99 | + "attachUrl": "http://img10.static.yhbimg.com/goodsimg/2016/04/20/10/01c1d3796667ec0d12080ba1eba717d496.jpg", | ||
100 | + "dayFlag": 1, | ||
101 | + "hotFlag": 0, | ||
102 | + "id": 406, | ||
103 | + "limitProductCode": "2016042018243782", | ||
104 | + "notSaleOrderBy": 0, | ||
105 | + "orderBy": 0, | ||
106 | + "productName": "限购测试商品用例", | ||
107 | + "productSkn": 50000181, | ||
108 | + "saleFlag": 1, | ||
109 | + "saleTime": 1461206700, | ||
110 | + "saleTimeStr": "2016-04-21 10:45:00", | ||
111 | + "showFlag": 1, | ||
112 | + "status": 1 | ||
113 | + }, | ||
114 | + { | ||
115 | + "attachUrl": "http://img10.static.yhbimg.com/goodsimg/2016/03/25/11/01ae6f53f9906bbb25dc5b4c71e2ce4522.jpg", | ||
116 | + "dayFlag": 1, | ||
117 | + "hotFlag": 0, | ||
118 | + "id": 379, | ||
119 | + "limitProductCode": "201603251101546", | ||
120 | + "notSaleOrderBy": 0, | ||
121 | + "orderBy": 1, | ||
122 | + "productName": "wy-基线测试-分享获取限购码1-001", | ||
123 | + "productSkn": 51144575, | ||
124 | + "saleFlag": 1, | ||
125 | + "saleTime": 1458835200, | ||
126 | + "saleTimeStr": "2016-03-25 00:00:00", | ||
127 | + "showFlag": 1, | ||
128 | + "status": 1 | ||
129 | + } | ||
130 | + ], | ||
131 | + "page": 1, | ||
132 | + "size": 20, | ||
133 | + "total": 138, | ||
134 | + "totalPage": 7 | ||
135 | + }, | ||
136 | + "md5": "a2acac4943f9a01781513ef58b1b94fd", | ||
137 | + "message": "获取列表成功" | ||
138 | + } | ||
139 | +} | ||
140 | +``` | ||
141 | + | ||
142 | +# 查询限定商品详情接口 | ||
143 | + | ||
144 | +> 接口名: `/limitProduct/getLimitProduct` | ||
145 | + | ||
146 | +### 方法 | ||
147 | + | ||
148 | +> POST JSONRAW | ||
149 | + | ||
150 | +### 入参 | ||
151 | + | ||
152 | +------------------------- | ||
153 | +|属性名称|类型|例子|说明|是否必填|长度限制| | ||
154 | +|-------|----|----|----|-------|--------| | ||
155 | +|id|Integer|83|限定商品表示|是|11 | ||
156 | +-------------------------------- | ||
157 | + | ||
158 | +### 对应SQL的操作库表 | ||
159 | + | ||
160 | +```xml | ||
161 | + <select id="selectLimitProduct" resultMap="BaseResultMap" > | ||
162 | + select | ||
163 | + <include refid="Base_Column_List" /> | ||
164 | + from limit_product p | ||
165 | + where 1=1 | ||
166 | + <if test="id != null and id != ''" > | ||
167 | + and p.id = #{id,jdbcType=INTEGER} | ||
168 | + </if> | ||
169 | + </select> | ||
170 | +``` | ||
171 | + | ||
172 | +```xml | ||
173 | +<select id="selectLimitProductAttachByProductIds" resultMap="BaseResultMap" parameterType="java.lang.Integer" > | ||
174 | + select | ||
175 | + <include refid="Base_Column_List" /> | ||
176 | + from limit_product_attach p | ||
177 | + where | ||
178 | + <foreach item="item" collection="list" index="index" separator="or" open="(" close=")"> | ||
179 | + p.product_id = #{item} | ||
180 | + </foreach> | ||
181 | + </select> | ||
182 | +``` | ||
183 | + | ||
184 | +### 响应码 | ||
185 | + | ||
186 | +------------------------- | ||
187 | +|响应码code|消息|说明| | ||
188 | +|--------|----|----| | ||
189 | +|200| 操作成功.| | | ||
190 | + | ||
191 | + | ||
192 | +### 返回 | ||
193 | + | ||
194 | +``` json | ||
195 | +{ | ||
196 | + "code": 200, | ||
197 | + "message": "", | ||
198 | + "data": { | ||
199 | + "code": 200, | ||
200 | + "data": { | ||
201 | + "attachUrl": "http://img10.static.yhbimg.com/goodsimg/2016/04/20/10/01c1d3796667ec0d12080ba1eba717d496.jpg", | ||
202 | + "dayFlag": 1, | ||
203 | + "hotFlag": 0, | ||
204 | + "id": 406, | ||
205 | + "limitProductCode": "2016042018243782", | ||
206 | + "notSaleOrderBy": 0, | ||
207 | + "orderBy": 0, | ||
208 | + "productName": "限购测试商品用例", | ||
209 | + "productSkn": 50000181, | ||
210 | + "saleFlag": 1, | ||
211 | + "saleTime": 1461206700, | ||
212 | + "saleTimeStr": "2016-04-21 10:45:00", | ||
213 | + "showFlag": 1, | ||
214 | + "status": 1 | ||
215 | + }, | ||
216 | + "md5": "a2acac4943f9a01781513ef58b1b94fd", | ||
217 | + "message": "获取列表成功" | ||
218 | + } | ||
219 | +} | ||
220 | + | ||
221 | +``` | ||
222 | + | ||
223 | + | ||
224 | +# 新增限定商品接口 | ||
225 | + | ||
226 | +> 接口名: `/limitProduct/addLimitProduct` | ||
227 | + | ||
228 | +### 方法 | ||
229 | + | ||
230 | +> POST JSONRAW | ||
231 | + | ||
232 | +### 入参 | ||
233 | + | ||
234 | +------------------------- | ||
235 | +|属性名称|类型|例子|说明|是否必填|长度限制| | ||
236 | +|--------|----|----|----|--------|--------| | ||
237 | +|productName|String||限定商品名称|是|255 | ||
238 | +|batchNo|String||限购码批次号|是|11 | ||
239 | +|limitProductType|String||限定商品活动类型: 分享得限购码:1 排队得限购码:2|是| | ||
240 | +|activityId|int||排队关联的活动ID|是|11 | ||
241 | +|saleTimeStr|String|2016-04-21 10:45:00|开售日期|是|11 | ||
242 | +|dayFlag|int|1|是否具体到日期,1:具体到日,0:不具体到日|否|1 | ||
243 | +|hotFlag|int|1|是否热门商品,0:非热门 1:热门|否|1 | ||
244 | +|orderBy|int|1|限定商品的排序|否|1 | ||
245 | +|showFlag|int|1|是否前台展示状态,0:不展示 1:展示|否|1 | ||
246 | +|attachmentContent|String||附件信息字符串|否|1 | ||
247 | +--------------------- | ||
248 | + | ||
249 | + | ||
250 | +### 对应SQL的操作库表 | ||
251 | + | ||
252 | +```xml | ||
253 | +<insert id="addLimitProduct" parameterType="com.yohobuy.platform.dal.product.model.LimitProduct" > | ||
254 | + <selectKey resultType="java.lang.Integer" order="AFTER" keyProperty="id"> | ||
255 | + SELECT LAST_INSERT_ID() AS id | ||
256 | + </selectKey> | ||
257 | + insert into limit_product | ||
258 | + <trim prefix="(" suffix=")" suffixOverrides="," > | ||
259 | + <if test="limitProductCode != null" > | ||
260 | + productCode, | ||
261 | + </if> | ||
262 | + <if test="productName != null" > | ||
263 | + productName, | ||
264 | + </if> | ||
265 | + <if test="price != null" > | ||
266 | + price, | ||
267 | + </if> | ||
268 | + <if test="productSkn != null" > | ||
269 | + productSkn, | ||
270 | + </if> | ||
271 | + <if test="batchNo != null" > | ||
272 | + batchno, | ||
273 | + </if> | ||
274 | + <if test="limitProductType != null" > | ||
275 | + limit_product_type, | ||
276 | + </if> | ||
277 | + <if test="activityId != null" > | ||
278 | + activity_id, | ||
279 | + </if> | ||
280 | + <if test="saleTime != null" > | ||
281 | + sale_time, | ||
282 | + </if> | ||
283 | + <if test="saleTimeStr != null" > | ||
284 | + sale_time_str, | ||
285 | + </if> | ||
286 | + <if test="dayFlag != null" > | ||
287 | + day_flag, | ||
288 | + </if> | ||
289 | + <if test="hotFlag != null" > | ||
290 | + hotFlag, | ||
291 | + </if> | ||
292 | + <if test="orderBy != null" > | ||
293 | + order_by, | ||
294 | + </if> | ||
295 | + <if test="showFlag != null" > | ||
296 | + showFlag, | ||
297 | + </if> | ||
298 | + <if test="creatorId != null" > | ||
299 | + creator_id, | ||
300 | + </if> | ||
301 | + <if test="creatorName != null" > | ||
302 | + creator_name, | ||
303 | + </if> | ||
304 | + <if test="createTime != null" > | ||
305 | + create_time, | ||
306 | + </if> | ||
307 | + <if test="lastUpdateTime != null" > | ||
308 | + update_time, | ||
309 | + </if> | ||
310 | + <if test="status != null" > | ||
311 | + status, | ||
312 | + </if> | ||
313 | + </trim> | ||
314 | + <trim prefix="values (" suffix=")" suffixOverrides="," > | ||
315 | + <if test="limitProductCode != null" > | ||
316 | + #{limitProductCode,jdbcType=VARCHAR}, | ||
317 | + </if> | ||
318 | + <if test="productName != null" > | ||
319 | + #{productName,jdbcType=VARCHAR}, | ||
320 | + </if> | ||
321 | + <if test="price != null" > | ||
322 | + #{price,jdbcType=VARCHAR}, | ||
323 | + </if> | ||
324 | + <if test="productSkn != null" > | ||
325 | + #{productSkn,jdbcType=INTEGER}, | ||
326 | + </if> | ||
327 | + <if test="batchNo != null" > | ||
328 | + #{batchNo,jdbcType=VARCHAR}, | ||
329 | + </if> | ||
330 | + <if test="limitProductType != null" > | ||
331 | + #{limitProductType,jdbcType=INTEGER}, | ||
332 | + </if> | ||
333 | + <if test="activityId != null" > | ||
334 | + #{activityId,jdbcType=INTEGER}, | ||
335 | + </if> | ||
336 | + <if test="saleTime != null" > | ||
337 | + #{saleTime,jdbcType=INTEGER}, | ||
338 | + </if> | ||
339 | + <if test="saleTimeStr != null" > | ||
340 | + #{saleTimeStr,jdbcType=VARCHAR}, | ||
341 | + </if> | ||
342 | + <if test="dayFlag != null" > | ||
343 | + #{dayFlag,jdbcType=INTEGER}, | ||
344 | + </if> | ||
345 | + <if test="hotFlag != null" > | ||
346 | + #{hotFlag,jdbcType=INTEGER}, | ||
347 | + </if> | ||
348 | + <if test="orderBy != null" > | ||
349 | + #{orderBy,jdbcType=INTEGER}, | ||
350 | + </if> | ||
351 | + <if test="showFlag != null" > | ||
352 | + #{showFlag,jdbcType=INTEGER}, | ||
353 | + </if> | ||
354 | + <if test="creatorId != null" > | ||
355 | + #{creatorId,jdbcType=INTEGER}, | ||
356 | + </if> | ||
357 | + <if test="creatorName != null" > | ||
358 | + #{creatorName,jdbcType=VARCHAR}, | ||
359 | + </if> | ||
360 | + <if test="createTime != null" > | ||
361 | + #{createTime,jdbcType=INTEGER}, | ||
362 | + </if> | ||
363 | + <if test="lastUpdateTime != null" > | ||
364 | + #{lastUpdateTime,jdbcType=INTEGER}, | ||
365 | + </if> | ||
366 | + <if test="status != null" > | ||
367 | + #{status,jdbcType=INTEGER}, | ||
368 | + </if> | ||
369 | + </trim> | ||
370 | + </insert> | ||
371 | +``` | ||
372 | + | ||
373 | +```xml | ||
374 | + <insert id="addLimitProductAttach" parameterType="java.util.List"> | ||
375 | + insert into limit_product_attach ( product_id, attach_type, is_default, | ||
376 | + attach_name, attach_url, order_by, intro, | ||
377 | + status ) values | ||
378 | + <foreach collection="list" item="item" index="index" | ||
379 | + separator=","> | ||
380 | + ( #{item.productId}, #{item.attachType}, #{item.isDefault}, | ||
381 | + #{item.attachName}, #{item.attachUrl}, | ||
382 | + #{item.orderBy}, #{item.intro}, | ||
383 | + #{item.status} ) | ||
384 | + </foreach> | ||
385 | + </insert> | ||
386 | +``` | ||
387 | + | ||
388 | +### 响应码 | ||
389 | + | ||
390 | +------------------------- | ||
391 | +|响应码code|消息|说明| | ||
392 | +|--------|----|----| | ||
393 | +|200| 保存成功!| | | ||
394 | + | ||
395 | + | ||
396 | +### 返回 | ||
397 | + | ||
398 | +``` json | ||
399 | +{ | ||
400 | + "code": 200, | ||
401 | + "data": [], | ||
402 | + "md5": "d751713988987e9331980363e24189ce", | ||
403 | + "message": "保存成功!" | ||
404 | +} | ||
405 | + | ||
406 | +``` | ||
407 | + | ||
408 | +# 修改限定商品接口 | ||
409 | + | ||
410 | +> 接口名: `/limitProduct/updateLimitProduct` | ||
411 | + | ||
412 | +### 方法 | ||
413 | + | ||
414 | +> POST JSONRAW | ||
415 | + | ||
416 | +### 入参 | ||
417 | + | ||
418 | +------------------------- | ||
419 | +|属性名称|类型|例子|说明|是否必填|长度限制| | ||
420 | +|--------|----|----|----|--------|--------| | ||
421 | +|id|int||限定商品id|是|11 | ||
422 | +|productName|String||限定商品名称|是|255 | ||
423 | +|batchNo|String||限购码批次号|是|11 | ||
424 | +|limitProductType|String||限定商品活动类型: 分享得限购码:1 排队得限购码:2|是| | ||
425 | +|activityId|int||排队关联的活动ID|是|11 | ||
426 | +|saleTimeStr|String|2016-04-21 10:45:00|开售日期|是|11 | ||
427 | +|dayFlag|int|1|是否具体到日期,1:具体到日,0:不具体到日|否|1 | ||
428 | +|hotFlag|int|1|是否热门商品,0:非热门 1:热门|否|1 | ||
429 | +|orderBy|int|1|限定商品的排序|否|1 | ||
430 | +|showFlag|int|1|是否前台展示状态,0:不展示 1:展示|否|1 | ||
431 | +|attachmentContent|String||附件信息字符串|否|1 | ||
432 | +--------------------- | ||
433 | + | ||
434 | + | ||
435 | +### 对应SQL的操作库表 | ||
436 | + | ||
437 | +```xml | ||
438 | +<update id="updateLimitProduct" parameterType="com.yohobuy.platform.dal.product.model.LimitProduct"> | ||
439 | + update limit_product | ||
440 | + <set > | ||
441 | + <if test="limitProductCode != null" > | ||
442 | + productCode = #{limitProductCode,jdbcType=VARCHAR}, | ||
443 | + </if> | ||
444 | + <if test="productName != null" > | ||
445 | + productName = #{productName,jdbcType=VARCHAR}, | ||
446 | + </if> | ||
447 | + <if test="price != null" > | ||
448 | + price = #{price,jdbcType=VARCHAR}, | ||
449 | + </if> | ||
450 | + <if test="batchNo != null" > | ||
451 | + batchno = #{batchNo,jdbcType=VARCHAR}, | ||
452 | + </if> | ||
453 | + <if test="limitProductType != null" > | ||
454 | + limit_product_type = #{limitProductType,jdbcType=INTEGER}, | ||
455 | + </if> | ||
456 | + <if test="activityId != null" > | ||
457 | + activity_id = #{activityId,jdbcType=INTEGER}, | ||
458 | + </if> | ||
459 | + <if test="productSkn != null" > | ||
460 | + productSkn = #{productSkn,jdbcType=INTEGER}, | ||
461 | + </if> | ||
462 | + <if test="saleTime != null" > | ||
463 | + sale_time = #{saleTime,jdbcType=INTEGER}, | ||
464 | + </if> | ||
465 | + <if test="saleTimeStr != null" > | ||
466 | + sale_time_str = #{saleTimeStr,jdbcType=VARCHAR}, | ||
467 | + </if> | ||
468 | + <if test="dayFlag != null" > | ||
469 | + day_flag = #{dayFlag,jdbcType=INTEGER}, | ||
470 | + </if> | ||
471 | + <if test="hotFlag != null" > | ||
472 | + hotFlag = #{hotFlag,jdbcType=INTEGER}, | ||
473 | + </if> | ||
474 | + <if test="orderBy != null" > | ||
475 | + order_by = #{orderBy,jdbcType=INTEGER}, | ||
476 | + </if> | ||
477 | + <if test="showFlag != null" > | ||
478 | + showFlag = #{showFlag,jdbcType=INTEGER}, | ||
479 | + </if> | ||
480 | + <if test="creatorId != null" > | ||
481 | + creator_id = #{creatorId,jdbcType=INTEGER}, | ||
482 | + </if> | ||
483 | + <if test="creatorName != null" > | ||
484 | + creator_name = #{creatorName,jdbcType=VARCHAR}, | ||
485 | + </if> | ||
486 | + <if test="createTime != null" > | ||
487 | + create_time = #{createTime,jdbcType=INTEGER}, | ||
488 | + </if> | ||
489 | + <if test="lastUpdateTime != null" > | ||
490 | + update_time = #{lastUpdateTime,jdbcType=INTEGER}, | ||
491 | + </if> | ||
492 | + <if test="status != null" > | ||
493 | + status = #{status,jdbcType=INTEGER}, | ||
494 | + </if> | ||
495 | + </set> | ||
496 | + where id = #{id,jdbcType=INTEGER} | ||
497 | + </update> | ||
498 | +``` | ||
499 | + | ||
500 | +```xml | ||
501 | +<delete id="deleteLimitProductAttach" > | ||
502 | + delete from limit_product_attach | ||
503 | + where product_id = #{productId,jdbcType=INTEGER} | ||
504 | + </delete> | ||
505 | +``` | ||
506 | + | ||
507 | +```xml | ||
508 | +<insert id="addLimitProductAttach" parameterType="java.util.List"> | ||
509 | + insert into limit_product_attach ( product_id, attach_type, is_default, | ||
510 | + attach_name, attach_url, order_by, intro, | ||
511 | + status ) values | ||
512 | + <foreach collection="list" item="item" index="index" | ||
513 | + separator=","> | ||
514 | + ( #{item.productId}, #{item.attachType}, #{item.isDefault}, | ||
515 | + #{item.attachName}, #{item.attachUrl}, | ||
516 | + #{item.orderBy}, #{item.intro}, | ||
517 | + #{item.status} ) | ||
518 | + </foreach> | ||
519 | + </insert> | ||
520 | +``` | ||
521 | + | ||
522 | +### 响应码 | ||
523 | + | ||
524 | +------------------------- | ||
525 | +|响应码code|消息|说明| | ||
526 | +|--------|----|----| | ||
527 | +|200| 修改成功!| | | ||
528 | +|200| 修改失败!| | | ||
529 | + | ||
530 | + | ||
531 | +### 返回 | ||
532 | + | ||
533 | +``` json | ||
534 | +{ | ||
535 | + "code": 200, | ||
536 | + "data": [], | ||
537 | + "md5": "d751713988987e9331980363e24189ce", | ||
538 | + "message": "修改成功!" | ||
539 | +} | ||
540 | + | ||
541 | +``` | ||
542 | + | ||
543 | +# 审核限定商品接口 | ||
544 | + | ||
545 | +> 接口名: `/limitProduct/auditLimitProduct` | ||
546 | + | ||
547 | +### 方法 | ||
548 | + | ||
549 | +> POST JSONRAW | ||
550 | + | ||
551 | +### 入参 | ||
552 | + | ||
553 | +------------------------- | ||
554 | +|属性名称|类型|例子|说明|是否必填|长度限制| | ||
555 | +|--------|----|----|----|--------|--------| | ||
556 | +|id|int||限定商品表示|是|11 | ||
557 | +|showFlag|String||是否前台展示状态,0:不展示 1:展示|否| | ||
558 | +|hotFlag|String||是否热门商品,0:非热门 1:热门|否| | ||
559 | +|orderBy|int||热门限定商品的排序|否| | ||
560 | +--------------------- | ||
561 | + | ||
562 | + | ||
563 | +### 对应SQL的操作库表 | ||
564 | + | ||
565 | +```xml | ||
566 | +<update id="updateLimitProductByBatchNo" parameterType="com.yohobuy.platform.model.product.req.LimitProductSknUpdateReq"> | ||
567 | + update limit_product | ||
568 | + set productSkn = #{productSkn,jdbcType=VARCHAR} | ||
569 | + where batchno = #{batchNo,jdbcType=VARCHAR} | ||
570 | + </update> | ||
571 | +``` | ||
572 | + | ||
573 | +### 响应码 | ||
574 | + | ||
575 | +------------------------- | ||
576 | +|响应码code|消息|说明| | ||
577 | +|--------|----|----| | ||
578 | +|200| 设置成功!| | | ||
579 | +|5002| 设置失败!| | | ||
580 | + | ||
581 | + | ||
582 | +### 返回 | ||
583 | + | ||
584 | +``` json | ||
585 | +{ | ||
586 | + "code": 200, | ||
587 | + "data": [], | ||
588 | + "md5": "d751713988987e9331980363e24189ce", | ||
589 | + "message": "设置成功!" | ||
590 | +} | ||
591 | + | ||
592 | +``` | ||
593 | + | ||
594 | +# 删除限定商品接口 | ||
595 | + | ||
596 | +> 接口名: `/limitProduct/deleteLimitProduct` | ||
597 | + | ||
598 | +### 方法 | ||
599 | + | ||
600 | +> POST JSONRAW | ||
601 | + | ||
602 | +### 入参 | ||
603 | + | ||
604 | +------------------------- | ||
605 | +|属性名称|类型|例子|说明|是否必填|长度限制| | ||
606 | +|--------|----|----|----|--------|--------| | ||
607 | +|id|int||限定商品表示|是|11 | ||
608 | +--------------------- | ||
609 | + | ||
610 | + | ||
611 | +### 对应SQL的操作库表 | ||
612 | + | ||
613 | +```xml | ||
614 | +<delete id="deleteLimitProduct" > | ||
615 | + delete from limit_product | ||
616 | + where id = #{id,jdbcType=INTEGER} | ||
617 | + </delete> | ||
618 | +``` | ||
619 | + | ||
620 | +```xml | ||
621 | +<delete id="deleteLimitProductAttach" > | ||
622 | + delete from limit_product_attach | ||
623 | + where product_id = #{productId,jdbcType=INTEGER} | ||
624 | + </delete> | ||
625 | +``` | ||
626 | + | ||
627 | +### 响应码 | ||
628 | + | ||
629 | +------------------------- | ||
630 | +|响应码code|消息|说明| | ||
631 | +|--------|----|----| | ||
632 | +|200| 删除成功!| | | ||
633 | +|5003| 删除失败!| | | ||
634 | + | ||
635 | + | ||
636 | +### 返回 | ||
637 | + | ||
638 | +``` json | ||
639 | +{ | ||
640 | + "code": 200, | ||
641 | + "data": [], | ||
642 | + "md5": "d751713988987e9331980363e24189ce", | ||
643 | + "message": "删除成功!" | ||
644 | +} | ||
645 | + | ||
646 | +``` | ||
647 | + | ||
648 | + | ||
649 | +# 限购码批次关联商品skn后,限定商品同步修改skn接口 | ||
650 | + | ||
651 | +> 接口名: `/limitProduct/updateLimitProductByBatchNo` | ||
652 | + | ||
653 | +### 方法 | ||
654 | + | ||
655 | +> POST JSONRAW | ||
656 | + | ||
657 | +### 入参 | ||
658 | + | ||
659 | +------------------------- | ||
660 | +|属性名称|类型|例子|说明|是否必填|长度限制| | ||
661 | +|--------|----|----|----|--------|--------| | ||
662 | +|batchNo|String||限购码批次号|是|11 | ||
663 | +|productSkn|int||关联SKN|是|11 | ||
664 | +--------------------- | ||
665 | + | ||
666 | + | ||
667 | +### 对应SQL的操作库表 | ||
668 | + | ||
669 | +```xml | ||
670 | +<update id="updateLimitProductByBatchNo" parameterType="com.yohobuy.platform.model.product.req.LimitProductSknUpdateReq"> | ||
671 | + update limit_product | ||
672 | + set productSkn = #{productSkn,jdbcType=VARCHAR} | ||
673 | + where batchno = #{batchNo,jdbcType=VARCHAR} | ||
674 | + </update> | ||
675 | +``` | ||
676 | + | ||
677 | + | ||
678 | +### 响应码 | ||
679 | + | ||
680 | +------------------------- | ||
681 | +|响应码code|消息|说明| | ||
682 | +|--------|----|----| | ||
683 | +|200| 修改成功!| | | ||
684 | +|5001| 修改失败!| | | ||
685 | + | ||
686 | + | ||
687 | +### 返回 | ||
688 | + | ||
689 | +``` json | ||
690 | +{ | ||
691 | + "code": 200, | ||
692 | + "data": [], | ||
693 | + "md5": "d751713988987e9331980363e24189ce", | ||
694 | + "message": "修改成功!" | ||
695 | +} | ||
696 | + | ||
697 | +``` | ||
698 | + | ||
699 | +# 查询各种状态的优惠码总数接口 | ||
700 | + | ||
701 | +> 接口名: `/limitProduct/getCountByStatus` | ||
702 | + | ||
703 | +### 方法 | ||
704 | + | ||
705 | +> POST JSONRAW | ||
706 | + | ||
707 | +### 入参 | ||
708 | + | ||
709 | +------------------------- | ||
710 | +|属性名称|类型|例子|说明|是否必填|长度限制| | ||
711 | +|--------|----|----|----|--------|--------| | ||
712 | +|batchNo|String||限购码批次号|是|11 | ||
713 | +|productSkn|int||关联SKN|是|11 | ||
714 | +--------------------- | ||
715 | + | ||
716 | + | ||
717 | +### 对应SQL的操作库表 | ||
718 | + | ||
719 | +```xml | ||
720 | +<select id="selectLimitProductCount" resultType="java.lang.Integer" parameterType="com.yohobuy.platform.model.product.req.LimitProductReq" > | ||
721 | + select count(id) from limit_product p | ||
722 | + where 1=1 | ||
723 | + <if test="id != null and id != ''" > | ||
724 | + and p.id = #{id,jdbcType=INTEGER} | ||
725 | + </if> | ||
726 | + | ||
727 | + <if test="productSkn != null and productSkn != ''" > | ||
728 | + and p.productSkn=#{productSkn,jdbcType=INTEGER} | ||
729 | + </if> | ||
730 | + | ||
731 | + <if test="productName != null and productName != ''" > | ||
732 | + and p.productName like '%' #{productName,jdbcType=VARCHAR} '%' | ||
733 | + </if> | ||
734 | + | ||
735 | + <if test="batchNo != null and batchNo != ''" > | ||
736 | + and p.batchno like '%' #{batchNo,jdbcType=VARCHAR} '%' | ||
737 | + </if> | ||
738 | + | ||
739 | + <if test="status != null and status != ''" > | ||
740 | + and p.status = #{status,jdbcType=VARCHAR} | ||
741 | + </if> | ||
742 | + | ||
743 | + <if test="hotFlag != null and hotFlag != ''" > | ||
744 | + and p.hotFlag = #{hotFlag,jdbcType=VARCHAR} | ||
745 | + </if> | ||
746 | + | ||
747 | + <if test="showFlag != null and showFlag != ''" > | ||
748 | + and p.showFlag = #{showFlag,jdbcType=VARCHAR} | ||
749 | + </if> | ||
750 | + | ||
751 | + <if test="saleFlag != null and saleFlag != '' and saleFlag == 1" > | ||
752 | + and p.sale_time < #{currentTime,jdbcType=INTEGER} | ||
753 | + </if> | ||
754 | + | ||
755 | + <if test="saleFlag != null and saleFlag != '' and saleFlag == 0" > | ||
756 | + and p.sale_time > #{currentTime,jdbcType=INTEGER} | ||
757 | + </if> | ||
758 | + </select> | ||
759 | +``` | ||
760 | + | ||
761 | + | ||
762 | +### 响应码 | ||
763 | + | ||
764 | +------------------------- | ||
765 | +|响应码code|消息|说明| | ||
766 | +|--------|----|----| | ||
767 | +|200| 修改成功!| | | ||
768 | +|5001| 修改失败!| | | ||
769 | + | ||
770 | + | ||
771 | +### 返回 | ||
772 | + | ||
773 | +``` json | ||
774 | +{ | ||
775 | + "code": 200, | ||
776 | + "data": [], | ||
777 | + "md5": "d751713988987e9331980363e24189ce", | ||
778 | + "message": "修改成功!" | ||
779 | +} | ||
780 | + | ||
781 | +``` |
-
Please register or login to post a comment