Commit d7ab0697de40c449046fe1c39acd13159b7ea45d
Merge remote-tracking branch 'origin/master'
Showing
6 changed files
with
198 additions
and
0 deletions
commons/api/feedbackAccounrecordController_list.py
0 → 100644
1 | +# -*- coding: utf-8 -*- | |
2 | +""" | |
3 | +@Time : 2021/8/5 9:59 | |
4 | +@Auth : wlm | |
5 | +@File :feedbackAccounrecordController_list.py | |
6 | +@IDE :PyCharm | |
7 | +""" | |
8 | +from commons import common as com | |
9 | +from commons.MySession import my,sy1 | |
10 | + | |
11 | +class feedbackAccounrecordController_list(): | |
12 | + url = "http://test.jmsf.diligrp.com:8385/FeedbackAccounrecordController/list.action" | |
13 | + header = { | |
14 | + "Host": "test.jmsf.diligrp.com:8385", "Connection": "keep-alive", "Content-Length": "631", | |
15 | + "Accept": "application/json,text/javascript,*/*;q=0.01", "Origin": "http://test.jmsf.diligrp.com:8385", | |
16 | + "X-Requested-With": "XMLHttpRequest", | |
17 | + "User-Agent": "Mozilla/5.0(WindowsNT6.2;WOW64)AppleWebKit/537.36(KHTML,likeGecko)Chrome/84.0.4147.105Safari/537.36", | |
18 | + "Content-Type": "application/x-www-form-urlencoded", "Accept-Language": "zh-CN,zh;q=0.9", | |
19 | + "Referer": "http://test.jmsf.diligrp.com:8385/FeedbackAccounrecordController/list", | |
20 | + "Accept-Encoding": "gzip,deflate" | |
21 | + } | |
22 | + # body = '''rows=10&page=1&order=desc | |
23 | + # &metadata[created]={"provider":"datetimeProvider","index":10,"field":"created"} | |
24 | + # &metadata[recordType]={"provider":"recordTypeProvider","index":20,"field":"recordType"} | |
25 | + # &metadata[recordState]={"provider":"recordStateProvider","index":30,"field":"recordState"} | |
26 | + # &metadata[recordAmount]={"provider":"moneyProvider","index":40,"field":"recordAmount"} | |
27 | + # &createdStart=2021-08-05 00:00:00 | |
28 | + # &createdEnd=2021-08-05 23:59:59 | |
29 | + # &queryType=1 | |
30 | + # &keyword=1075782308694007808''' | |
31 | + # body = '''rows=10&page=1&order=desc&metadata[created]={"provider":"datetimeProvider","index":10,"field":"created"}&metadata[recordType]={"provider":"recordTypeProvider","index":20,"field":"recordType"}&metadata[recordState]={"provider":"recordStateProvider","index":30,"field":"recordState"}&metadata[recordAmount]={"provider":"moneyProvider","index":40,"field":"recordAmount"}&createdStart=2021-08-05 00:00:00&createdEnd=2021-08-05 23:59:59&queryType=1&keyword=1075782308694007808''' | |
32 | + body = '''rows=10& | |
33 | + page=1&order=desc& | |
34 | + metadata[created]={"provider":"datetimeProvider","index":10,"field":"created"}& | |
35 | + metadata[recordType]={"provider":"recordTypeProvider","index":20,"field":"recordType"}& | |
36 | + metadata[recordState]={"provider":"recordStateProvider","index":30,"field":"recordState"}& | |
37 | + metadata[recordAmount]={"provider":"moneyProvider","index":40,"field":"recordAmount"}& | |
38 | + createdStart=2021-08-05 00:00:00& | |
39 | + createdEnd=2021-08-05 23:59:59&queryType=1&keyword=1075782308694007808''' | |
40 | + | |
41 | + def __init__(self): | |
42 | + self.url = feedbackAccounrecordController_list.url.replace("http://test.",com.get_global_config("global_data", "environment", "en")) | |
43 | + self.header = feedbackAccounrecordController_list.header | |
44 | + self.body = feedbackAccounrecordController_list.body | |
45 | + | |
46 | +farc = feedbackAccounrecordController_list() | |
47 | +print(farc.body) | |
48 | +re = sy1.post(url = farc.url,headers = farc.header,data = farc.body.replace("\n", ""),proxies = my.myproxies) | |
49 | +print(re.json()) | |
0 | 50 | \ No newline at end of file | ... | ... |
commons/api/feedbackOrderController_querySumAmount.py
0 → 100644
1 | +# -*- coding: utf-8 -*- | |
2 | +""" | |
3 | +@Time : 2021/8/5 9:33 | |
4 | +@Auth : wlm | |
5 | +@File :feedbackOrderController_querySumAmount.py | |
6 | +@IDE :PyCharm | |
7 | +""" | |
8 | +from commons import common as com | |
9 | +from commons.MySession import my,sy1 | |
10 | + | |
11 | +class querySumAmount(): | |
12 | + url = "http://test.jmsf.diligrp.com:8385/FeedbackOrderController/querySumAmount.action" | |
13 | + | |
14 | + header = { | |
15 | + "Host": "test.jmsf.diligrp.com:8385", "Connection": "keep-alive", "Content-Length": "165", | |
16 | + "Accept": "application/json,text/javascript,*/*;q=0.01", "Origin": "http://test.jmsf.diligrp.com:8385", | |
17 | + "X-Requested-With": "XMLHttpRequest", | |
18 | + "User-Agent": "Mozilla/5.0(WindowsNT6.2;WOW64)AppleWebKit/537.36(KHTML,likeGecko)Chrome/84.0.4147.105Safari/537.36", | |
19 | + "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8", "Accept-Language": "zh-CN,zh;q=0.9", | |
20 | + "Referer": "http://test.jmsf.diligrp.com:8385/FeedbackOrderController/settlementlist", | |
21 | + "Accept-Encoding": "gzip,deflate" | |
22 | + } | |
23 | + | |
24 | + # body = "feedbackCustomerId=25&departmentId=56&tagId=yjsp&settleTimeStart=2021-08-02 00:00:00&settleTimeEnd=2021-08-05 23:59:59&queryType=1&keyword=苹果" | |
25 | + body = "feedbackCustomerId=25&settleTimeStart=2021-07-05 00:00:00&settleTimeEnd=2021-08-05 09:46:25&queryType=1" | |
26 | + def __init__(self): | |
27 | + self.url = querySumAmount.url.replace("http://test.",com.get_global_config("global_data", "environment", "en")) | |
28 | + self.header = querySumAmount.header | |
29 | + self.body = querySumAmount.body | |
30 | + | |
31 | +qsm = querySumAmount() | |
32 | +re = sy1.post(url = qsm.url,data = qsm.body.encode('utf-8'),headers = qsm.header) | |
33 | +print(re.json()) | |
0 | 34 | \ No newline at end of file | ... | ... |
commons/api/feedbackOrderController_settlementlist.py
0 → 100644
1 | +# -*- coding: utf-8 -*- | |
2 | +""" | |
3 | +@Time : 2021/8/5 16:23 | |
4 | +@Auth : wlm | |
5 | +@File :feedbackOrderController_settlementlist.py | |
6 | +@IDE :PyCharm | |
7 | +""" | |
8 | +# -*- coding: utf-8 -*- | |
9 | +from commons import common as com | |
10 | +from commons.MySession import sy1 | |
11 | + | |
12 | +class feedbackOrderController_settlementlist(): | |
13 | + url = "http://test.jmsf.diligrp.com:8385/FeedbackOrderController/settlementlist.action" | |
14 | + | |
15 | + header = { | |
16 | + "Host": "test.jmsf.diligrp.com:8385", "Connection": "keep-alive", "Content-Length": "651", | |
17 | + "Accept": "application/json,text/javascript,*/*;q=0.01", "Origin": "http://test.jmsf.diligrp.com:8385", | |
18 | + "X-Requested-With": "XMLHttpRequest", | |
19 | + "User-Agent": "Mozilla/5.0(WindowsNT6.2;WOW64)AppleWebKit/537.36(KHTML,likeGecko)Chrome/84.0.4147.105Safari/537.36", | |
20 | + "Content-Type": "application/x-www-form-urlencoded", "Accept-Language": "zh-CN,zh;q=0.9", | |
21 | + "Referer": "http://test.jmsf.diligrp.com:8385/FeedbackOrderController/settlementlist", | |
22 | + "Accept-Encoding": "gzip,deflate" | |
23 | + } | |
24 | + | |
25 | + # body = '''rows=10 | |
26 | + # &page=1 | |
27 | + # &sort=efb.payment_time | |
28 | + # &order=desc | |
29 | + # &metadata[payTime]={"provider":"datetimeProvider","index":10,"field":"payTime"} | |
30 | + # &metadata[feebackAmount]={"provider":"moneyProvider","index":20,"field":"feebackAmount"} | |
31 | + # &metadata[settledAmount]={"provider":"moneyProvider","index":30,"field":"settledAmount"} | |
32 | + # &metadata[settleTime]={"provider":"datetimeProvider","index":40,"field":"settleTime"} | |
33 | + # &feedbackCustomerId=25 | |
34 | + # &departmentId=56 | |
35 | + # &tagId=yjsp | |
36 | + # &settleTimeStart=2021-08-04 00:00:00 | |
37 | + # &settleTimeEnd=2021-08-05 23:59:59 | |
38 | + # &queryType=1''' | |
39 | + body = '''rows=10 | |
40 | + &page=1 | |
41 | + &sort=efb.payment_time | |
42 | + &order=desc | |
43 | + &metadata[payTime]={"provider":"datetimeProvider","index":10,"field":"payTime"} | |
44 | + &metadata[feebackAmount]={"provider":"moneyProvider","index":20,"field":"feebackAmount"} | |
45 | + &metadata[settledAmount]={"provider":"moneyProvider","index":30,"field":"settledAmount"} | |
46 | + &metadata[settleTime]={"provider":"datetimeProvider","index":40,"field":"settleTime"} | |
47 | + &feedbackCustomerId=25 | |
48 | + &settleTimeStart=2021-08-04 00:00:00 | |
49 | + &settleTimeEnd=2021-08-05 23:59:59 | |
50 | + &queryType=1''' | |
51 | + def __init__(self): | |
52 | + self.url = feedbackOrderController_settlementlist.url.replace("http://test.",com.get_global_config("global_data", "environment", "en")) | |
53 | + self.header = feedbackOrderController_settlementlist.header | |
54 | + self.body = feedbackOrderController_settlementlist.body | |
55 | + | |
56 | +focsl = feedbackOrderController_settlementlist() | |
57 | +re = sy1.post(url = focsl.url,data = focsl.body,headers = focsl.header) | |
58 | +print(re.json()) | |
0 | 59 | \ No newline at end of file | ... | ... |
testcase/feedbackAccounrecordController_list/feedbackAccounrecordController_list.py
0 → 100644
1 | +import unittest | |
2 | +import urllib3 | |
3 | +from commons.MySession import my,sy1 | |
4 | +from commons.api.feedbackAccounrecordController_list import feedbackAccounrecordController_list | |
5 | +urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) | |
6 | +import commons.ConfigDB as db | |
7 | +farcl = feedbackAccounrecordController_list() | |
8 | + | |
9 | +class test_feedbackAccounrecordController_list(unittest.TestCase): | |
10 | + "交易明细——交易流水号查询" | |
11 | + @classmethod | |
12 | + def setUpClass(cls): | |
13 | + pass | |
14 | + def setUp(self): | |
15 | + self.body = db.mysql_selectOne( | |
16 | + '''SELECT dili_jmsf.feedback_account_record.created,dili_jmsf.feedback_order.record_number | |
17 | +FROM `dili_jmsf`.`feedback_order` LEFT JOIN `dili_jmsf`.`feedback_account_record` ON dili_jmsf.feedback_order.id = dili_jmsf.feedback_account_record.order_ids | |
18 | +ORDER BY dili_jmsf.feedback_account_record.order_ids DESC LIMIT 1''') | |
19 | + print("查询出查询时间和交易流水号:", self.body[0],self.body[1]) | |
20 | + | |
21 | + def test_feedbackAccounrecordController_list_01(self): | |
22 | + body = farcl.body.replace("2021-08-05 00:00:00", str(self.body[0]))\ | |
23 | + .replace("2021-08-05 23:59:59", str(self.body[0]))\ | |
24 | + .replace("1075782308694007808", self.body[1]) | |
25 | + | |
26 | + re = sy1.post(url = farcl.url, data = body,headers = farcl.header) | |
27 | + print(re.headers) | |
28 | + print(re.json()) | |
29 | + self.assertTrue(self.body[1] in str(re.json())) | |
30 | + return re | |
31 | + | |
32 | + @classmethod | |
33 | + def tearDownClass(cls): | |
34 | + pass | |
35 | + | |
36 | + | |
37 | +if __name__ == '__main__': | |
38 | + unittest.main() | ... | ... |
testcase/feedbackOrderController_settlementlist/feedbackOrderController_querySumAmount.py
0 → 100644
testcase/feedbackOrderController_settlementlist/feedbackOrderController_settlementlist.py
0 → 100644