Commit ffac2300d4352c1e9fa527b218ecb6a8f5f6991f
1 parent
574c38f2
17点18分
Showing
15 changed files
with
291 additions
and
33 deletions
commons/api/fc_add.py
@@ -29,8 +29,8 @@ class fc_add(): | @@ -29,8 +29,8 @@ class fc_add(): | ||
29 | self.body = fc_add.body | 29 | self.body = fc_add.body |
30 | 30 | ||
31 | 31 | ||
32 | -# fc=FeedbackCustomerController() | ||
33 | -# print(fc.body) | ||
34 | -# re=my.post(url=fc.url,data=fc.body.encode('utf-8'),headers=fc.header) | ||
35 | -# print(re.json()) | ||
36 | -# print(re.headers) | ||
37 | \ No newline at end of file | 32 | \ No newline at end of file |
33 | +fc = fc_add() | ||
34 | +print(fc.body) | ||
35 | +re = my.post(url = fc.url,data = fc.body.encode('utf-8'),headers = fc.header) | ||
36 | +print(re.json()) | ||
37 | +print(re.headers) | ||
38 | \ No newline at end of file | 38 | \ No newline at end of file |
commons/api/fc_view.py
@@ -25,9 +25,9 @@ class fc_view(): | @@ -25,9 +25,9 @@ class fc_view(): | ||
25 | } | 25 | } |
26 | 26 | ||
27 | def __init__(self): | 27 | def __init__(self): |
28 | - self.url=fc_view.url.replace("http://test.",com.get_global_config("global_data", "environment", "en") ) | ||
29 | - self.header=fc_view.header | 28 | + self.url = fc_view.url.replace("http://test.",com.get_global_config("global_data", "environment", "en") ) |
29 | + self.header = fc_view.header | ||
30 | 30 | ||
31 | fc = fc_view() | 31 | fc = fc_view() |
32 | -re=my.get(url=fc.url,headers=fc.header) | 32 | +re = my.get(url=fc.url,headers = fc.header) |
33 | print(re.text) | 33 | print(re.text) |
34 | \ No newline at end of file | 34 | \ No newline at end of file |
commons/api/feedback_customer_disable.py
@@ -12,16 +12,16 @@ class feedback_customer_disable(): | @@ -12,16 +12,16 @@ class feedback_customer_disable(): | ||
12 | url = "http://test.jmsf.diligrp.com:8385/FeedbackCustomerController/disable.action?id=44" | 12 | url = "http://test.jmsf.diligrp.com:8385/FeedbackCustomerController/disable.action?id=44" |
13 | 13 | ||
14 | header = { | 14 | header = { |
15 | - "Host": "test.jmsf.diligrp.com:8385", "Connection": "keep-alive", "Content-Length": "0", | ||
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 | - "Accept-Language": "zh-CN,zh;q=0.9", | ||
20 | - "Referer": "http://test.jmsf.diligrp.com:8385/FeedbackCustomerController/list", | ||
21 | - "Accept-Encoding": "gzip,deflate", | ||
22 | - "Cookie": "UAP_refreshToken=0e205e78-a656-4a85-a2ba-7226ce898ae5;UAP_firmId=9;UAP_accessToken=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJXRUIiLCJuYmYiOjE2Mjc4OTI3MzYsImRhdGEiOiJ7XCJjZWxscGhvbmVcIjpcIjE1NTI2MzY0NDU2XCIsXCJjcmVhdGVkXCI6MTYwODc5NTk0OTAwMCxcImRlcGFydG1lbnRJZFwiOjU2LFwiZW1haWxcIjpcInNoZW55YW5nQGRpbGlncnAuY29tXCIsXCJmaXJtQ29kZVwiOlwic3lcIixcImZpcm1JZFwiOjksXCJmaXJtTmFtZVwiOlwi5rKI6Ziz5Zyw5Yip5Yac5om55biC5Zy65a6i5oi355S15a2Q57uT566X5Lit5b-DXCIsXCJpZFwiOjI1MSxcImxhc3RMb2dpblRpbWVcIjoxNjI3ODY1NTc3OTg5LFwibWV0YWRhdGFcIjp7fSxcIm1vZGlmaWVkXCI6MTYyNjE2MzAwNDAwMCxcInBhc3N3b3JkXCI6XCIxODk2NUVCNzJDOTJBNTQ5RERcIixcInJlYWxOYW1lXCI6XCLmsojpmLNcIixcInNlcmlhbE51bWJlclwiOlwiMDAwXCIsXCJzdGF0ZVwiOjEsXCJzeXN0ZW1UeXBlXCI6MSxcInVzZXJOYW1lXCI6XCI0NDQ0NDRcIn0iLCJpc3MiOiJVQVBfQVVUSDAiLCJleHAiOjE2Mjc4OTQ1MzYsImlhdCI6MTYyNzg5MjczNiwianRpIjoiNDYzMTY0MTUtYmUzYy00NTkzLWI3ODctYjRhZmI3MDQ1ODFiIn0.N5kEGcM9CR09wc3G7fLE0TwkdvO-hM3HQPKEFDUmdmewk-7iHlbzMHuRiY-Z_hPBbhv1v9y8Ibvyh6T6gikkt7C0movQ-oCqdNY-hzOrBZk9Ht-6mbf69zZKHOJv0TXcSs3y265eVviVbgZG6TgrptXWdSBvSt_Q94sfbMsQ7SA" | ||
23 | - | 15 | + "Host": "test.jmsf.diligrp.com:8385", "Connection": "keep-alive", "Content-Length": "0", |
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 | + "Accept-Language": "zh-CN,zh;q=0.9", | ||
20 | + "Referer": "http://test.jmsf.diligrp.com:8385/FeedbackCustomerController/list", | ||
21 | + "Accept-Encoding": "gzip,deflate", | ||
22 | + "Cookie": "UAP_accessToken=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJXRUIiLCJuYmYiOjE2Mjc5NTE5MzEsImRhdGEiOiJ7XCJjZWxscGhvbmVcIjpcIjE1NTI2MzY0NDU2XCIsXCJjcmVhdGVkXCI6MTYwODc5NTk0OTAwMCxcImRlcGFydG1lbnRJZFwiOjU2LFwiZW1haWxcIjpcInNoZW55YW5nQGRpbGlncnAuY29tXCIsXCJmaXJtQ29kZVwiOlwic3lcIixcImZpcm1JZFwiOjksXCJmaXJtTmFtZVwiOlwi5rKI6Ziz5Zyw5Yip5Yac5om55biC5Zy65a6i5oi355S15a2Q57uT566X5Lit5b-DXCIsXCJpZFwiOjI1MSxcImxhc3RMb2dpblRpbWVcIjoxNjI3OTUxOTMwOTY3LFwibWV0YWRhdGFcIjp7fSxcIm1vZGlmaWVkXCI6MTYyNjE2MzAwNDAwMCxcInBhc3N3b3JkXCI6XCIxODk2NUVCNzJDOTJBNTQ5RERcIixcInJlYWxOYW1lXCI6XCLmsojpmLNcIixcInNlcmlhbE51bWJlclwiOlwiMDAwXCIsXCJzdGF0ZVwiOjEsXCJzeXN0ZW1UeXBlXCI6MSxcInVzZXJOYW1lXCI6XCI0NDQ0NDRcIixcInVzZXJUeXBlXCI6MX0iLCJpc3MiOiJVQVBfQVVUSDAiLCJleHAiOjE2Mjc5NTM3MzEsImlhdCI6MTYyNzk1MTkzMSwianRpIjoiMGM1ZjljMjAtMjIyOC00YzllLTljYTQtMDA1OTMyYjg2YmVhIn0.V8ptydt5ueigxhWIZ8yWJpOr15xM1R5qjqRnkDLfaaRg4MerzIXf6z82f04hLLqlrJva4VC4DFzsVjkq_-V8RMvYOrGpdBCcDCHzp6X82IvhfJsUZ6yyrrKsCxXvi1FHHGMZhBe61z0K8r0yM56dl1Dyxujo5L7L-idWKWpbwkk;UAP_refreshToken=b019119d-600f-4f4c-92b7-c2a281b24e03;UAP_firmId=9" | ||
24 | } | 23 | } |
24 | + | ||
25 | def __init__(self): | 25 | def __init__(self): |
26 | self.url = feedback_customer_disable.url.replace("http://test.", com.get_global_config("global_data", "environment", "en")) | 26 | self.url = feedback_customer_disable.url.replace("http://test.", com.get_global_config("global_data", "environment", "en")) |
27 | self.header = feedback_customer_disable.header | 27 | self.header = feedback_customer_disable.header |
commons/api/feedback_customer_enable.py
1 | # -*- coding: utf-8 -*- | 1 | # -*- coding: utf-8 -*- |
2 | """ | 2 | """ |
3 | -@Time : 2021/7/30 9:56 | 3 | +@Time : 2021/8/3 8:56 |
4 | @Auth : wlm | 4 | @Auth : wlm |
5 | @File :feedback_customer_enable.py | 5 | @File :feedback_customer_enable.py |
6 | @IDE :PyCharm | 6 | @IDE :PyCharm |
7 | """ | 7 | """ |
8 | +from commons import common as com | ||
9 | +from commons.MySession import my | ||
10 | + | ||
11 | +class feedback_customer_enable(): | ||
12 | + url = "http://test.jmsf.diligrp.com:8385/FeedbackCustomerController/enable.action?id=49" | ||
13 | + | ||
14 | + header = { | ||
15 | + "Host": "test.jmsf.diligrp.com:8385", "Connection": "keep-alive", "Content-Length": "0", | ||
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 | + "Accept-Language": "zh-CN,zh;q=0.9", | ||
20 | + "Referer": "http://test.jmsf.diligrp.com:8385/FeedbackCustomerController/list", | ||
21 | + "Accept-Encoding": "gzip,deflate", | ||
22 | + "Cookie": "UAP_accessToken=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJXRUIiLCJuYmYiOjE2Mjc5NTE5MzEsImRhdGEiOiJ7XCJjZWxscGhvbmVcIjpcIjE1NTI2MzY0NDU2XCIsXCJjcmVhdGVkXCI6MTYwODc5NTk0OTAwMCxcImRlcGFydG1lbnRJZFwiOjU2LFwiZW1haWxcIjpcInNoZW55YW5nQGRpbGlncnAuY29tXCIsXCJmaXJtQ29kZVwiOlwic3lcIixcImZpcm1JZFwiOjksXCJmaXJtTmFtZVwiOlwi5rKI6Ziz5Zyw5Yip5Yac5om55biC5Zy65a6i5oi355S15a2Q57uT566X5Lit5b-DXCIsXCJpZFwiOjI1MSxcImxhc3RMb2dpblRpbWVcIjoxNjI3OTUxOTMwOTY3LFwibWV0YWRhdGFcIjp7fSxcIm1vZGlmaWVkXCI6MTYyNjE2MzAwNDAwMCxcInBhc3N3b3JkXCI6XCIxODk2NUVCNzJDOTJBNTQ5RERcIixcInJlYWxOYW1lXCI6XCLmsojpmLNcIixcInNlcmlhbE51bWJlclwiOlwiMDAwXCIsXCJzdGF0ZVwiOjEsXCJzeXN0ZW1UeXBlXCI6MSxcInVzZXJOYW1lXCI6XCI0NDQ0NDRcIixcInVzZXJUeXBlXCI6MX0iLCJpc3MiOiJVQVBfQVVUSDAiLCJleHAiOjE2Mjc5NTM3MzEsImlhdCI6MTYyNzk1MTkzMSwianRpIjoiMGM1ZjljMjAtMjIyOC00YzllLTljYTQtMDA1OTMyYjg2YmVhIn0.V8ptydt5ueigxhWIZ8yWJpOr15xM1R5qjqRnkDLfaaRg4MerzIXf6z82f04hLLqlrJva4VC4DFzsVjkq_-V8RMvYOrGpdBCcDCHzp6X82IvhfJsUZ6yyrrKsCxXvi1FHHGMZhBe61z0K8r0yM56dl1Dyxujo5L7L-idWKWpbwkk;UAP_refreshToken=b019119d-600f-4f4c-92b7-c2a281b24e03;UAP_firmId=9" | ||
23 | + } | ||
24 | + def __init__(self): | ||
25 | + self.url = feedback_customer_enable.url.replace("http://test.", com.get_global_config("global_data", "environment", "en")) | ||
26 | + self.header = feedback_customer_enable.header | ||
27 | + | ||
28 | +fce = feedback_customer_enable() | ||
29 | +re = my.post(url=fce.url, headers=fce.header) | ||
30 | +print(re.json()) | ||
8 | \ No newline at end of file | 31 | \ No newline at end of file |
commons/api/feedback_customer_query.py
0 → 100644
1 | +# -*- coding: utf-8 -*- | ||
2 | +""" | ||
3 | +@Time : 2021/8/3 9:11 | ||
4 | +@Auth : wlm | ||
5 | +@File :feedback_customer_query.py | ||
6 | +@IDE :PyCharm | ||
7 | +""" | ||
8 | +import kwargs as kwargs | ||
9 | + | ||
10 | +from commons import common as com | ||
11 | +from commons.MySession import my,sy1 | ||
12 | + | ||
13 | +class feedback_customer_query(): | ||
14 | + url = "http://test.jmsf.diligrp.com:8385/FeedbackCustomerController/list.action" | ||
15 | + | ||
16 | + header = { | ||
17 | + "Host": "test.jmsf.diligrp.com:8385", | ||
18 | + "Connection": "keep-alive", | ||
19 | + "Content-Length": "0", | ||
20 | + "Accept": "application/json,text/javascript,*/*;q=0.01", "Origin": "http://test.jmsf.diligrp.com:8385", | ||
21 | + "X-Requested-With": "XMLHttpRequest", | ||
22 | + "User-Agent": "Mozilla/5.0(WindowsNT6.2;WOW64)AppleWebKit/537.36(KHTML,likeGecko)Chrome/84.0.4147.105Safari/537.36", | ||
23 | + "Accept-Language": "zh-CN,zh;q=0.9", | ||
24 | + "Referer": "http://test.jmsf.diligrp.com:8385/FeedbackCustomerController/list", | ||
25 | + "Accept-Encoding": "gzip,deflate", | ||
26 | + "Content-Type": "application/x-www-form-urlencoded", | ||
27 | + "Cookie": "UAP_accessToken=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJXRUIiLCJuYmYiOjE2Mjc5NTE5MzEsImRhdGEiOiJ7XCJjZWxscGhvbmVcIjpcIjE1NTI2MzY0NDU2XCIsXCJjcmVhdGVkXCI6MTYwODc5NTk0OTAwMCxcImRlcGFydG1lbnRJZFwiOjU2LFwiZW1haWxcIjpcInNoZW55YW5nQGRpbGlncnAuY29tXCIsXCJmaXJtQ29kZVwiOlwic3lcIixcImZpcm1JZFwiOjksXCJmaXJtTmFtZVwiOlwi5rKI6Ziz5Zyw5Yip5Yac5om55biC5Zy65a6i5oi355S15a2Q57uT566X5Lit5b-DXCIsXCJpZFwiOjI1MSxcImxhc3RMb2dpblRpbWVcIjoxNjI3OTUxOTMwOTY3LFwibWV0YWRhdGFcIjp7fSxcIm1vZGlmaWVkXCI6MTYyNjE2MzAwNDAwMCxcInBhc3N3b3JkXCI6XCIxODk2NUVCNzJDOTJBNTQ5RERcIixcInJlYWxOYW1lXCI6XCLmsojpmLNcIixcInNlcmlhbE51bWJlclwiOlwiMDAwXCIsXCJzdGF0ZVwiOjEsXCJzeXN0ZW1UeXBlXCI6MSxcInVzZXJOYW1lXCI6XCI0NDQ0NDRcIixcInVzZXJUeXBlXCI6MX0iLCJpc3MiOiJVQVBfQVVUSDAiLCJleHAiOjE2Mjc5NTM3MzEsImlhdCI6MTYyNzk1MTkzMSwianRpIjoiMGM1ZjljMjAtMjIyOC00YzllLTljYTQtMDA1OTMyYjg2YmVhIn0.V8ptydt5ueigxhWIZ8yWJpOr15xM1R5qjqRnkDLfaaRg4MerzIXf6z82f04hLLqlrJva4VC4DFzsVjkq_-V8RMvYOrGpdBCcDCHzp6X82IvhfJsUZ6yyrrKsCxXvi1FHHGMZhBe61z0K8r0yM56dl1Dyxujo5L7L-idWKWpbwkk;UAP_refreshToken=b019119d-600f-4f4c-92b7-c2a281b24e03;UAP_firmId=9" | ||
28 | + } | ||
29 | + | ||
30 | + body = '''rows=10&page=1&sort=id&order=desc&metadata[created]=[provider=datetimeProvider&index=10&field=created] | ||
31 | + &metadata[status]=[provider=stateProvider&index=20&field=status] | ||
32 | + &metadata[created] = {"provider": "datetimeProvider", "index": 10, "field": "created"} | ||
33 | + &metadata[status] = {"provider": "stateProvider", "index": 20, "field": "status"} | ||
34 | + &name=史芳&reatedStart=2021-08-02 00:00:00&createdEnd=2021-08-03 23:59:59''' | ||
35 | + | ||
36 | + | ||
37 | + | ||
38 | + | ||
39 | + # body = "rows=10&page=1&sort=id&order=desc&\ | ||
40 | + # metadata[created]=[provider=datetimeProvider&index=10&field=created]\ | ||
41 | + # &metadata[status]=[provider=stateProvider&index=20&field=status]\ | ||
42 | + # &name=史芳&reatedStart=2021-08-02 00:00:00&createdEnd=2021-08-03 23:59:59" | ||
43 | + # body = { | ||
44 | + # "rows":"10", | ||
45 | + # "page":"1", | ||
46 | + # "sort":"id", | ||
47 | + # "order":"desc", | ||
48 | + # "metadata[created]": {"provider": "datetimeProvider", "index": 10, "field": "created"}, | ||
49 | + # "metadata[status]": {"provider": "stateProvider", "index": 20, "field": "status"}, | ||
50 | + # "name": "史芳", | ||
51 | + # "createdStart":"2021-08-02 00:00:00", | ||
52 | + # "createdEnd":"2021-08-03 23:59:59", | ||
53 | + # } | ||
54 | + # body = dict(body) | ||
55 | + # body["metadata[created]"] = json.dumps(body["metadata[created]"]) | ||
56 | + # body["metadata[status]"] = json.dumps(body["metadata[status]"]) | ||
57 | + | ||
58 | + | ||
59 | + # "metadata[created]": {"provider": "datetimeProvider", "index": 10, "field": "created"}, | ||
60 | + # "metadata[status]": {"provider": "stateProvider", "index": 20, "field": "status"}, | ||
61 | + # body = json.dumps(body).encode('utf-8') | ||
62 | + | ||
63 | + def __init__(self): | ||
64 | + self.url = feedback_customer_query.url.replace("http://test.", com.get_global_config("global_data", "environment", "en")) | ||
65 | + self.header = feedback_customer_query.header | ||
66 | + self.body = feedback_customer_query.body | ||
67 | + print(self.body) | ||
68 | +# feedback_customer_query = urllib.parse.urlencode(feedback_customer_query()) | ||
69 | + | ||
70 | +# fcq = feedback_customer_query | ||
71 | +# print(fcq.body) | ||
72 | +# re = sy1.post(url = fcq.url, data = fcq.body.encode('utf-8'),headers = fcq.header,proxies=my.myproxies) | ||
73 | +# print(re.text) | ||
0 | \ No newline at end of file | 74 | \ No newline at end of file |
commons/api/feedback_order_settlement.py
@@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
6 | @IDE :PyCharm | 6 | @IDE :PyCharm |
7 | """ | 7 | """ |
8 | from commons import common as com | 8 | from commons import common as com |
9 | -from commons.MySession import my | 9 | +from commons.MySession import my,sy1 |
10 | import requests | 10 | import requests |
11 | 11 | ||
12 | class feedback_order_settlement(): | 12 | class feedback_order_settlement(): |
@@ -21,15 +21,15 @@ class feedback_order_settlement(): | @@ -21,15 +21,15 @@ class feedback_order_settlement(): | ||
21 | "Accept-Encoding": "gzip,deflate", | 21 | "Accept-Encoding": "gzip,deflate", |
22 | "Cookie": "UAP_accessToken=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJXRUIiLCJuYmYiOjE2Mjc4NjU1NzgsImRhdGEiOiJ7XCJjZWxscGhvbmVcIjpcIjE1NTI2MzY0NDU2XCIsXCJjcmVhdGVkXCI6MTYwODc5NTk0OTAwMCxcImRlcGFydG1lbnRJZFwiOjU2LFwiZW1haWxcIjpcInNoZW55YW5nQGRpbGlncnAuY29tXCIsXCJmaXJtQ29kZVwiOlwic3lcIixcImZpcm1JZFwiOjksXCJmaXJtTmFtZVwiOlwi5rKI6Ziz5Zyw5Yip5Yac5om55biC5Zy65a6i5oi355S15a2Q57uT566X5Lit5b-DXCIsXCJpZFwiOjI1MSxcImxhc3RMb2dpblRpbWVcIjoxNjI3ODY1NTc3OTg5LFwibWV0YWRhdGFcIjp7fSxcIm1vZGlmaWVkXCI6MTYyNjE2MzAwNDAwMCxcInBhc3N3b3JkXCI6XCIxODk2NUVCNzJDOTJBNTQ5RERcIixcInJlYWxOYW1lXCI6XCLmsojpmLNcIixcInNlcmlhbE51bWJlclwiOlwiMDAwXCIsXCJzdGF0ZVwiOjEsXCJzeXN0ZW1UeXBlXCI6MSxcInVzZXJOYW1lXCI6XCI0NDQ0NDRcIixcInVzZXJUeXBlXCI6MX0iLCJpc3MiOiJVQVBfQVVUSDAiLCJleHAiOjE2Mjc4NjczNzgsImlhdCI6MTYyNzg2NTU3OCwianRpIjoiMTBhOTY2ZmEtYTAzYS00YTFiLTliYmMtNDIzMTRhN2Y2ZGVmIn0.LnIkAnxYqN75lotTXyIyNn6Mu7qvu4eOqeEhuXcoeWGpJ5_vTYDbOt7VY9EbvN_dNVdaW1LD0Fp0hDWNLu9mUi-RytYo-WgvSM-BBuzCnp9r9CschtW0lmzQhYtvp1GF5FC0FMw1LQB0WVeQjKW8hShwQgD8DqYh_1EWXDgJ3VE; UAP_refreshToken=0e205e78-a656-4a85-a2ba-7226ce898ae5; UAP_firmId=9" | 22 | "Cookie": "UAP_accessToken=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJXRUIiLCJuYmYiOjE2Mjc4NjU1NzgsImRhdGEiOiJ7XCJjZWxscGhvbmVcIjpcIjE1NTI2MzY0NDU2XCIsXCJjcmVhdGVkXCI6MTYwODc5NTk0OTAwMCxcImRlcGFydG1lbnRJZFwiOjU2LFwiZW1haWxcIjpcInNoZW55YW5nQGRpbGlncnAuY29tXCIsXCJmaXJtQ29kZVwiOlwic3lcIixcImZpcm1JZFwiOjksXCJmaXJtTmFtZVwiOlwi5rKI6Ziz5Zyw5Yip5Yac5om55biC5Zy65a6i5oi355S15a2Q57uT566X5Lit5b-DXCIsXCJpZFwiOjI1MSxcImxhc3RMb2dpblRpbWVcIjoxNjI3ODY1NTc3OTg5LFwibWV0YWRhdGFcIjp7fSxcIm1vZGlmaWVkXCI6MTYyNjE2MzAwNDAwMCxcInBhc3N3b3JkXCI6XCIxODk2NUVCNzJDOTJBNTQ5RERcIixcInJlYWxOYW1lXCI6XCLmsojpmLNcIixcInNlcmlhbE51bWJlclwiOlwiMDAwXCIsXCJzdGF0ZVwiOjEsXCJzeXN0ZW1UeXBlXCI6MSxcInVzZXJOYW1lXCI6XCI0NDQ0NDRcIixcInVzZXJUeXBlXCI6MX0iLCJpc3MiOiJVQVBfQVVUSDAiLCJleHAiOjE2Mjc4NjczNzgsImlhdCI6MTYyNzg2NTU3OCwianRpIjoiMTBhOTY2ZmEtYTAzYS00YTFiLTliYmMtNDIzMTRhN2Y2ZGVmIn0.LnIkAnxYqN75lotTXyIyNn6Mu7qvu4eOqeEhuXcoeWGpJ5_vTYDbOt7VY9EbvN_dNVdaW1LD0Fp0hDWNLu9mUi-RytYo-WgvSM-BBuzCnp9r9CschtW0lmzQhYtvp1GF5FC0FMw1LQB0WVeQjKW8hShwQgD8DqYh_1EWXDgJ3VE; UAP_refreshToken=0e205e78-a656-4a85-a2ba-7226ce898ae5; UAP_firmId=9" |
23 | } | 23 | } |
24 | - body = "id=25&cardNo=888810057654&settleAmount=2&ids=12034&feedbackCustomerId=25&feedbackCustomerName=%E9%AA%8C%E8%AF%81%E5%91%98%E5%B7%A5%E6%8E%A8%E9%80%81%E5%88%B0CRM&billIds=3621&settledAmounts=2" | 24 | + body = "id=25&cardNo=888810057654&settleAmount=2&ids=12034&feedbackCustomerId=25&feedbackCustomerName=验证员工推送到CRM&billIds=3621&settledAmounts=2" |
25 | 25 | ||
26 | def __init__(self): | 26 | def __init__(self): |
27 | self.url = feedback_order_settlement.url.replace("http://test.",com.get_global_config("global_data", "environment", "en") ) | 27 | self.url = feedback_order_settlement.url.replace("http://test.",com.get_global_config("global_data", "environment", "en") ) |
28 | self.header = feedback_order_settlement.header | 28 | self.header = feedback_order_settlement.header |
29 | self.body = feedback_order_settlement.body | 29 | self.body = feedback_order_settlement.body |
30 | 30 | ||
31 | -# fe=feedback_order_settlement() | ||
32 | -# print(fe.body) | ||
33 | -# re=my.post(url=fe.url,headers=fe.header,data=fe.body) | ||
34 | -# print(re.json()) | ||
35 | -# print(re.headers) | ||
36 | \ No newline at end of file | 31 | \ No newline at end of file |
32 | +fe=feedback_order_settlement() | ||
33 | +print(fe.body) | ||
34 | +re=sy1.post(url=fe.url,headers=fe.header,data=fe.body.encode('utf-8')) | ||
35 | +print(re.json()) | ||
36 | +print(re.headers) | ||
37 | \ No newline at end of file | 37 | \ No newline at end of file |
commons/api/feedback_order_settlement_query.py
0 → 100644
1 | +# -*- coding: utf-8 -*- | ||
2 | +""" | ||
3 | +@Time : 2021/8/3 15:58 | ||
4 | +@Auth : wlm | ||
5 | +@File :feedback_order_settlement_query.py | ||
6 | +@IDE :PyCharm | ||
7 | +""" | ||
8 | +from commons import common as com | ||
9 | +from commons.MySession import my,sy1 | ||
10 | + | ||
11 | +class feedback_order_settlement_query(): | ||
12 | + url = "http://test.jmsf.diligrp.com:8385/FeedbackOrderController/list.action" | ||
13 | + | ||
14 | + header = { | ||
15 | + "Host": "test.jmsf.diligrp.com:8385", "Connection": "keep-alive", "Content-Length": "496", | ||
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", "Accept-Language": "zh-CN,zh;q=0.9", | ||
20 | + "Referer": "http://test.jmsf.diligrp.com:8385/FeedbackOrderController/list", "Accept-Encoding": "gzip,deflate" | ||
21 | + } | ||
22 | + | ||
23 | + # body = '''page=1&order=desc& | ||
24 | + # metadata[payTime]={"provider":"datetimeProvider","index":10,"field":"payTime"} | ||
25 | + # &metadata[feebackAmount]={"provider":"moneyProvider","index":20,"field":"feebackAmount"} | ||
26 | + # &metadata[unsettledAmount]={"provider":"moneyProvider","index":40,"field":"unsettledAmount"} | ||
27 | + # &feedbackCustomerId=25&tagId=yjsp&queryType=2&keyword=苹果 | ||
28 | + # &payTimeStart=2021-07-22 00:00:00&payTimeEnd=2021-08-03 23:59:59''' | ||
29 | + | ||
30 | + body = '''page=1&order=desc& | ||
31 | + metadata[payTime]={"provider":"datetimeProvider","index":10,"field":"payTime"} | ||
32 | + &metadata[feebackAmount]={"provider":"moneyProvider","index":20,"field":"feebackAmount"} | ||
33 | + &metadata[unsettledAmount]={"provider":"moneyProvider","index":40,"field":"unsettledAmount"} | ||
34 | + &feedbackCustomerId=25&queryType=2& | ||
35 | + &payTimeStart=2021-07-22 00:00:00&payTimeEnd=2021-08-03 23:59:59''' | ||
36 | + | ||
37 | + def __init__(self): | ||
38 | + self.url = feedback_order_settlement_query.url.replace("http://test.", com.get_global_config("global_data", "environment", "en")) | ||
39 | + self.header = feedback_order_settlement_query.header | ||
40 | + self.body = feedback_order_settlement_query.body | ||
41 | + print(self.body) | ||
42 | + | ||
43 | +fosq = feedback_order_settlement_query | ||
44 | +print(fosq.body) | ||
45 | +re = sy1.post(url = fosq.url, data = fosq.body.encode('utf-8'),headers = fosq.header,proxies=my.myproxies) | ||
46 | +print(re.text) | ||
0 | \ No newline at end of file | 47 | \ No newline at end of file |
testcase/FeedbackCustomerController/fc_add.py
1 | import unittest | 1 | import unittest |
2 | import urllib3 | 2 | import urllib3 |
3 | -from commons import common as com | ||
4 | -from commons.MySession import my,sy1 | 3 | +from commons.MySession import sy1 |
5 | from commons.api.fc_add import fc_add | 4 | from commons.api.fc_add import fc_add |
6 | urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) | 5 | urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) |
7 | from commons.Faker import random_data | 6 | from commons.Faker import random_data |
@@ -12,7 +11,8 @@ class test_fc_add(unittest.TestCase): | @@ -12,7 +11,8 @@ class test_fc_add(unittest.TestCase): | ||
12 | "新增返还人" | 11 | "新增返还人" |
13 | @classmethod | 12 | @classmethod |
14 | def setUpClass(cls): | 13 | def setUpClass(cls): |
15 | - my.post(url=fc.url, headers=fc.header, data=fc.body.encode('utf-8')) | 14 | + # my.post(url=fc.url, headers=fc.header, data=fc.body.encode('utf-8')) |
15 | + pass | ||
16 | 16 | ||
17 | def test_fc_add_01(self): | 17 | def test_fc_add_01(self): |
18 | body = fc.body.replace("888810054630","888810054630").replace("你好",ra.name()).replace("relation\ | 18 | body = fc.body.replace("888810054630","888810054630").replace("你好",ra.name()).replace("relation\ |
testcase/FeedbackCustomerController/fc_edit.py
1 | import unittest | 1 | import unittest |
2 | import urllib3 | 2 | import urllib3 |
3 | -from commons import common as com | ||
4 | from commons.MySession import my,sy1 | 3 | from commons.MySession import my,sy1 |
5 | from commons.api.fc_edit import fc_edit | 4 | from commons.api.fc_edit import fc_edit |
6 | urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) | 5 | urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) |
@@ -11,7 +10,8 @@ class test_fc_edit(unittest.TestCase): | @@ -11,7 +10,8 @@ class test_fc_edit(unittest.TestCase): | ||
11 | "修改返还人" | 10 | "修改返还人" |
12 | @classmethod | 11 | @classmethod |
13 | def setUpClass(cls): | 12 | def setUpClass(cls): |
14 | - my.post(url=fc.url, headers=fc.header, data=fc.body.encode('utf-8')) | 13 | + # my.post(url=fc.url, headers=fc.header, data=fc.body.encode('utf-8')) |
14 | + pass | ||
15 | 15 | ||
16 | def test_fc_edit_01(self): | 16 | def test_fc_edit_01(self): |
17 | 17 |
testcase/FeedbackCustomerController/fc_view.py
1 | import unittest | 1 | import unittest |
2 | import urllib3 | 2 | import urllib3 |
3 | import commons.ConfigDB as db | 3 | import commons.ConfigDB as db |
4 | -from commons import common as com | ||
5 | from commons.MySession import my,sy1 | 4 | from commons.MySession import my,sy1 |
6 | from commons.api.fc_view import fc_view | 5 | from commons.api.fc_view import fc_view |
7 | from commons.api.fc_add import fc_add | 6 | from commons.api.fc_add import fc_add |
@@ -14,8 +13,9 @@ class test_fc_view(unittest.TestCase): | @@ -14,8 +13,9 @@ class test_fc_view(unittest.TestCase): | ||
14 | 13 | ||
15 | @classmethod | 14 | @classmethod |
16 | def setUpClass(cls): | 15 | def setUpClass(cls): |
17 | - # 通过字段配置接口提前配置新增页的字段配置 | ||
18 | - my.post(url = ad.url, headers = ad.header, data = ad.body.encode('utf-8')) | 16 | + # # 通过字段配置接口提前配置新增页的字段配置 |
17 | + # my.post(url = ad.url, headers = ad.header, data = ad.body.encode('utf-8')) | ||
18 | + pass | ||
19 | 19 | ||
20 | def setUp(self): | 20 | def setUp(self): |
21 | # 准备数据 | 21 | # 准备数据 |
testcase/FeedbackCustomerController/feedback_customer_disable.py
0 → 100644
1 | +import unittest | ||
2 | +import urllib3 | ||
3 | +from commons.MySession import sy1 | ||
4 | +from commons.api.feedback_customer_disable import feedback_customer_disable | ||
5 | +urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) | ||
6 | +fcd = feedback_customer_disable() | ||
7 | + | ||
8 | +class test_fc_add(unittest.TestCase): | ||
9 | + "返还人禁用" | ||
10 | + @classmethod | ||
11 | + def setUpClass(cls): | ||
12 | + pass | ||
13 | + | ||
14 | + def test_fc_add_01(self): | ||
15 | + | ||
16 | + re = sy1.post(url=fcd.url, headers=fcd.header) | ||
17 | + print(re.headers) | ||
18 | + print(re.json()) | ||
19 | + self.assertTrue("操作成功" in str(re.json())) | ||
20 | + | ||
21 | + @classmethod | ||
22 | + def tearDownClass(cls): | ||
23 | + pass | ||
24 | + | ||
25 | +if __name__ == '__main__': | ||
26 | + unittest.main() |
testcase/FeedbackCustomerController/feedback_customer_enable.py
0 → 100644
1 | +import unittest | ||
2 | +import urllib3 | ||
3 | +from commons.MySession import sy1 | ||
4 | +from commons.api.feedback_customer_enable import feedback_customer_enable | ||
5 | +urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) | ||
6 | +fce = feedback_customer_enable() | ||
7 | + | ||
8 | +class test_fc_add(unittest.TestCase): | ||
9 | + "返还人启用" | ||
10 | + @classmethod | ||
11 | + def setUpClass(cls): | ||
12 | + pass | ||
13 | + | ||
14 | + def test_fc_add_01(self): | ||
15 | + | ||
16 | + re = sy1.post(url = fce.url, headers = fce.header) | ||
17 | + print(fce.url) | ||
18 | + print(re.headers) | ||
19 | + print(re.json()) | ||
20 | + self.assertTrue("操作成功" in str(re.json())) | ||
21 | + @classmethod | ||
22 | + def tearDownClass(cls): | ||
23 | + pass | ||
24 | + | ||
25 | +if __name__ == '__main__': | ||
26 | + unittest.main() |
testcase/FeedbackCustomerController/feedback_customer_query.py
0 → 100644
1 | +import unittest | ||
2 | +import urllib3 | ||
3 | +from commons.MySession import my,sy1 | ||
4 | +from commons.api.feedback_customer_query import feedback_customer_query | ||
5 | +urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) | ||
6 | +fcq = feedback_customer_query() | ||
7 | + | ||
8 | +class test_feedback_customer_query(unittest.TestCase): | ||
9 | + "返还人列表查询" | ||
10 | + @classmethod | ||
11 | + def setUpClass(cls): | ||
12 | + pass | ||
13 | + | ||
14 | + def test_feedback_customer_query_01(self): | ||
15 | + print(fcq.url) | ||
16 | + re = sy1.post(url = fcq.url, data = fcq.body.encode('utf-8'),headers = fcq.header,proxies=my.myproxies) | ||
17 | + print(re.headers) | ||
18 | + print(re.json()) | ||
19 | + self.assertTrue("史芳" in str(re.json())) | ||
20 | + | ||
21 | + @classmethod | ||
22 | + def tearDownClass(cls): | ||
23 | + pass | ||
24 | + | ||
25 | + | ||
26 | +if __name__ == '__main__': | ||
27 | + unittest.main() |
testcase/FeedbackOrderController/feedback_order_settlement.py
0 → 100644
testcase/FeedbackOrderController/feedback_order_settlement_query.py
0 → 100644
1 | +import unittest | ||
2 | +import urllib3 | ||
3 | +from commons.MySession import my,sy1 | ||
4 | +from commons.api.feedback_order_settlement_query import feedback_order_settlement_query | ||
5 | +urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) | ||
6 | +fosq = feedback_order_settlement_query() | ||
7 | + | ||
8 | +class test_feedback_order_settlement_query(unittest.TestCase): | ||
9 | + "结账管理列表查询" | ||
10 | + @classmethod | ||
11 | + def setUpClass(cls): | ||
12 | + pass | ||
13 | + | ||
14 | + def test_feedback_order_settlement_query_01(self): | ||
15 | + print(fosq.url) | ||
16 | + re = sy1.post(url = fosq.url, data = fosq.body.encode('utf-8'),headers = fosq.header,proxies=my.myproxies) | ||
17 | + print(re.headers) | ||
18 | + print(re.json()) | ||
19 | + self.assertTrue("新爱心园婚介所的总公司" in str(re.json())) | ||
20 | + | ||
21 | + @classmethod | ||
22 | + def tearDownClass(cls): | ||
23 | + pass | ||
24 | + | ||
25 | + | ||
26 | +if __name__ == '__main__': | ||
27 | + unittest.main() |