registerRecord_save.py
2.59 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/usr/bin/python
# -*- coding: UTF-8 -*-
import urllib3
from commons import common as com
from commons.MySession import hg
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
class registerRecord_save():
"录入批次号"
def __init__(self):
self.url = "http://test.gateway.diligrp.com:8285/hg-trading/api/registerRecord/save"
self.header = {
"UAP_accessToken" :"demo",
"UAP_refreshToken" :"demo",
"UAP_firmId" :"15",
"Content-Type" :"application/json",
"Host" :"test.gateway.diligrp.com:8285"}
self.body = {
"accountId": 107792,
"cardNo": "888810026785",
"customerId": 141992,
"customerCode": "00131694",
"customerName": "特朗普vip",
"fixedphoneNumber": None,
"mobilephoneNumber": "16111111112",
"identityCardAddress": "",
"identityCardNo": "110101198001012390",
"identityCardType": "ID",
"registerDetailDtoList": [{
"id": 0,
"areaId": 274,
"areaName": "东区01",
"quantity": 10,
"productId": 374690,
"registerRecordId": 0,
"remark": None,
"weight": 10,
"weightType": 0,
"created": None,
"createdById": 0,
"createdByName": None,
"createdByDepartmentId": 0,
"createdByDepartmentName": None,
"registerCertificateList": None,
"product": None,
"registerCertificateDtoList": None,
"productDto": {
"id": 0,
"originId": 510100,
"originName": "成都市",
"pieceWeight": 1,
"categoryId": 374690,
"categoryCode": "374690",
"categoryName": "苹果",
"created": None
}
}],
"registerFeeDtoList": [],
"tradePassword": "" }
tt=registerRecord_save()
re=hg.post(url=tt.url,headers=tt.header,json=tt.body,proxies=hg.myproxies)
print(str(re.json()))