Subversion Repositories SmartDukaan

Rev

Rev 7822 | Rev 7967 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7822 Rev 7937
Line 1790... Line 1790...
1790
     - orderId
1790
     - orderId
1791
     - newFreebieItemId
1791
     - newFreebieItemId
1792
    """
1792
    """
1793
    pass
1793
    pass
1794
 
1794
 
-
 
1795
  def updateOrderAWB(self, orderId, airwayBillNo):
-
 
1796
    """
-
 
1797
    Parameters:
-
 
1798
     - orderId
-
 
1799
     - airwayBillNo
-
 
1800
    """
-
 
1801
    pass
-
 
1802
 
1795
 
1803
 
1796
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1804
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1797
  def __init__(self, iprot, oprot=None):
1805
  def __init__(self, iprot, oprot=None):
1798
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1806
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1799
 
1807
 
Line 8337... Line 8345...
8337
    self._iprot.readMessageEnd()
8345
    self._iprot.readMessageEnd()
8338
    if result.success is not None:
8346
    if result.success is not None:
8339
      return result.success
8347
      return result.success
8340
    raise TApplicationException(TApplicationException.MISSING_RESULT, "updateFreebieItem failed: unknown result");
8348
    raise TApplicationException(TApplicationException.MISSING_RESULT, "updateFreebieItem failed: unknown result");
8341
 
8349
 
-
 
8350
  def updateOrderAWB(self, orderId, airwayBillNo):
-
 
8351
    """
-
 
8352
    Parameters:
-
 
8353
     - orderId
-
 
8354
     - airwayBillNo
-
 
8355
    """
-
 
8356
    self.send_updateOrderAWB(orderId, airwayBillNo)
-
 
8357
    return self.recv_updateOrderAWB()
-
 
8358
 
-
 
8359
  def send_updateOrderAWB(self, orderId, airwayBillNo):
-
 
8360
    self._oprot.writeMessageBegin('updateOrderAWB', TMessageType.CALL, self._seqid)
-
 
8361
    args = updateOrderAWB_args()
-
 
8362
    args.orderId = orderId
-
 
8363
    args.airwayBillNo = airwayBillNo
-
 
8364
    args.write(self._oprot)
-
 
8365
    self._oprot.writeMessageEnd()
-
 
8366
    self._oprot.trans.flush()
-
 
8367
 
-
 
8368
  def recv_updateOrderAWB(self, ):
-
 
8369
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
8370
    if mtype == TMessageType.EXCEPTION:
-
 
8371
      x = TApplicationException()
-
 
8372
      x.read(self._iprot)
-
 
8373
      self._iprot.readMessageEnd()
-
 
8374
      raise x
-
 
8375
    result = updateOrderAWB_result()
-
 
8376
    result.read(self._iprot)
-
 
8377
    self._iprot.readMessageEnd()
-
 
8378
    if result.success is not None:
-
 
8379
      return result.success
-
 
8380
    raise TApplicationException(TApplicationException.MISSING_RESULT, "updateOrderAWB failed: unknown result");
-
 
8381
 
8342
 
8382
 
8343
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
8383
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
8344
  def __init__(self, handler):
8384
  def __init__(self, handler):
8345
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
8385
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
8346
    self._processMap["createTransaction"] = Processor.process_createTransaction
8386
    self._processMap["createTransaction"] = Processor.process_createTransaction
Line 8535... Line 8575...
8535
    self._processMap["updateSourceDetailTimestamp"] = Processor.process_updateSourceDetailTimestamp
8575
    self._processMap["updateSourceDetailTimestamp"] = Processor.process_updateSourceDetailTimestamp
8536
    self._processMap["getOrdersByMobileNumber"] = Processor.process_getOrdersByMobileNumber
8576
    self._processMap["getOrdersByMobileNumber"] = Processor.process_getOrdersByMobileNumber
8537
    self._processMap["getOrdersByAmazonOrderCode"] = Processor.process_getOrdersByAmazonOrderCode
8577
    self._processMap["getOrdersByAmazonOrderCode"] = Processor.process_getOrdersByAmazonOrderCode
8538
    self._processMap["convertStoreToNormal"] = Processor.process_convertStoreToNormal
8578
    self._processMap["convertStoreToNormal"] = Processor.process_convertStoreToNormal
8539
    self._processMap["updateFreebieItem"] = Processor.process_updateFreebieItem
8579
    self._processMap["updateFreebieItem"] = Processor.process_updateFreebieItem
-
 
8580
    self._processMap["updateOrderAWB"] = Processor.process_updateOrderAWB
8540
 
8581
 
8541
  def process(self, iprot, oprot):
8582
  def process(self, iprot, oprot):
8542
    (name, type, seqid) = iprot.readMessageBegin()
8583
    (name, type, seqid) = iprot.readMessageBegin()
8543
    if name not in self._processMap:
8584
    if name not in self._processMap:
8544
      iprot.skip(TType.STRUCT)
8585
      iprot.skip(TType.STRUCT)
Line 10982... Line 11023...
10982
    oprot.writeMessageBegin("updateFreebieItem", TMessageType.REPLY, seqid)
11023
    oprot.writeMessageBegin("updateFreebieItem", TMessageType.REPLY, seqid)
10983
    result.write(oprot)
11024
    result.write(oprot)
10984
    oprot.writeMessageEnd()
11025
    oprot.writeMessageEnd()
10985
    oprot.trans.flush()
11026
    oprot.trans.flush()
10986
 
11027
 
-
 
11028
  def process_updateOrderAWB(self, seqid, iprot, oprot):
-
 
11029
    args = updateOrderAWB_args()
-
 
11030
    args.read(iprot)
-
 
11031
    iprot.readMessageEnd()
-
 
11032
    result = updateOrderAWB_result()
-
 
11033
    result.success = self._handler.updateOrderAWB(args.orderId, args.airwayBillNo)
-
 
11034
    oprot.writeMessageBegin("updateOrderAWB", TMessageType.REPLY, seqid)
-
 
11035
    result.write(oprot)
-
 
11036
    oprot.writeMessageEnd()
-
 
11037
    oprot.trans.flush()
-
 
11038
 
10987
 
11039
 
10988
# HELPER FUNCTIONS AND STRUCTURES
11040
# HELPER FUNCTIONS AND STRUCTURES
10989
 
11041
 
10990
class createTransaction_args:
11042
class createTransaction_args:
10991
  """
11043
  """
Line 37906... Line 37958...
37906
    if self.success is not None:
37958
    if self.success is not None:
37907
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
37959
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
37908
      self.success.write(oprot)
37960
      self.success.write(oprot)
37909
      oprot.writeFieldEnd()
37961
      oprot.writeFieldEnd()
37910
    oprot.writeFieldStop()
37962
    oprot.writeFieldStop()
-
 
37963
    oprot.writeStructEnd()
-
 
37964
 
-
 
37965
  def validate(self):
-
 
37966
    return
-
 
37967
 
-
 
37968
 
-
 
37969
  def __repr__(self):
-
 
37970
    L = ['%s=%r' % (key, value)
-
 
37971
      for key, value in self.__dict__.iteritems()]
-
 
37972
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
37973
 
-
 
37974
  def __eq__(self, other):
-
 
37975
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
37976
 
-
 
37977
  def __ne__(self, other):
-
 
37978
    return not (self == other)
-
 
37979
 
-
 
37980
class updateOrderAWB_args:
-
 
37981
  """
-
 
37982
  Attributes:
-
 
37983
   - orderId
-
 
37984
   - airwayBillNo
-
 
37985
  """
-
 
37986
 
-
 
37987
  thrift_spec = (
-
 
37988
    None, # 0
-
 
37989
    (1, TType.I64, 'orderId', None, None, ), # 1
-
 
37990
    (2, TType.STRING, 'airwayBillNo', None, None, ), # 2
-
 
37991
  )
-
 
37992
 
-
 
37993
  def __init__(self, orderId=None, airwayBillNo=None,):
-
 
37994
    self.orderId = orderId
-
 
37995
    self.airwayBillNo = airwayBillNo
-
 
37996
 
-
 
37997
  def read(self, iprot):
-
 
37998
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
37999
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
38000
      return
-
 
38001
    iprot.readStructBegin()
-
 
38002
    while True:
-
 
38003
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
38004
      if ftype == TType.STOP:
-
 
38005
        break
-
 
38006
      if fid == 1:
-
 
38007
        if ftype == TType.I64:
-
 
38008
          self.orderId = iprot.readI64();
-
 
38009
        else:
-
 
38010
          iprot.skip(ftype)
-
 
38011
      elif fid == 2:
-
 
38012
        if ftype == TType.STRING:
-
 
38013
          self.airwayBillNo = iprot.readString();
-
 
38014
        else:
-
 
38015
          iprot.skip(ftype)
-
 
38016
      else:
-
 
38017
        iprot.skip(ftype)
-
 
38018
      iprot.readFieldEnd()
-
 
38019
    iprot.readStructEnd()
-
 
38020
 
-
 
38021
  def write(self, oprot):
-
 
38022
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
38023
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
38024
      return
-
 
38025
    oprot.writeStructBegin('updateOrderAWB_args')
-
 
38026
    if self.orderId is not None:
-
 
38027
      oprot.writeFieldBegin('orderId', TType.I64, 1)
-
 
38028
      oprot.writeI64(self.orderId)
-
 
38029
      oprot.writeFieldEnd()
-
 
38030
    if self.airwayBillNo is not None:
-
 
38031
      oprot.writeFieldBegin('airwayBillNo', TType.STRING, 2)
-
 
38032
      oprot.writeString(self.airwayBillNo)
-
 
38033
      oprot.writeFieldEnd()
-
 
38034
    oprot.writeFieldStop()
-
 
38035
    oprot.writeStructEnd()
-
 
38036
 
-
 
38037
  def validate(self):
-
 
38038
    return
-
 
38039
 
-
 
38040
 
-
 
38041
  def __repr__(self):
-
 
38042
    L = ['%s=%r' % (key, value)
-
 
38043
      for key, value in self.__dict__.iteritems()]
-
 
38044
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
38045
 
-
 
38046
  def __eq__(self, other):
-
 
38047
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
38048
 
-
 
38049
  def __ne__(self, other):
-
 
38050
    return not (self == other)
-
 
38051
 
-
 
38052
class updateOrderAWB_result:
-
 
38053
  """
-
 
38054
  Attributes:
-
 
38055
   - success
-
 
38056
  """
-
 
38057
 
-
 
38058
  thrift_spec = (
-
 
38059
    (0, TType.STRUCT, 'success', (Order, Order.thrift_spec), None, ), # 0
-
 
38060
  )
-
 
38061
 
-
 
38062
  def __init__(self, success=None,):
-
 
38063
    self.success = success
-
 
38064
 
-
 
38065
  def read(self, iprot):
-
 
38066
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
38067
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
38068
      return
-
 
38069
    iprot.readStructBegin()
-
 
38070
    while True:
-
 
38071
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
38072
      if ftype == TType.STOP:
-
 
38073
        break
-
 
38074
      if fid == 0:
-
 
38075
        if ftype == TType.STRUCT:
-
 
38076
          self.success = Order()
-
 
38077
          self.success.read(iprot)
-
 
38078
        else:
-
 
38079
          iprot.skip(ftype)
-
 
38080
      else:
-
 
38081
        iprot.skip(ftype)
-
 
38082
      iprot.readFieldEnd()
-
 
38083
    iprot.readStructEnd()
-
 
38084
 
-
 
38085
  def write(self, oprot):
-
 
38086
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
38087
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
38088
      return
-
 
38089
    oprot.writeStructBegin('updateOrderAWB_result')
-
 
38090
    if self.success is not None:
-
 
38091
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
-
 
38092
      self.success.write(oprot)
-
 
38093
      oprot.writeFieldEnd()
-
 
38094
    oprot.writeFieldStop()
37911
    oprot.writeStructEnd()
38095
    oprot.writeStructEnd()
37912
 
38096
 
37913
  def validate(self):
38097
  def validate(self):
37914
    return
38098
    return
37915
 
38099