registerRecord_save.py
4.5 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#!/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"}
# 大客户body
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": "" }
#普通客户body
self.body1 = {
"accountId": 107791,
"cardNo": "888810043394",
"customerId": 141995,
"customerCode": "00131697",
"customerName": "拜登",
"fixedphoneNumber": None,
"mobilephoneNumber": "16111111113",
"identityCardAddress": "",
"identityCardNo": "110101198001012331",
"identityCardType": "ID",
"registerDetailDtoList": [{
"id": 0,
"areaId": 274,
"areaName": "东区01",
"quantity": 1000,
"productId": 374690,
"registerRecordId": 0,
"remark": None,
"weight": 1000,
"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.body1,proxies=hg.myproxies)
# print(str(re.json()))