Authored by qianjun

update

# 货到付款接口服务定义
---------------------
## 查询所有产品SKN和模糊匹配查询产品SKN
> 接口名:`/payDelivery/queryPayDeliveryProductSkn`
### 入参
``` json
{
}
or
{
"idName":"500008"
}
```
-------------------------
|属性名称|类型|例子|说明|
|--------|----|----|----|
|idName|String|"500008"|产品SKN(productSkn,可选)|
---------------------
### 返回
``` json
{
"code": 200,
"data": [
{
"id": 50000855,
"text": "50000855"
},
{
"id": 50000882,
"text": "50000882"
},
{
"id": 50000826,
"text": "50000826"
},
{
"id": 50000800,
"text": "50000800"
},
{
"id": 50000812,
"text": "50000812"
}
],
"message": "操作成功"
}
```
## 查询所有品牌和模糊匹配查询品牌
> 接口名:`/payDelivery/queryPayDeliveryBrandName`
### 入参
``` json
{
}
or
{
"idName":"And"
}
```
-------------------------
|属性名称|类型|例子|说明|
|--------|----|----|----|
|idName|String|"And"|品牌名称(brandName,可选)|
---------------------
### 返回
``` json
{
"code": 200,
"data": [
{
"id": 463,
"text": "anb2rand"
},
{
"id": 469,
"text": "Timberland"
},
{
"id": 519,
"text": "BURANDO ENO"
},
{
"id": 531,
"text": "HYPERGRAND "
},
{
"id": 539,
"text": "STANDARD&GRIND"
},
{
"id": 601,
"text": "Xander Zhou"
}
],
"message": "操作成功"
}
```
## 开启货到付款
> 接口名:`/payDelivery/openPayDelivery`
### 入参
``` json
{
"productSkn":50000855
"brandName" :"SubCrew"
"brandId" :133
}
```
### 公共参数
``` json
{
"x-user-id":"10023"
"x-user-name":qianjun
}
```
-------------------------
|属性名称|类型|例子|说明|
|--------|----|----|----|
|productSkn|int|500008|产品SKN|
|brandName|String|SubCrew|产品SKN|
|brandId|int|133|品牌ID|
|x-user-id|String|"10023"|申请人ID|
|x-user-name|String|"qianjun"|申请人|
---------------------
### 返回
``` json
{
"code": 200,
"message": "开启货到付款操作成功"
}
```
## 关闭货到付款
> 接口名:`/payDelivery/closePayDelivery`
### 入参
``` json
{
"productSkn":50000855
"brandName" :"SubCrew"
"brandId" :133
}
```
### 公共参数
``` json
{
"x-user-id":"10023"
"x-user-name":"qianjun"
}
```
-------------------------
|属性名称|类型|例子|说明|
|--------|----|----|----|
|productSkn|int|500008|产品SKN|
|brandName|String|SubCrew|产品SKN|
|brandId|int|133|品牌ID|
|x-user-id|String|"10023"|申请人ID|
|x-user-name|String|"qianjun"|申请人|
---------------------
### 返回
``` json
{
"code": 200,
"message": "关闭货到付款操作成功"
}
```
## 通过货到付款
> 接口名:`/payDelivery/passPayDelivery`
### 入参
``` json
{
"productSkn":50000855,
"brandName" :"初语"
"brandId" :133
}
```
### 公共参数
``` json
{
"x-user-id":"20002"
"x-user-name":"fengru"
}
```
-------------------------
|属性名称|类型|例子|说明|
|--------|----|----|----|
|productSkn|int|500008|产品SKN|
|brandName|String|SubCrew|产品SKN|
|brandId|int|133|品牌ID|
|x-user-id|String|"10023"|审核人ID|
|x-user-name|String|"qianjun"|审核人|
---------------------
### 返回
``` json
{
"code": 200,
"message": "通过货到付款操作成功"
}
```
## 驳回货到付款
> 接口名:`/payDelivery/rejectPayDelivery`
### 入参
``` json
{
"productSkn":50000855,
"brandName" :"初语"
"brandId" :133
"rejectReason":"不支持货到付款"
}
```
### 公共参数
``` json
{
"x-user-id":"20001"
"x-user-name":"qianjun211"
}
```
-------------------------
|属性名称|类型|例子|说明|
|--------|----|----|----|
|productSkn|int|500008|产品SKN|
|brandName|String|SubCrew|产品SKN|
|brandId|int|133|品牌ID|
|x-user-id|String|"20001"|审核人ID|
|x-user-name|String|"qianjun211"|审核人|
---------------------
### 返回
``` json
{
"code": 200,
"message": "驳回货到付款操作成功"
}
```
# 批量导入货到付款
> 接口名: `/batch/import`
### 入参
``` json
{
"type":"payDeliveryModify",
"file":"具体文件流"
}
```
### 公共参数
``` json
{
"x-user-id":"20001"
"x-user-name":"qianjun211"
}
```
-------------------------
|属性名称|类型|例子|说明
|--------|----|----|----|
|type|String|payDeliveryModify|货到付款键类型|
|file|file|下载url为"/common/payDelivery.xlsx"|文件|
|x-user-id|String|"10023"|申请人ID|
|x-user-name|String|"qianjun"|申请人|
---------------------
### 返回
``` json
{
"code": 200,
"data": {
"failFileReason": [],
"successList": [
{
"brandId": 46,
"isPayDelivery": 0,
"productSkn": 50001168
},
{
"brandId": 108,
"isPayDelivery": 1,
"productSkn": 50001829
}
]
},
"message": "处理成功"
}
```
## 查询全部列表或待审核列表或驳回列表
> 接口名:`/payDelivery/queryPayDeliveryList`
### 入参
``` json
{
"status":100
}
or
{
"status":100
"productSkn" :50000855,
"brandId":300,
"isPayDelivery":1
}
```
-------------------------
|属性名称|类型|例子|说明|
|--------|----|----|----|
|stutas|int|100|货到付款状态(400: 全部 100:待审核 300:驳回 )|
|productSkn|int|500008|产品SKN(可选)|
|brandId|int |133|品牌ID(可选)|
|isPayDelivery|int|0|是否支持货到付款(0、不支持货到付款 1、支持货到付款 ,可选)|
---------------------
### 注意:全部列表:传"status":400 ,待审核列表: 传"status":100,驳回列表:传"status":300
### 返回
``` json
{
"code": 200,
"data": {
"list": [
{
"applicant": "qianjun",
"brandName": "glamourflage",
"createTime": "2016-04-11 21:22:44",
"productSkn": 50001168,
"rejectReason": "质量不行"
}
],
"page": 1,
"size": 10,
"total": 1,
"totalPage": 1
},
"message": "操作成功"
}
```
# 货到付款接口服务定义
---------------------
## 查询所有产品SKN和模糊匹配查询产品SKN
> 接口名:`/payDelivery/queryPayDeliveryProductSkn`
### 入参
``` json
{
}
or
{
"idName":"500008"
}
```
-------------------------
|属性名称|类型|例子|说明|是否必填|长度限制|
|--------|----|----|----|----|----|
|idName|String|"500008"|产品SKN(productSkn)|可选|无|
---------------------
### 对应SQL的操作库表(数据库 yh_shops,表product)
```xml
<select id="selectPayDeliveryProductSkn" resultMap="ProductPayDeliveryResultMap">
select
<include refid="ProductPayDelivery_Column_List" />
from product
<where>
<if test="productSkn != null and productSkn != ''">
erp_product_id like concat('%',#{productSkn},'%')
</if>
</where>
limit 100
</select>
```
### 错误编码
-------------------------
|错误码code|消息|说明|
|----------|----|----|
|无|无|无|
### 返回
``` json
{
"code": 200,
"data": [
{
"id": 50000855,
"text": "50000855"
},
{
"id": 50000882,
"text": "50000882"
},
{
"id": 50000826,
"text": "50000826"
},
{
"id": 50000800,
"text": "50000800"
},
{
"id": 50000812,
"text": "50000812"
}
],
"message": "操作成功"
}
```
## 查询所有品牌和模糊匹配查询品牌
> 接口名:`/payDelivery/queryPayDeliveryBrandName`
### 入参
``` json
{
}
or
{
"idName":"And"
}
```
-------------------------
|属性名称|类型|例子|说明|是否必填|长度限制|
|--------|----|----|----|----|----|
|idName|String|"And"|品牌名称(brandName)|可选|无|
---------------------
### 对应SQL的操作库表(数据库 yh_shops,表brand)
```xml
<select id="selectPayDeliveryBrandName" resultMap="BrandPayDeliveryResultMap">
select
<include refid="BrandPayDelivery_Column_List"/>
from brand
<where>
<if test="brandName!=null and brandName!=''">
brand_name like concat('%',#{brandName},'%')
</if>
</where>
limit 100
</select>
```
### 错误编码
-------------------------
|错误码code|消息|说明|
|----------|----|----|
|无|无|无|
### 返回
``` json
{
"code": 200,
"data": [
{
"id": 463,
"text": "anb2rand"
},
{
"id": 469,
"text": "Timberland"
},
{
"id": 519,
"text": "BURANDO ENO"
},
{
"id": 531,
"text": "HYPERGRAND "
},
{
"id": 539,
"text": "STANDARD&GRIND"
},
{
"id": 601,
"text": "Xander Zhou"
}
],
"message": "操作成功"
}
```
## 开启货到付款
> 接口名:`/payDelivery/openPayDelivery`
### 入参
``` json
{
"productSkn":50000855
"brandName" :"SubCrew"
"brandId" :133
}
```
### 公共参数
``` json
{
"x-user-id":"10023"
"x-user-name":qianjun
}
```
-------------------------
|属性名称|类型|例子|说明|
|--------|----|----|----|
|productSkn|int|500008|产品SKN|
|brandName|String|SubCrew|产品SKN|
|brandId|int|133|品牌ID|
|x-user-id|String|"10023"|申请人ID|
|x-user-name|String|"qianjun"|申请人|
---------------------
### 返回
``` json
{
"code": 200,
"message": "开启货到付款操作成功"
}
```
## 关闭货到付款
> 接口名:`/payDelivery/closePayDelivery`
### 入参
``` json
{
"productSkn":50000855
"brandName" :"SubCrew"
"brandId" :133
}
```
### 公共参数
``` json
{
"x-user-id":"10023"
"x-user-name":"qianjun"
}
```
-------------------------
|属性名称|类型|例子|说明|
|--------|----|----|----|
|productSkn|int|500008|产品SKN|
|brandName|String|SubCrew|产品SKN|
|brandId|int|133|品牌ID|
|x-user-id|String|"10023"|申请人ID|
|x-user-name|String|"qianjun"|申请人|
---------------------
### 返回
``` json
{
"code": 200,
"message": "关闭货到付款操作成功"
}
```
## 通过货到付款
> 接口名:`/payDelivery/passPayDelivery`
### 入参
``` json
{
"productSkn":50000855,
"brandName" :"初语"
"brandId" :133
}
```
### 公共参数
``` json
{
"x-user-id":"20002"
"x-user-name":"fengru"
}
```
-------------------------
|属性名称|类型|例子|说明|
|--------|----|----|----|
|productSkn|int|500008|产品SKN|
|brandName|String|SubCrew|产品SKN|
|brandId|int|133|品牌ID|
|x-user-id|String|"10023"|审核人ID|
|x-user-name|String|"qianjun"|审核人|
---------------------
### 返回
``` json
{
"code": 200,
"message": "通过货到付款操作成功"
}
```
## 驳回货到付款
> 接口名:`/payDelivery/rejectPayDelivery`
### 入参
``` json
{
"productSkn":50000855,
"brandName" :"初语"
"brandId" :133
"rejectReason":"不支持货到付款"
}
```
### 公共参数
``` json
{
"x-user-id":"20001"
"x-user-name":"qianjun211"
}
```
-------------------------
|属性名称|类型|例子|说明|
|--------|----|----|----|
|productSkn|int|500008|产品SKN|
|brandName|String|SubCrew|产品SKN|
|brandId|int|133|品牌ID|
|x-user-id|String|"20001"|审核人ID|
|x-user-name|String|"qianjun211"|审核人|
---------------------
### 返回
``` json
{
"code": 200,
"message": "驳回货到付款操作成功"
}
```
# 批量导入货到付款
> 接口名: `/batch/import`
### 入参
``` json
{
"type":"payDeliveryModify",
"file":"具体文件流"
}
```
### 公共参数
``` json
{
"x-user-id":"20001"
"x-user-name":"qianjun211"
}
```
-------------------------
|属性名称|类型|例子|说明
|--------|----|----|----|
|type|String|payDeliveryModify|货到付款键类型|
|file|file|下载url为"/common/payDelivery.xlsx"|文件|
|x-user-id|String|"10023"|申请人ID|
|x-user-name|String|"qianjun"|申请人|
---------------------
### 返回
``` json
{
"code": 200,
"data": {
"failFileReason": [],
"successList": [
{
"brandId": 46,
"isPayDelivery": 0,
"productSkn": 50001168
},
{
"brandId": 108,
"isPayDelivery": 1,
"productSkn": 50001829
}
]
},
"message": "处理成功"
}
```
## 查询全部列表或待审核列表或驳回列表
> 接口名:`/payDelivery/queryPayDeliveryList`
### 入参
``` json
{
"status":100
}
or
{
"status":100
"productSkn" :50000855,
"brandId":300,
"isPayDelivery":1
}
```
-------------------------
|属性名称|类型|例子|说明|
|--------|----|----|----|
|stutas|int|100|货到付款状态(400: 全部 100:待审核 300:驳回 )|
|productSkn|int|500008|产品SKN(可选)|
|brandId|int |133|品牌ID(可选)|
|isPayDelivery|int|0|是否支持货到付款(0、不支持货到付款 1、支持货到付款 ,可选)|
---------------------
### 注意:全部列表:传"status":400 ,待审核列表: 传"status":100,驳回列表:传"status":300
### 返回
``` json
{
"code": 200,
"data": {
"list": [
{
"applicant": "qianjun",
"brandName": "glamourflage",
"createTime": "2016-04-11 21:22:44",
"productSkn": 50001168,
"rejectReason": "质量不行"
}
],
"page": 1,
"size": 10,
"total": 1,
"totalPage": 1
},
"message": "操作成功"
}
```
... ...