Showing
1 changed file
with
68 additions
and
68 deletions
1 | - | ||
2 | -# 审核限购码接口(通过,驳回,作废)接口 | ||
3 | - | ||
4 | -> 接口名: `/limitCode/auditLimitCode` | ||
5 | - | ||
6 | -### 方法 | ||
7 | - | ||
8 | -> POST JSONRAW | ||
9 | - | ||
10 | -### 入参 | ||
11 | - | ||
12 | -------------------------- | ||
13 | -|属性名称|类型|例子|说明|是否必填|长度限制| | ||
14 | -|--------|----|----|----|--------|--------| | ||
15 | -|id|Integer|67|限购码id|是|14 | ||
16 | -|status|Integer|1|优惠码状态,1:审核通过 2:驳回 4:作废|是|1 | ||
17 | -|reason|String||驳回理由|驳回的时候需要|255 | ||
18 | ---------------------- | ||
19 | - | ||
20 | -### 对应SQL的操作库表 | ||
21 | - | ||
22 | -```xml | ||
23 | -<update id="auditLimitCode" parameterType="com.yohobuy.platform.dal.promotion.model.LimitCode"> | ||
24 | - update limit_code | ||
25 | - <set> | ||
26 | - <if test="status != null" > | ||
27 | - status = #{status,jdbcType=INTEGER}, | ||
28 | - </if> | ||
29 | - <if test="auditTime != null" > | ||
30 | - audit_time = #{auditTime,jdbcType=VARCHAR}, | ||
31 | - </if> | ||
32 | - <if test="reason != null" > | ||
33 | - reason = #{reason,jdbcType=VARCHAR}, | ||
34 | - </if> | ||
35 | - </set> | ||
36 | - where id = #{id,jdbcType=INTEGER} | ||
37 | - </update> | ||
38 | -``` | ||
39 | - | ||
40 | -```xml | ||
41 | -<insert id="addLimitCodeBatch" parameterType="java.util.List"> | ||
42 | - insert into limit_code_batchno (batchNo, code,sku, status) | ||
43 | - values | ||
44 | - <foreach collection="list" item="item" index="index" separator="," > | ||
45 | - (#{item.batchNo},#{item.code},#{item.sku},#{item.status}) | ||
46 | - </foreach> | ||
47 | - </insert> | ||
48 | -``` | ||
49 | -### 响应码 | ||
50 | - | ||
51 | -------------------------- | ||
52 | -|响应码code|消息|说明| | ||
53 | -|--------|----|----| | ||
54 | -|200| 审核成功./驳回成功./限购码作废成功.| | | ||
55 | -|400|参数id不能为空./参数status不合法.| | | ||
56 | -|500|审核失败.| | | ||
57 | - | ||
58 | -### 返回 | ||
59 | - | ||
60 | -``` json | ||
61 | -{ | ||
62 | - "code": 200, | ||
63 | - "data": [], | ||
64 | - "md5": "d751713988987e9331980363e24189ce", | ||
65 | - "message": "审核成功." | ||
66 | -} | ||
67 | -``` | ||
68 | - | 1 | + |
2 | +# 审核限购码接口(通过,驳回,作废)接口 | ||
3 | + | ||
4 | +> 接口名: `/limitCode/auditLimitCode` | ||
5 | + | ||
6 | +### 方法 | ||
7 | + | ||
8 | +> POST JSONRAW | ||
9 | + | ||
10 | +### 入参 | ||
11 | + | ||
12 | +------------------------- | ||
13 | +|属性名称|类型|例子|说明|是否必填|长度限制| | ||
14 | +|--------|----|----|----|--------|--------| | ||
15 | +|id|Integer|67|限购码id|是|1~14 | ||
16 | +|status|Integer|1|优惠码状态,1:审核通过 2:驳回 4:作废|是|1 | ||
17 | +|reason|String|不规范|驳回理由|驳回的时候需要|1~255 | ||
18 | +--------------------- | ||
19 | + | ||
20 | +### 对应SQL的操作库表 | ||
21 | + | ||
22 | +```xml | ||
23 | +<update id="auditLimitCode" parameterType="com.yohobuy.platform.dal.promotion.model.LimitCode"> | ||
24 | + update limit_code | ||
25 | + <set> | ||
26 | + <if test="status != null" > | ||
27 | + status = #{status,jdbcType=INTEGER}, | ||
28 | + </if> | ||
29 | + <if test="auditTime != null" > | ||
30 | + audit_time = #{auditTime,jdbcType=VARCHAR}, | ||
31 | + </if> | ||
32 | + <if test="reason != null" > | ||
33 | + reason = #{reason,jdbcType=VARCHAR}, | ||
34 | + </if> | ||
35 | + </set> | ||
36 | + where id = #{id,jdbcType=INTEGER} | ||
37 | + </update> | ||
38 | +``` | ||
39 | + | ||
40 | +```xml | ||
41 | +<insert id="addLimitCodeBatch" parameterType="java.util.List"> | ||
42 | + insert into limit_code_batchno (batchNo, code,sku, status) | ||
43 | + values | ||
44 | + <foreach collection="list" item="item" index="index" separator="," > | ||
45 | + (#{item.batchNo},#{item.code},#{item.sku},#{item.status}) | ||
46 | + </foreach> | ||
47 | + </insert> | ||
48 | +``` | ||
49 | +### 响应码 | ||
50 | + | ||
51 | +------------------------- | ||
52 | +|响应码code|消息|说明| | ||
53 | +|--------|----|----| | ||
54 | +|200| 审核成功./驳回成功./限购码作废成功.| | | ||
55 | +|400|参数id不能为空./参数status不合法.| | | ||
56 | +|500|审核失败.| | | ||
57 | + | ||
58 | +### 返回 | ||
59 | + | ||
60 | +``` json | ||
61 | +{ | ||
62 | + "code": 200, | ||
63 | + "data": [], | ||
64 | + "md5": "d751713988987e9331980363e24189ce", | ||
65 | + "message": "审核成功." | ||
66 | +} | ||
67 | +``` | ||
68 | + |
-
Please register or login to post a comment