feedback_order_settlement_query.py
2.33 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
41
42
43
44
45
46
47
48
49
50
# -*- coding: utf-8 -*-
"""
@Time : 2021/8/3 15:58
@Auth : wlm
@File :test_feedback_order_settlement_query.py
@IDE :PyCharm
"""
"""
结账管理——列表查询
"""
from commons import common as com
from commons.MySession import my,sy1
class feedback_order_settlement_query():
url = "http://test.jmsf.diligrp.com:8385/FeedbackOrderController/list.action"
header = {
"Host": "test.jmsf.diligrp.com:8385", "Connection": "keep-alive", "Content-Length": "496",
"Accept": "application/json,text/javascript,*/*;q=0.01", "Origin": "http://test.jmsf.diligrp.com:8385",
"X-Requested-With": "XMLHttpRequest",
"User-Agent": "Mozilla/5.0(WindowsNT6.2;WOW64)AppleWebKit/537.36(KHTML,likeGecko)Chrome/84.0.4147.105Safari/537.36",
"Content-Type": "application/x-www-form-urlencoded", "Accept-Language": "zh-CN,zh;q=0.9",
"Referer": "http://test.jmsf.diligrp.com:8385/FeedbackOrderController/list", "Accept-Encoding": "gzip,deflate"
}
# body = '''page=1&order=desc&
# metadata[payTime]={"provider":"datetimeProvider","index":10,"field":"payTime"}
# &metadata[feebackAmount]={"provider":"moneyProvider","index":20,"field":"feebackAmount"}
# &metadata[unsettledAmount]={"provider":"moneyProvider","index":40,"field":"unsettledAmount"}
# &feedbackCustomerId=25&tagId=yjsp&queryType=2&keyword=苹果
# &payTimeStart=2021-07-22 00:00:00&payTimeEnd=2021-08-03 23:59:59'''
body = '''page=1&order=desc
&metadata[payTime]={"provider":"datetimeProvider","index":10,"field":"payTime"}
&metadata[feebackAmount]={"provider":"moneyProvider","index":20,"field":"feebackAmount"}
&metadata[unsettledAmount]={"provider":"moneyProvider","index":40,"field":"unsettledAmount"}
&feedbackCustomerId=25&queryType=2&
&payTimeStart=2021-07-22 00:00:00&payTimeEnd=2021-08-03 23:59:59'''
def __init__(self):
self.url = feedback_order_settlement_query.url.replace("http://test.", com.get_global_config("global_data", "environment", "en"))
self.header = feedback_order_settlement_query.header
self.body = feedback_order_settlement_query.body
# print(self.body)
# fosq = feedback_order_settlement_query
# print(fosq.body)
# re = sy1.post(url = fosq.url, data = fosq.body.encode('utf-8'),headers = fosq.header)
# print(re.text)
# print(re.json())