...
|
...
|
@@ -886,6 +886,247 @@ |
|
|
```
|
|
|
|
|
|
|
|
|
# 批量更新销售类目的标签接口
|
|
|
|
|
|
> 接口名: `/salesCategoryLabel/updateBatchSCLabel`
|
|
|
|
|
|
### 方法
|
|
|
|
|
|
> POST JSONRAW
|
|
|
|
|
|
### 入参
|
|
|
|属性名称|类型|例子|说明|是否必填|
|
|
|
|--------|----|----|----|--------|
|
|
|
|labelId|String|1|标签id|是|
|
|
|
|labelName|String|袖长|标签名称|否|
|
|
|
|categoryId|string||关联的销售类目id|否|
|
|
|
|parentId|string|1|父标签id|否|
|
|
|
|orderBy|string|0|排序|否|
|
|
|
|labelLevel|string|1|标签等级|否|
|
|
|
|status|string|0|销售类目状态1:开启 0:关闭 |否
|
|
|
---------------------
|
|
|
|
|
|
### 入参例
|
|
|
|
|
|
``` json
|
|
|
{
|
|
|
"scLabelItemList": [
|
|
|
{
|
|
|
"categoryId": "92",
|
|
|
"createTime": "1460453360",
|
|
|
"labelId": "416",
|
|
|
"labelLevel": "1",
|
|
|
"labelName": "经典款型",
|
|
|
"orderBy": "1",
|
|
|
"parentId": "0",
|
|
|
"status": "1",
|
|
|
"updateTime": "1460453360"
|
|
|
},
|
|
|
{
|
|
|
"categoryId": "92",
|
|
|
"createTime": "1460453360",
|
|
|
"labelId": "434",
|
|
|
"labelLevel": "1",
|
|
|
"labelName": "版型",
|
|
|
"orderBy": "2",
|
|
|
"parentId": "0",
|
|
|
"status": "1",
|
|
|
"updateTime": "1460453360"
|
|
|
},
|
|
|
{
|
|
|
"categoryId": "92",
|
|
|
"createTime": "1460453360",
|
|
|
"labelId": "432",
|
|
|
"labelLevel": "1",
|
|
|
"labelName": "衣长",
|
|
|
"orderBy": "3",
|
|
|
"parentId": "0",
|
|
|
"status": "1",
|
|
|
"updateTime": "1460453360"
|
|
|
},
|
|
|
{
|
|
|
"categoryId": "92",
|
|
|
"createTime": "1460453360",
|
|
|
"labelId": "430",
|
|
|
"labelLevel": "1",
|
|
|
"labelName": "腰型",
|
|
|
"orderBy": "4",
|
|
|
"parentId": "0",
|
|
|
"status": "1",
|
|
|
"updateTime": "1460453360"
|
|
|
},
|
|
|
{
|
|
|
"categoryId": "92",
|
|
|
"createTime": "1460453360",
|
|
|
"labelId": "428",
|
|
|
"labelLevel": "1",
|
|
|
"labelName": "裤长",
|
|
|
"orderBy": "0",
|
|
|
"parentId": "0",
|
|
|
"status": "1",
|
|
|
"updateTime": "1460453360"
|
|
|
},
|
|
|
{
|
|
|
"categoryId": "92",
|
|
|
"createTime": "1460453360",
|
|
|
"labelId": "426",
|
|
|
"labelLevel": "1",
|
|
|
"labelName": "袖长",
|
|
|
"orderBy": "5",
|
|
|
"parentId": "0",
|
|
|
"status": "1",
|
|
|
"updateTime": "1460453360"
|
|
|
},
|
|
|
{
|
|
|
"categoryId": "92",
|
|
|
"createTime": "1460453360",
|
|
|
"labelId": "424",
|
|
|
"labelLevel": "1",
|
|
|
"labelName": "领型",
|
|
|
"orderBy": "6",
|
|
|
"parentId": "0",
|
|
|
"status": "1",
|
|
|
"updateTime": "1460453360"
|
|
|
},
|
|
|
{
|
|
|
"categoryId": "92",
|
|
|
"createTime": "1460453360",
|
|
|
"labelId": "422",
|
|
|
"labelLevel": "1",
|
|
|
"labelName": "厚度",
|
|
|
"orderBy": "7",
|
|
|
"parentId": "0",
|
|
|
"status": "1",
|
|
|
"updateTime": "1460453360"
|
|
|
},
|
|
|
{
|
|
|
"categoryId": "92",
|
|
|
"createTime": "1460453360",
|
|
|
"labelId": "420",
|
|
|
"labelLevel": "1",
|
|
|
"labelName": "袖型",
|
|
|
"orderBy": "8",
|
|
|
"parentId": "0",
|
|
|
"status": "1",
|
|
|
"updateTime": "1460453360"
|
|
|
},
|
|
|
{
|
|
|
"categoryId": "92",
|
|
|
"createTime": "1460453360",
|
|
|
"labelId": "418",
|
|
|
"labelLevel": "1",
|
|
|
"labelName": "面料材质",
|
|
|
"orderBy": "9",
|
|
|
"parentId": "0",
|
|
|
"status": "1",
|
|
|
"updateTime": "1460453360"
|
|
|
},
|
|
|
{
|
|
|
"categoryId": "92",
|
|
|
"createTime": "1460453360",
|
|
|
"labelId": "436",
|
|
|
"labelLevel": "1",
|
|
|
"labelName": "肩型",
|
|
|
"orderBy": "10",
|
|
|
"parentId": "0",
|
|
|
"status": "1",
|
|
|
"updateTime": "1460453360"
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
|
|
|
```
|
|
|
|
|
|
### 对应SQL的操作库表
|
|
|
|
|
|
```xml
|
|
|
<update id="updateBatchByPrimaryKeySelective" parameterType="java.util.List">
|
|
|
update sales_category_label
|
|
|
<trim prefix="set" suffixOverrides=",">
|
|
|
<trim prefix="label_name =case" suffix="end,">
|
|
|
<foreach collection="scLabelList" item="item" index="index">
|
|
|
<if test="item.labelName!=null">
|
|
|
when label_id=#{item.labelId,jdbcType=INTEGER} then #{item.labelName,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
</foreach>
|
|
|
</trim>
|
|
|
<trim prefix="category_id =case" suffix="end,">
|
|
|
<foreach collection="scLabelList" item="item" index="index">
|
|
|
<if test="item.categoryId!=null">
|
|
|
when label_id=#{item.labelId,jdbcType=INTEGER} then #{item.categoryId,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
</foreach>
|
|
|
</trim>
|
|
|
<trim prefix="parent_id =case" suffix="end,">
|
|
|
<foreach collection="scLabelList" item="item" index="index">
|
|
|
<if test="item.parentId!=null">
|
|
|
when label_id=#{item.labelId,jdbcType=INTEGER} then #{item.parentId,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
</foreach>
|
|
|
</trim>
|
|
|
<trim prefix="label_level =case" suffix="end,">
|
|
|
<foreach collection="scLabelList" item="item" index="index">
|
|
|
<if test="item.labelLevel!=null">
|
|
|
when label_id=#{item.labelId,jdbcType=INTEGER} then #{item.labelLevel,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
</foreach>
|
|
|
</trim>
|
|
|
<trim prefix="status =case" suffix="end,">
|
|
|
<foreach collection="scLabelList" item="item" index="index">
|
|
|
<if test="item.status!=null">
|
|
|
when label_id=#{item.labelId,jdbcType=INTEGER} then #{item.status,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
</foreach>
|
|
|
</trim>
|
|
|
<trim prefix="create_time =case" suffix="end,">
|
|
|
<foreach collection="scLabelList" item="item" index="index">
|
|
|
<if test="item.createTime!=null">
|
|
|
when label_id=#{item.labelId,jdbcType=INTEGER} then #{item.createTime,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
</foreach>
|
|
|
</trim>
|
|
|
<trim prefix="update_time =case" suffix="end,">
|
|
|
<foreach collection="scLabelList" item="item" index="index">
|
|
|
<if test="item.updateTime!=null">
|
|
|
when label_id=#{item.labelId,jdbcType=INTEGER} then #{item.updateTime,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
</foreach>
|
|
|
</trim>
|
|
|
<trim prefix="order_by =case" suffix="end,">
|
|
|
<foreach collection="scLabelList" item="item" index="index">
|
|
|
<if test="item.orderBy!=null">
|
|
|
when label_id=#{item.labelId,jdbcType=INTEGER} then #{item.orderBy,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
</foreach>
|
|
|
</trim>
|
|
|
</trim>
|
|
|
where
|
|
|
<foreach collection="scLabelList" separator="or" item="item" index="index" >
|
|
|
label_id= #{item.labelId,jdbcType=INTEGER}
|
|
|
</foreach>
|
|
|
</update>
|
|
|
|
|
|
```
|
|
|
|
|
|
### 响应码
|
|
|
|
|
|
-------------------------
|
|
|
|响应码code|消息|说明|
|
|
|
|--------|----|----|
|
|
|
|200| updateBatchSCLabel success| |
|
|
|
|400| 入口参数异常| |
|
|
|
|
|
|
### 返回
|
|
|
|
|
|
``` json
|
|
|
{
|
|
|
"code": 200,
|
|
|
"data": [],
|
|
|
"md5": "d751713988987e9331980363e24189ce",
|
|
|
"message": "updateBatchSCLabel success."
|
|
|
}
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
...
|
...
|
|