cardStock.py
1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#coding=utf-8
# @Time : 2021/7/16 14:09
# @Author : Ljq
# @File : cardStock.py
# @Software: PyCharm
"""
卡片库存接口
"""
import requests
import json
from commons.readConf import readConfig
print("cS")
def cardVoid(cardHost,webHeaders,cardNo):
url = cardHost+"/cardStorage/cardVoid.action"
webHeaders["Content-Type"] = "application/x-www-form-urlencoded; charset=UTF-8"
data = {"cardNo":cardNo}
res = requests.post(url=url,headers=webHeaders,data=data)
return res
def queryCardStorageList(cardHost,webHeaders,**kwargs):
"""
卡片库存查询
:param cardHost:
:param webHeaders:
:param kwargs: {"rows":"10","page":"1","sort":"create_time","order":"desc","type":"10","cardFace":"buyer","state":"1","cardNo":"210524153943","startDate":"2021-05-24","endDate":"2021-05-24"}
:return:
"""
url = cardHost+"/cardStorage/queryCardStorageList.action"
webHeaders["Content-Type"] = "application/x-www-form-urlencoded; charset=UTF-8"
data = {"rows":"10","page":"1","sort":"create_time","order":"desc"}
data = dict(data,**kwargs)
res = requests.post(url=url,headers=webHeaders,data=data)
return res