feedbackAccounrecordController_list.py 3 KB
# -*- coding: utf-8 -*-
"""
@Time : 2021/8/5 9:59
@Auth : wlm
@File :test_feedbackAccounrecordController_list.py
@IDE :PyCharm
"""
from commons import common as com
from commons.MySession import my,sy1

class feedbackAccounrecordController_list():
    url = "http://test.jmsf.diligrp.com:8385/FeedbackAccounrecordController/list.action"
    header = {
         "Host": "test.jmsf.diligrp.com:8385", "Connection": "keep-alive", "Content-Length": "631",
         "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/FeedbackAccounrecordController/list",
         "Accept-Encoding": "gzip,deflate"
    }
    # 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'''
    # 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'''
    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'''

    def __init__(self):
        self.url = feedbackAccounrecordController_list.url.replace("http://test.",com.get_global_config("global_data", "environment", "en"))
        self.header = feedbackAccounrecordController_list.header
        self.body = feedbackAccounrecordController_list.body

# farc = feedbackAccounrecordController_list()
# print(farc.body)
# re = sy1.post(url = farc.url,headers = farc.header,data = farc.body.replace("\n", ""),proxies = my.myproxies)
# print(re.json())