Subversion Repositories SmartDukaan

Rev

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

Rev 21853 Rev 22566
Line 1422... Line 1422...
1422
    Parameters:
1422
    Parameters:
1423
     - categoryId
1423
     - categoryId
1424
    """
1424
    """
1425
    pass
1425
    pass
1426
 
1426
 
-
 
1427
  def getAllFofoDeals(self, itemIds, tagIds):
-
 
1428
    """
-
 
1429
    Parameters:
-
 
1430
     - itemIds
-
 
1431
     - tagIds
-
 
1432
    """
-
 
1433
    pass
-
 
1434
 
1427
 
1435
 
1428
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1436
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1429
  def __init__(self, iprot, oprot=None):
1437
  def __init__(self, iprot, oprot=None):
1430
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1438
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1431
 
1439
 
Line 7607... Line 7615...
7607
      return result.success
7615
      return result.success
7608
    if result.cex is not None:
7616
    if result.cex is not None:
7609
      raise result.cex
7617
      raise result.cex
7610
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getHsnCodesByCategory failed: unknown result");
7618
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getHsnCodesByCategory failed: unknown result");
7611
 
7619
 
-
 
7620
  def getAllFofoDeals(self, itemIds, tagIds):
-
 
7621
    """
-
 
7622
    Parameters:
-
 
7623
     - itemIds
-
 
7624
     - tagIds
-
 
7625
    """
-
 
7626
    self.send_getAllFofoDeals(itemIds, tagIds)
-
 
7627
    return self.recv_getAllFofoDeals()
-
 
7628
 
-
 
7629
  def send_getAllFofoDeals(self, itemIds, tagIds):
-
 
7630
    self._oprot.writeMessageBegin('getAllFofoDeals', TMessageType.CALL, self._seqid)
-
 
7631
    args = getAllFofoDeals_args()
-
 
7632
    args.itemIds = itemIds
-
 
7633
    args.tagIds = tagIds
-
 
7634
    args.write(self._oprot)
-
 
7635
    self._oprot.writeMessageEnd()
-
 
7636
    self._oprot.trans.flush()
-
 
7637
 
-
 
7638
  def recv_getAllFofoDeals(self, ):
-
 
7639
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
7640
    if mtype == TMessageType.EXCEPTION:
-
 
7641
      x = TApplicationException()
-
 
7642
      x.read(self._iprot)
-
 
7643
      self._iprot.readMessageEnd()
-
 
7644
      raise x
-
 
7645
    result = getAllFofoDeals_result()
-
 
7646
    result.read(self._iprot)
-
 
7647
    self._iprot.readMessageEnd()
-
 
7648
    if result.success is not None:
-
 
7649
      return result.success
-
 
7650
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllFofoDeals failed: unknown result");
-
 
7651
 
7612
 
7652
 
7613
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
7653
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
7614
  def __init__(self, handler):
7654
  def __init__(self, handler):
7615
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
7655
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
7616
    self._processMap["addItem"] = Processor.process_addItem
7656
    self._processMap["addItem"] = Processor.process_addItem
Line 7814... Line 7854...
7814
    self._processMap["getWarrantyInfoForItem"] = Processor.process_getWarrantyInfoForItem
7854
    self._processMap["getWarrantyInfoForItem"] = Processor.process_getWarrantyInfoForItem
7815
    self._processMap["getWarrantyInfoForItemList"] = Processor.process_getWarrantyInfoForItemList
7855
    self._processMap["getWarrantyInfoForItemList"] = Processor.process_getWarrantyInfoForItemList
7816
    self._processMap["getGstRatesByState"] = Processor.process_getGstRatesByState
7856
    self._processMap["getGstRatesByState"] = Processor.process_getGstRatesByState
7817
    self._processMap["getInterStateGstRates"] = Processor.process_getInterStateGstRates
7857
    self._processMap["getInterStateGstRates"] = Processor.process_getInterStateGstRates
7818
    self._processMap["getHsnCodesByCategory"] = Processor.process_getHsnCodesByCategory
7858
    self._processMap["getHsnCodesByCategory"] = Processor.process_getHsnCodesByCategory
-
 
7859
    self._processMap["getAllFofoDeals"] = Processor.process_getAllFofoDeals
7819
 
7860
 
7820
  def process(self, iprot, oprot):
7861
  def process(self, iprot, oprot):
7821
    (name, type, seqid) = iprot.readMessageBegin()
7862
    (name, type, seqid) = iprot.readMessageBegin()
7822
    if name not in self._processMap:
7863
    if name not in self._processMap:
7823
      iprot.skip(TType.STRUCT)
7864
      iprot.skip(TType.STRUCT)
Line 10225... Line 10266...
10225
    oprot.writeMessageBegin("getHsnCodesByCategory", TMessageType.REPLY, seqid)
10266
    oprot.writeMessageBegin("getHsnCodesByCategory", TMessageType.REPLY, seqid)
10226
    result.write(oprot)
10267
    result.write(oprot)
10227
    oprot.writeMessageEnd()
10268
    oprot.writeMessageEnd()
10228
    oprot.trans.flush()
10269
    oprot.trans.flush()
10229
 
10270
 
-
 
10271
  def process_getAllFofoDeals(self, seqid, iprot, oprot):
-
 
10272
    args = getAllFofoDeals_args()
-
 
10273
    args.read(iprot)
-
 
10274
    iprot.readMessageEnd()
-
 
10275
    result = getAllFofoDeals_result()
-
 
10276
    result.success = self._handler.getAllFofoDeals(args.itemIds, args.tagIds)
-
 
10277
    oprot.writeMessageBegin("getAllFofoDeals", TMessageType.REPLY, seqid)
-
 
10278
    result.write(oprot)
-
 
10279
    oprot.writeMessageEnd()
-
 
10280
    oprot.trans.flush()
-
 
10281
 
10230
 
10282
 
10231
# HELPER FUNCTIONS AND STRUCTURES
10283
# HELPER FUNCTIONS AND STRUCTURES
10232
 
10284
 
10233
class addItem_args:
10285
class addItem_args:
10234
  """
10286
  """
Line 36136... Line 36188...
36136
      oprot.writeFieldEnd()
36188
      oprot.writeFieldEnd()
36137
    oprot.writeFieldStop()
36189
    oprot.writeFieldStop()
36138
    oprot.writeStructEnd()
36190
    oprot.writeStructEnd()
36139
 
36191
 
36140
  def validate(self):
36192
  def validate(self):
-
 
36193
    return
-
 
36194
 
-
 
36195
 
-
 
36196
  def __repr__(self):
-
 
36197
    L = ['%s=%r' % (key, value)
-
 
36198
      for key, value in self.__dict__.iteritems()]
-
 
36199
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
36200
 
-
 
36201
  def __eq__(self, other):
-
 
36202
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
36203
 
-
 
36204
  def __ne__(self, other):
-
 
36205
    return not (self == other)
-
 
36206
 
-
 
36207
class getAllFofoDeals_args:
-
 
36208
  """
-
 
36209
  Attributes:
-
 
36210
   - itemIds
-
 
36211
   - tagIds
-
 
36212
  """
-
 
36213
 
-
 
36214
  thrift_spec = None
-
 
36215
  def __init__(self, itemIds=None, tagIds=None,):
-
 
36216
    self.itemIds = itemIds
-
 
36217
    self.tagIds = tagIds
-
 
36218
 
-
 
36219
  def read(self, iprot):
-
 
36220
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
36221
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
36222
      return
-
 
36223
    iprot.readStructBegin()
-
 
36224
    while True:
-
 
36225
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
36226
      if ftype == TType.STOP:
-
 
36227
        break
-
 
36228
      if fid == -1:
-
 
36229
        if ftype == TType.LIST:
-
 
36230
          self.itemIds = []
-
 
36231
          (_etype1002, _size999) = iprot.readListBegin()
-
 
36232
          for _i1003 in xrange(_size999):
-
 
36233
            _elem1004 = iprot.readI64();
-
 
36234
            self.itemIds.append(_elem1004)
-
 
36235
          iprot.readListEnd()
-
 
36236
        else:
-
 
36237
          iprot.skip(ftype)
-
 
36238
      elif fid == -2:
-
 
36239
        if ftype == TType.LIST:
-
 
36240
          self.tagIds = []
-
 
36241
          (_etype1008, _size1005) = iprot.readListBegin()
-
 
36242
          for _i1009 in xrange(_size1005):
-
 
36243
            _elem1010 = iprot.readI64();
-
 
36244
            self.tagIds.append(_elem1010)
-
 
36245
          iprot.readListEnd()
-
 
36246
        else:
-
 
36247
          iprot.skip(ftype)
-
 
36248
      else:
-
 
36249
        iprot.skip(ftype)
-
 
36250
      iprot.readFieldEnd()
-
 
36251
    iprot.readStructEnd()
-
 
36252
 
-
 
36253
  def write(self, oprot):
-
 
36254
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
36255
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
36256
      return
-
 
36257
    oprot.writeStructBegin('getAllFofoDeals_args')
-
 
36258
    if self.tagIds is not None:
-
 
36259
      oprot.writeFieldBegin('tagIds', TType.LIST, -2)
-
 
36260
      oprot.writeListBegin(TType.I64, len(self.tagIds))
-
 
36261
      for iter1011 in self.tagIds:
-
 
36262
        oprot.writeI64(iter1011)
-
 
36263
      oprot.writeListEnd()
-
 
36264
      oprot.writeFieldEnd()
-
 
36265
    if self.itemIds is not None:
-
 
36266
      oprot.writeFieldBegin('itemIds', TType.LIST, -1)
-
 
36267
      oprot.writeListBegin(TType.I64, len(self.itemIds))
-
 
36268
      for iter1012 in self.itemIds:
-
 
36269
        oprot.writeI64(iter1012)
-
 
36270
      oprot.writeListEnd()
-
 
36271
      oprot.writeFieldEnd()
-
 
36272
    oprot.writeFieldStop()
-
 
36273
    oprot.writeStructEnd()
-
 
36274
 
-
 
36275
  def validate(self):
-
 
36276
    return
-
 
36277
 
-
 
36278
 
-
 
36279
  def __repr__(self):
-
 
36280
    L = ['%s=%r' % (key, value)
-
 
36281
      for key, value in self.__dict__.iteritems()]
-
 
36282
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
36283
 
-
 
36284
  def __eq__(self, other):
-
 
36285
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
36286
 
-
 
36287
  def __ne__(self, other):
-
 
36288
    return not (self == other)
-
 
36289
 
-
 
36290
class getAllFofoDeals_result:
-
 
36291
  """
-
 
36292
  Attributes:
-
 
36293
   - success
-
 
36294
  """
-
 
36295
 
-
 
36296
  thrift_spec = (
-
 
36297
    (0, TType.MAP, 'success', (TType.I64,None,TType.DOUBLE,None), None, ), # 0
-
 
36298
  )
-
 
36299
 
-
 
36300
  def __init__(self, success=None,):
-
 
36301
    self.success = success
-
 
36302
 
-
 
36303
  def read(self, iprot):
-
 
36304
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
36305
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
36306
      return
-
 
36307
    iprot.readStructBegin()
-
 
36308
    while True:
-
 
36309
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
36310
      if ftype == TType.STOP:
-
 
36311
        break
-
 
36312
      if fid == 0:
-
 
36313
        if ftype == TType.MAP:
-
 
36314
          self.success = {}
-
 
36315
          (_ktype1014, _vtype1015, _size1013 ) = iprot.readMapBegin() 
-
 
36316
          for _i1017 in xrange(_size1013):
-
 
36317
            _key1018 = iprot.readI64();
-
 
36318
            _val1019 = iprot.readDouble();
-
 
36319
            self.success[_key1018] = _val1019
-
 
36320
          iprot.readMapEnd()
-
 
36321
        else:
-
 
36322
          iprot.skip(ftype)
-
 
36323
      else:
-
 
36324
        iprot.skip(ftype)
-
 
36325
      iprot.readFieldEnd()
-
 
36326
    iprot.readStructEnd()
-
 
36327
 
-
 
36328
  def write(self, oprot):
-
 
36329
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
36330
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
36331
      return
-
 
36332
    oprot.writeStructBegin('getAllFofoDeals_result')
-
 
36333
    if self.success is not None:
-
 
36334
      oprot.writeFieldBegin('success', TType.MAP, 0)
-
 
36335
      oprot.writeMapBegin(TType.I64, TType.DOUBLE, len(self.success))
-
 
36336
      for kiter1020,viter1021 in self.success.items():
-
 
36337
        oprot.writeI64(kiter1020)
-
 
36338
        oprot.writeDouble(viter1021)
-
 
36339
      oprot.writeMapEnd()
-
 
36340
      oprot.writeFieldEnd()
-
 
36341
    oprot.writeFieldStop()
-
 
36342
    oprot.writeStructEnd()
-
 
36343
 
-
 
36344
  def validate(self):
36141
    return
36345
    return
36142
 
36346
 
36143
 
36347
 
36144
  def __repr__(self):
36348
  def __repr__(self):
36145
    L = ['%s=%r' % (key, value)
36349
    L = ['%s=%r' % (key, value)