Authored by qianjun

Revert "update"

This reverts commit 90eed051.
... ... @@ -199,13 +199,14 @@ or
#{auditor,jdbcType=VARCHAR}, #{auditorPid,jdbcType=SMALLINT}, #{rejectReason,jdbcType=VARCHAR},
#{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER})
```
### 涉及字段id, product_skn, brand_name, brand_id, is_pay_delivery, check_status, applicant, applicant_pid,create_time
### 涉及字段id, product_skn, brand_name, brand_id, is_pay_delivery, check_status, applicant, applicant_pid,create_time,其中is_pay_delivery=1,check_status=200
### 错误编码
-------------------------
|错误码code|消息|说明|
|----------|----|----|
|500|开启货到付款操作失败|数据库没有插入记录或前台没有传入数据|
|200|开启货到付款操作成功||
### 返回
``` json
... ... @@ -235,14 +236,35 @@ or
}
```
-------------------------
|属性名称|类型|例子|说明|
|--------|----|----|----|
|productSkn|int|500008|产品SKN|
|brandName|String|SubCrew|产品SKN|
|brandId|int|133|品牌ID|
|x-user-id|String|"10023"|申请人ID|
|x-user-name|String|"qianjun"|申请人|
|属性名称|类型|例子|说明|是否必填|长度限制|
|--------|----|----|----|-----|----|
|productSkn|int|500008|产品SKN|是|无|
|brandName|String|SubCrew|品牌名称|是|无|
|brandId|int|133|品牌ID|是|无|
|x-user-id|String|"10023"|申请人ID|是|无|
|x-user-name|String|"qianjun"|申请人|是|无|
---------------------
### 1. 对应SQL的操作库表(数据库 erp_product, 表product_pay_delivery_check,插入一条记录)
```xml
<insert id="insert" parameterType="com.yohobuy.platform.dal.product.model.ProductPayDeliveryCheck" >
insert into product_pay_delivery_check (id, product_skn, product_id,
brand_name, brand_id, is_pay_delivery,
check_status, applicant, applicant_pid,
auditor, auditor_pid, reject_reason,
create_time, update_time)
values (#{id,jdbcType=INTEGER}, #{productSkn,jdbcType=INTEGER}, #{productId,jdbcType=INTEGER},
#{brandName,jdbcType=VARCHAR}, #{brandId,jdbcType=SMALLINT}, #{isPayDelivery,jdbcType=TINYINT},
#{checkStatus,jdbcType=SMALLINT}, #{applicant,jdbcType=VARCHAR}, #{applicantPid,jdbcType=SMALLINT},
#{auditor,jdbcType=VARCHAR}, #{auditorPid,jdbcType=SMALLINT}, #{rejectReason,jdbcType=VARCHAR},
#{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER})
```
### 涉及字段id, product_skn, brand_name, brand_id, is_pay_delivery, check_status, applicant, applicant_pid,create_time,其中is_pay_delivery=0,check_status=100
### 错误编码
-------------------------
|错误码code|消息|说明|
|----------|----|----|
|500|关闭货到付款操作失败|数据库没有插入记录或前台没有传入数据|
|200|关闭货到付款操作成功||
### 返回
... ... @@ -260,6 +282,7 @@ or
### 入参
``` json
{
"id": 83
"productSkn":50000855,
"brandName" :"初语"
"brandId" :133
... ... @@ -273,13 +296,51 @@ or
}
```
-------------------------
|属性名称|类型|例子|说明|
|--------|----|----|----|
|productSkn|int|500008|产品SKN|
|brandName|String|SubCrew|产品SKN|
|brandId|int|133|品牌ID|
|x-user-id|String|"10023"|审核人ID|
|x-user-name|String|"qianjun"|审核人|
|属性名称|类型|例子|说明|是否必填|长度限制|
|--------|----|----|----|-----|----|
|id|int|83|数据库记录ID|是|无|
|productSkn|int|500008|产品SKN|是|无|
|brandName|String|SubCrew|品牌名称|是|无|
|brandId|int|133|品牌ID|是|无|
|x-user-id|String|"10023"|审核人ID|是|无|
|x-user-name|String|"qianjun"|审核人|是|无|
---------------------
### 1. 对应SQL的操作库表(数据库 yh_shops, 表product, 字段is_pay_delivery=0)
```xml
<update id="updatePayDeliveryStatus">
update product
set is_pay_delivery = #{isPayDelivery,jdbcType=TINYINT}
where erp_product_id= #{productSkn,jdbcType=INTEGER}
</update>
```
### 2. 对应SQL的操作库表(数据库 erp_product, 表product_pay_delivery_check,更新一条记录)
```xml
<update id="updateByPrimaryKey" parameterType="com.yohobuy.platform.dal.product.model.ProductPayDeliveryCheck" >
update product_pay_delivery_check
set product_skn = #{productSkn,jdbcType=INTEGER},
product_id = #{productId,jdbcType=INTEGER},
brand_name = #{brandName,jdbcType=VARCHAR},
brand_id = #{brandId,jdbcType=SMALLINT},
is_pay_delivery = #{isPayDelivery,jdbcType=TINYINT},
check_status = #{checkStatus,jdbcType=SMALLINT},
applicant = #{applicant,jdbcType=VARCHAR},
applicant_pid = #{applicantPid,jdbcType=SMALLINT},
auditor = #{auditor,jdbcType=VARCHAR},
auditor_pid = #{auditorPid,jdbcType=SMALLINT},
reject_reason = #{rejectReason,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=INTEGER},
update_time = #{updateTime,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
```
### 涉及字段id, check_status, auditor, auditor_pid,update_time,其中check_status=200,update_time
### 错误编码
-------------------------
|错误码code|消息|说明|
|----------|----|----|
|500|通过货到付款操作失败|数据库没有插入记录或前台没有传入数据|
|200|通过货到付款操作成功||
---------------------
### 返回
... ... @@ -298,6 +359,7 @@ or
### 入参
``` json
{
"id": 83
"productSkn":50000855,
"brandName" :"初语"
"brandId" :133
... ... @@ -314,11 +376,42 @@ or
-------------------------
|属性名称|类型|例子|说明|
|--------|----|----|----|
|productSkn|int|500008|产品SKN|
|brandName|String|SubCrew|产品SKN|
|brandId|int|133|品牌ID|
|x-user-id|String|"20001"|审核人ID|
|x-user-name|String|"qianjun211"|审核人|
|id|int|83|数据库记录ID|是|无|
|productSkn|int|500008|产品SKN|是|无|
|brandName|String|SubCrew|品牌名称|是|无|
|brandId|int|133|品牌ID|是|无|
|rejectReason|String|不支持货到付款|驳回原因|是|无|
|x-user-id|String|"10023"|审核人ID|是|无|
|x-user-name|String|"qianjun"|审核人|是|无|
---------------------
### 1. 对应SQL的操作库表(数据库 erp_product, 表product_pay_delivery_check,更新一条记录)
```xml
<update id="updateByPrimaryKey" parameterType="com.yohobuy.platform.dal.product.model.ProductPayDeliveryCheck" >
update product_pay_delivery_check
set product_skn = #{productSkn,jdbcType=INTEGER},
product_id = #{productId,jdbcType=INTEGER},
brand_name = #{brandName,jdbcType=VARCHAR},
brand_id = #{brandId,jdbcType=SMALLINT},
is_pay_delivery = #{isPayDelivery,jdbcType=TINYINT},
check_status = #{checkStatus,jdbcType=SMALLINT},
applicant = #{applicant,jdbcType=VARCHAR},
applicant_pid = #{applicantPid,jdbcType=SMALLINT},
auditor = #{auditor,jdbcType=VARCHAR},
auditor_pid = #{auditorPid,jdbcType=SMALLINT},
reject_reason = #{rejectReason,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=INTEGER},
update_time = #{updateTime,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
```
### 涉及字段id, check_status, auditor, auditor_pid, reject_reason,update_time,其中check_status=300,update_time
### 错误编码
-------------------------
|错误码code|消息|说明|
|----------|----|----|
|500|驳回货到付款操作成功|数据库没有插入记录或前台没有传入数据|
|200|驳回货到付款操作成功||
---------------------
### 返回
... ... @@ -406,7 +499,7 @@ or
|isPayDelivery|int|0|是否支持货到付款(0、不支持货到付款 1、支持货到付款 ,可选)|
---------------------
### 注意:全部列表:传"status":400 ,待审核列表: 传"status":100,驳回列表:传"status":300
### 全部列表返回
### 返回
``` json
{
... ... @@ -414,83 +507,11 @@ or
"data": {
"list": [
{
"applicant": "qianjun",
"brandName": "glamourflage",
"id": 0,
"isPayDelivery": 0,
"productSkn": 50000855
},
{
"brandName": "glamourflage",
"id": 0,
"isPayDelivery": 1,
"productSkn": 50001168
}
],
"page": 1,
"size": 10,
"total": 1,
"totalPage": 1
},
"message": "操作成功"
}
```
### 待审核列表返回
{
"code": 200,
"data": {
"list": [
{
"applicant": "wxtest1",
"brandName": "ZETETIC",
"createTime": "2016-04-13 10:20:08",
"id": 95,
"isPayDelivery": 0,
"productSkn": 50000297
},
{
"applicant": "wxtest1",
"brandName": "ZETETIC",
"createTime": "2016-04-13 10:22:30",
"id": 99,
"isPayDelivery": 0,
"productSkn": 50000297
}
],
"page": 1,
"size": 10,
"total": 1,
"totalPage": 1
},
"message": "操作成功"
}
### 驳回列表返回
``` json
{
"code": 200,
"data": {
{
"code": 200,
"data": {
"list": [
{
"applicant": "frw",
"brandName": "frw",
"createTime": "2016-04-12 18:34:33",
"id": 73,
"isPayDelivery": 0,
"productSkn": 50000055,
"rejectReason": "dfdfdfdf"
},
{
"applicant": "frw",
"brandName": "frw",
"createTime": "2016-04-12 19:03:45",
"id": 75,
"isPayDelivery": 0,
"productSkn": 50000055,
"rejectReason": "dfdfdfdf"
"createTime": "2016-04-11 21:22:44",
"productSkn": 50001168,
"rejectReason": "质量不行"
}
],
"page": 1,
... ...