Commit d6b9ccb20645d4b602576c6e0375dd7c7e3b8688

Authored by wenleiming
1 parent 056eff61

创建大客户订单

commons/api/hg/transaction/createAndTrade.py
... ... @@ -11,7 +11,6 @@
11 11  
12 12 from commons import common as com
13 13 from commons.MySession import hg
14   -
15 14 class createAndTrade():
16 15  
17 16 def __init__(self):
... ... @@ -21,52 +20,66 @@ class createAndTrade():
21 20 "UAP_refreshToken":"demo",
22 21 "Content-Type":"application/json;charset=utf-8",
23 22 "Host":"test.gateway.diligrp.com:8285",
24   - "Content-Length":"740"}
  23 + "Content-Length":"740"
  24 + }
25 25 self.body = {
26   - "sellerId":141962,
27   - "sellerName":"云康飞卖",
28   - "sellerAccountId":107663,
29   - "sellerCardNo":"888810062816",
30   - "buyerId":141966,
31   - "buyerName":"严永志买",
32   - "buyerAccountId":107675,
33   - "buyerCardNo":"888810055039",
34   - "posCode":"111222",
35   - "tradePassword":"111111",
36   - "orderItemList":[{
37   - "number":0,
38   - "batchCode":"2108000019",
39   - "productId":44,
40   - "productCode":"754107",
41   - "productName":"葡萄",
42   - "categoryId":754107,
43   - "weightType":1,
44   - "quantity":12,
45   - "pieceWeight":50,
46   - "grossWeight":0,
47   - "tareWeight":0,
48   - "weight":600,
49   - "price":200,
50   - "PriceStr":"2",
51   - "amount":2400,
52   - "amountStr":24.0,
53   - "originId":510100,
54   - "originName":"成都市",
55   - "feeItemList":[{
56   - "type":1,
57   - "chargeItemId":521,
58   - "chargeItemName":"买家手续费",
59   - "amount":2
60   - },{"type":2,
61   - "chargeItemId":522,
62   - "chargeItemName":"卖家手续费",
63   - "amount":12}]}
64   - ]
65   - }
  26 + "sellerId":141962,
  27 + "sellerName":"云云康飞卖",
  28 + "sellerAccountId":107663,
  29 + "sellerCardNo":"888810062816",
  30 + "buyerId":141968,
  31 + "buyerName":"袁豪正买",
  32 + "buyerAccountId":107676,
  33 + "buyerCardNo":"888810061104",
  34 + "posCode":"111222",
  35 + "tradePassword":"111111",
  36 + "orderItemList":[
  37 + {
  38 + "number":0,
  39 + "batchCode":"2109000215",
  40 + "productId":125,
  41 + "productCode":"374690",
  42 + "productName":"苹果",
  43 + "categoryId":374690,
  44 + "weightType":1,
  45 + "quantity":10,
  46 + "pieceWeight":1,
  47 + "grossWeight":0,
  48 + "tareWeight":0,
  49 + "weight":10,
  50 + "price":500,
  51 + "PriceStr":"5",
  52 + "amount":5000,
  53 + "amountStr":50,
  54 + "originId":510100,
  55 + "originName":"成都市",
  56 + "feeItemList":[
  57 + {
  58 + "type":1,
  59 + "chargeItemId":521,
  60 + "chargeItemName":"买家手续费",
  61 + "amount":1122
  62 + },
  63 + {
  64 + "type":2,
  65 + "chargeItemId":522,
  66 + "chargeItemName":"卖家手续费",
  67 + "amount":989
  68 + },
  69 + {
  70 + "type":2,
  71 + "chargeItemId":527,
  72 + "chargeItemName":"卖家仓储服务费",
  73 + "amount":367
  74 + }
  75 + ]
  76 + }
  77 + ]
  78 +}
66 79  
67 80  
68   -crat = createAndTrade()
69   -print(crat.body)
70   -re = hg.post(url = crat.url,json = crat.body,headers = crat.header,proxies=hg.myproxies)
71   -print(re.json())
72   -print(re.headers)
73 81 \ No newline at end of file
  82 +# creat = createAndTrade()
  83 +# print(creat.body)
  84 +# re = hg.post(url = creat.url,json = creat.body,headers = creat.header,proxies=hg.myproxies)
  85 +# print(re.json())
  86 +# print(re.headers)
74 87 \ No newline at end of file
... ...