Showing
1 changed file
with
87 additions
and
0 deletions
1 | +# 新增物理分类 | ||
2 | + | ||
3 | +> 接口名: `/product/updateProductSort` | ||
4 | + | ||
5 | +### 方法 | ||
6 | + | ||
7 | +> POST JSONRAW | ||
8 | + | ||
9 | + | ||
10 | +### 入参 | ||
11 | + | ||
12 | +------------------------- | ||
13 | +|属性名称|类型|例子|说明|是否必填|长度限制| | ||
14 | +|--------|----|----|----|--------|--------| | ||
15 | +|id|number|品类的Id|品类的ID|Y|5 | ||
16 | +|sortName|string|上衣|分类的名称|Y|30 | ||
17 | +|sortInitials|string|上衣|分类的简称|Y|10 | ||
18 | +|firstSortId|number|1|一级分类Id|N|5 | ||
19 | +|secondSortId|number|14|二级分类Id|N|5 | ||
20 | +|threeSortId|number|147|三级分类Id|N|5 | ||
21 | +|orderBy|number|1|当前子妹分类中的序值|Y|5 | ||
22 | +|status|number|1|分类的状态(1是开启 0是关闭)|Y|1 | ||
23 | +--------------------- | ||
24 | + | ||
25 | +### 对应SQL的操作库表 | ||
26 | + | ||
27 | +```xml | ||
28 | +<update id="updateById" parameterType="com.yohobuy.platform.dal.product.model.ProductSort" > | ||
29 | + update product_sort | ||
30 | + <set > | ||
31 | + <if test="sortName != null" > | ||
32 | + sort_name = #{sortName,jdbcType=VARCHAR}, | ||
33 | + </if> | ||
34 | + <if test="sortInitials != null" > | ||
35 | + sort_initials = #{sortInitials,jdbcType=VARCHAR}, | ||
36 | + </if> | ||
37 | + <if test="parentId != null" > | ||
38 | + parent_id = #{parentId,jdbcType=SMALLINT}, | ||
39 | + </if> | ||
40 | + <if test="orderBy != null" > | ||
41 | + order_by = #{orderBy,jdbcType=SMALLINT}, | ||
42 | + </if> | ||
43 | + <if test="gender != null" > | ||
44 | + gender = #{gender,jdbcType=TINYINT}, | ||
45 | + </if> | ||
46 | + <if test="sortCode != null" > | ||
47 | + sort_code = #{sortCode,jdbcType=VARCHAR}, | ||
48 | + </if> | ||
49 | + <if test="sortLevel != null" > | ||
50 | + sort_level = #{sortLevel,jdbcType=SMALLINT}, | ||
51 | + </if> | ||
52 | + <if test="isHot != null" > | ||
53 | + is_hot = #{isHot,jdbcType=CHAR}, | ||
54 | + </if> | ||
55 | + <if test="status != null" > | ||
56 | + status = #{status,jdbcType=TINYINT}, | ||
57 | + </if> | ||
58 | + <if test="createTime != null" > | ||
59 | + create_time = #{createTime,jdbcType=INTEGER}, | ||
60 | + </if> | ||
61 | + <if test="updateTime != null" > | ||
62 | + update_time = #{updateTime,jdbcType=INTEGER}, | ||
63 | + </if> | ||
64 | + </set> | ||
65 | + where id = #{id,jdbcType=SMALLINT} | ||
66 | + </update> | ||
67 | +``` | ||
68 | + | ||
69 | +### 错误编码 | ||
70 | + | ||
71 | +------------------------- | ||
72 | +|错误码code|消息|说明| | ||
73 | +|--------|----|----| | ||
74 | +|200| 添加成功!| | | ||
75 | +|500| 操作失败!| | | ||
76 | + | ||
77 | +### 返回 | ||
78 | + | ||
79 | +``` json | ||
80 | +{ | ||
81 | + "code": 200, | ||
82 | + "data": [], | ||
83 | + "md5": "d751713988987e9331980363e24189ce", | ||
84 | + "message": "Product Sort Update success." | ||
85 | +} | ||
86 | + | ||
87 | +``` |
-
Please register or login to post a comment