修改水控参数卡接口
diff --git "a/source/_posts/\344\270\200\345\215\241\351\200\232\350\257\273\345\215\241\346\234\215\345\212\241\346\216\245\345\217\243\346\226\207\346\241\243.md" "b/source/_posts/\344\270\200\345\215\241\351\200\232\350\257\273\345\215\241\346\234\215\345\212\241\346\216\245\345\217\243\346\226\207\346\241\243.md"
index 35664ac..776714a 100644
--- "a/source/_posts/\344\270\200\345\215\241\351\200\232\350\257\273\345\215\241\346\234\215\345\212\241\346\216\245\345\217\243\346\226\207\346\241\243.md"
+++ "b/source/_posts/\344\270\200\345\215\241\351\200\232\350\257\273\345\215\241\346\234\215\345\212\241\346\216\245\345\217\243\346\226\207\346\241\243.md"
@@ -64,7 +64,7 @@
`beep`: 读卡器蜂鸣
* **返回**
无
-
+
## 加载密钥卡
* **URL: /4/keycard/<action>**
@@ -83,7 +83,7 @@
* **返回**
无
-
+
## PSAM卡操作
* **URL: /4/samcard/<action>**
@@ -108,7 +108,7 @@
startdate - 启用日期
publishid - 发行方ID
userid - 用户ID
-
+
`recycle`: 回收PSAM卡
`read`: 读取PSAM卡信息
`readsamno`: 读取SAM卡号
@@ -294,7 +294,7 @@
creditseqno: 授信序号
transflag: 交易标志
> legal: 认证状态: valid 表示合法,invalid 表示不合法
-
+
## 清空卡信息
* **URL: /4/cardoper/<action>**
@@ -306,7 +306,7 @@
* **请求参数**
`recyle`: 清空卡信息
-> water - 水控钱包号列表,例如 1,2
+> water - 水控钱包号列表,例如 1,2
* **返回**
无
@@ -385,13 +385,13 @@
price2 - 水价2, 单位分
price3 - 水价3, 单位分
expireddate - 有效期, 格式 YYYYMMDD
-
+
`recycle`: 回收水控钱包
> waterid - 水控钱包号
-
+
`read`: 读取水控钱包信息
> waterid - 水控钱包号
-
+
`write`: 写水控钱包
> waterid - 水控钱包号
cardno - 卡号
@@ -402,7 +402,7 @@
price2 - 水价2, 单位分
price3 - 水价3, 单位分
expiredate - 有效期, 格式 YYYYMMDD
-
+
* **返回**
`waterid`: 被操作的水控钱包号
`cardno`: 卡号
@@ -416,7 +416,7 @@
## 密钥卡发行、克隆、回收
* **URL: /4/key/<action>**
-* **请求方式**
+* **请求方式**
`GET`
* **Url 参数**
@@ -432,10 +432,10 @@
`loadkeycard`: 加载密钥卡
> pin - PIN 码
-
+
`dumpkeys`: 保存密钥
> pin - PIN 码
-
+
* **返回**
`dumpkeys`: 读取密钥
> keys - 返回密钥串
@@ -449,16 +449,49 @@
`action`: 可选值 write, read, recycle
* **请求参数**
-`write`: 发行水控卡时
-> water_flag: 水控卡标志
-> packget_num: 水控钱包号
-> main_work_key: 主钱包密钥
-> packget_work_key: 水控钱包密钥
-> work_mode: 水控模式
-> water_packet_limit: 水控钱包上限
-> feecfg: [{"feetype": 3, "rate": [{"start": 0, "deduct_time":10, "deduct_fee": 5}, {"start": 5, "deduct_time":15, "deduct_fee": 5}]}]
-> transfer_limit: 水控转账限额
- `read`: 读取水控参数卡
- `recycle`: 回收水控参数卡
+`write` - 写参数卡
+请求格式为 json , Content-Type: application/json;
+
+`water_flag`: 水控卡标志
+`packget_num`: 水控钱包号
+`main_work_key`: 主钱包密钥
+`packget_work_key`: 水控钱包密钥
+`work_mode`: 水控模式
+`water_packet_limit`: 水控钱包上限
+`transfer_limit`: 水控转账限额
+`feecfg`: 费率配置
+`feetype`: 收费类别
+`rate`: 费率
+`start`: 开始计费时间(分)/流量(升)
+`deduct_time`: 计费单位时间(秒)/流量(升)
+`deduct_fee` : 计费单位费率(金额分)
+
+~~~json
+{
+"water_flag": "LYCS",
+"packget_num": 1,
+"main_work_key": "4344334539413846",
+"packget_work_key": "4344334539413846",
+"work_mode": 1,
+"water_packet_limit": 5000,
+"transfer_limit": 500,
+"feecfg": [
+ {"feetype": 3,
+ "rate": [
+ {"start": 0, "deduct_time":10, "deduct_fee": 5},
+ {"start": 5, "deduct_time":15, "deduct_fee": 5}]
+ },
+ {"feetype": 6,
+ "rate": [
+ {"start": 0, "deduct_time":5, "deduct_fee": 5},
+ {"start": 3, "deduct_time":30, "deduct_fee": 10}]
+ }
+ ]
+}
+~~~
+
+
+`read`: 读取水控参数卡
+`recycle`: 回收水控参数卡