|
|
# 添加尺码接口
|
|
|
|
|
|
> 接口名: `/product/addSize`
|
|
|
|
|
|
### 方法
|
|
|
|
|
|
> POST JSONRAW
|
|
|
|
|
|
### 入参
|
|
|
|
|
|
-------------------------
|
|
|
|属性名称|类型|例子|说明|是否必填|长度限制|
|
|
|
|--------|----|----|---|----|--------|
|
|
|
|sizeName|string|L|名称|是|10
|
|
|
|
|
|
|
|
|
|
|
|
### 对应SQL的操作库表
|
|
|
|
|
|
```xml
|
|
|
<insert id="insert" parameterType="com.yohobuy.platform.dal.product.model.Size" >
|
|
|
insert into size (id, size_name, sort_id,
|
|
|
attribute_id, order_by, create_time,
|
|
|
update_time)
|
|
|
values (#{id,jdbcType=SMALLINT}, #{sizeName,jdbcType=VARCHAR}, #{sortId,jdbcType=SMALLINT},
|
|
|
#{attributeId,jdbcType=VARCHAR}, #{orderBy,jdbcType=INTEGER}, #{createTime,jdbcType=INTEGER},
|
|
|
#{updateTime,jdbcType=INTEGER})
|
|
|
</insert>
|
|
|
```
|
|
|
|
|
|
### 错误编码
|
|
|
|
|
|
-------------------------
|
|
|
|错误码code|消息|说明|
|
|
|
|--------|----|----|
|
|
|
|200| 添加成功!| |
|
|
|
|400| 操作失败!| |
|
|
|
|
|
|
### 返回
|
|
|
|
|
|
``` json
|
|
|
{
|
|
|
"code":200,
|
|
|
"message":"添加成功!"
|
|
|
}
|
|
|
|
|
|
# 更新单个搭配
|
|
|
|
|
|
> 接口名: `/collocation/updateCollocation`
|
|
|
|
|
|
### 方法
|
|
|
|
|
|
> POST JSONRAW
|
|
|
|
|
|
### 入参
|
|
|
|
|
|
-------------------------
|
|
|
|属性名称|类型|例子|说明|是否必填|长度限制|
|
|
|
|--------|----|----|---|----|--------|
|
|
|
|id|number||搭配的主键|Y|10|
|
|
|
|imageUrl|string||图片url|Y|255
|
|
|
|content|string||搭配介绍|Y|255
|
|
|
|infoStr|string||搭配的方位信息|Y|无
|
|
|
|
|
|
|
|
|
|
|
|
### 对应SQL的操作库表
|
|
|
|
|
|
```xml
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.yohobuy.platform.dal.product.model.ProductCollocation" >
|
|
|
update product_collocation
|
|
|
<set >
|
|
|
<if test="productId != null" >
|
|
|
product_id = #{productId,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="imageUrl != null" >
|
|
|
image_url = #{imageUrl,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="content != null" >
|
|
|
content = #{content,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="orderBy != null" >
|
|
|
order_by = #{orderBy,jdbcType=TINYINT},
|
|
|
</if>
|
|
|
<if test="createTime != null" >
|
|
|
create_time = #{createTime,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="info != null" >
|
|
|
info = #{info,jdbcType=LONGVARCHAR},
|
|
|
</if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
```
|
|
|
|
|
|
### 错误编码
|
|
|
|
|
|
-------------------------
|
|
|
|错误码code|消息|说明|
|
|
|
|--------|----|----|
|
|
|
|200| 添加成功!| |
|
|
|
|400| 操作失败!| |
|
|
|
|
|
|
### 返回
|
|
|
|
|
|
``` json
|
|
|
{
|
|
|
"code": 200,
|
|
|
"data": [],
|
|
|
"md5": "d751713988987e9331980363e24189ce",
|
|
|
"message": "update collocation success."
|
|
|
}
|
|
|
|
|
|
``` |
|
|
\ No newline at end of file |
...
|
...
|
|