Subversion Repositories SmartDukaan

Rev

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

Rev 7085 Rev 7096
Line 1514... Line 1514...
1514
     - circleId
1514
     - circleId
1515
     - operatorId
1515
     - operatorId
1516
    """
1516
    """
1517
    pass
1517
    pass
1518
 
1518
 
-
 
1519
  def getHotspotStore(self, id, hotspotid):
-
 
1520
    """
-
 
1521
    Parameters:
-
 
1522
     - id
-
 
1523
     - hotspotid
-
 
1524
    """
-
 
1525
    pass
-
 
1526
 
-
 
1527
  def getTelecomCircle(self, id, code):
-
 
1528
    """
-
 
1529
    Parameters:
-
 
1530
     - id
-
 
1531
     - code
-
 
1532
    """
-
 
1533
    pass
-
 
1534
 
1519
 
1535
 
1520
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1536
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1521
  def __init__(self, iprot, oprot=None):
1537
  def __init__(self, iprot, oprot=None):
1522
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1538
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1523
 
1539
 
Line 6904... Line 6920...
6904
    self._iprot.readMessageEnd()
6920
    self._iprot.readMessageEnd()
6905
    if result.success is not None:
6921
    if result.success is not None:
6906
      return result.success
6922
      return result.success
6907
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getFRCs failed: unknown result");
6923
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getFRCs failed: unknown result");
6908
 
6924
 
-
 
6925
  def getHotspotStore(self, id, hotspotid):
-
 
6926
    """
-
 
6927
    Parameters:
-
 
6928
     - id
-
 
6929
     - hotspotid
-
 
6930
    """
-
 
6931
    self.send_getHotspotStore(id, hotspotid)
-
 
6932
    return self.recv_getHotspotStore()
-
 
6933
 
-
 
6934
  def send_getHotspotStore(self, id, hotspotid):
-
 
6935
    self._oprot.writeMessageBegin('getHotspotStore', TMessageType.CALL, self._seqid)
-
 
6936
    args = getHotspotStore_args()
-
 
6937
    args.id = id
-
 
6938
    args.hotspotid = hotspotid
-
 
6939
    args.write(self._oprot)
-
 
6940
    self._oprot.writeMessageEnd()
-
 
6941
    self._oprot.trans.flush()
-
 
6942
 
-
 
6943
  def recv_getHotspotStore(self, ):
-
 
6944
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
6945
    if mtype == TMessageType.EXCEPTION:
-
 
6946
      x = TApplicationException()
-
 
6947
      x.read(self._iprot)
-
 
6948
      self._iprot.readMessageEnd()
-
 
6949
      raise x
-
 
6950
    result = getHotspotStore_result()
-
 
6951
    result.read(self._iprot)
-
 
6952
    self._iprot.readMessageEnd()
-
 
6953
    if result.success is not None:
-
 
6954
      return result.success
-
 
6955
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getHotspotStore failed: unknown result");
-
 
6956
 
-
 
6957
  def getTelecomCircle(self, id, code):
-
 
6958
    """
-
 
6959
    Parameters:
-
 
6960
     - id
-
 
6961
     - code
-
 
6962
    """
-
 
6963
    self.send_getTelecomCircle(id, code)
-
 
6964
    return self.recv_getTelecomCircle()
-
 
6965
 
-
 
6966
  def send_getTelecomCircle(self, id, code):
-
 
6967
    self._oprot.writeMessageBegin('getTelecomCircle', TMessageType.CALL, self._seqid)
-
 
6968
    args = getTelecomCircle_args()
-
 
6969
    args.id = id
-
 
6970
    args.code = code
-
 
6971
    args.write(self._oprot)
-
 
6972
    self._oprot.writeMessageEnd()
-
 
6973
    self._oprot.trans.flush()
-
 
6974
 
-
 
6975
  def recv_getTelecomCircle(self, ):
-
 
6976
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
6977
    if mtype == TMessageType.EXCEPTION:
-
 
6978
      x = TApplicationException()
-
 
6979
      x.read(self._iprot)
-
 
6980
      self._iprot.readMessageEnd()
-
 
6981
      raise x
-
 
6982
    result = getTelecomCircle_result()
-
 
6983
    result.read(self._iprot)
-
 
6984
    self._iprot.readMessageEnd()
-
 
6985
    if result.success is not None:
-
 
6986
      return result.success
-
 
6987
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getTelecomCircle failed: unknown result");
-
 
6988
 
6909
 
6989
 
6910
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
6990
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
6911
  def __init__(self, handler):
6991
  def __init__(self, handler):
6912
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
6992
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
6913
    self._processMap["createTransaction"] = Processor.process_createTransaction
6993
    self._processMap["createTransaction"] = Processor.process_createTransaction
Line 7065... Line 7145...
7065
    self._processMap["receiveUpdatesForRedExpress"] = Processor.process_receiveUpdatesForRedExpress
7145
    self._processMap["receiveUpdatesForRedExpress"] = Processor.process_receiveUpdatesForRedExpress
7066
    self._processMap["createRechargeTransaction"] = Processor.process_createRechargeTransaction
7146
    self._processMap["createRechargeTransaction"] = Processor.process_createRechargeTransaction
7067
    self._processMap["getRechargeTransactions"] = Processor.process_getRechargeTransactions
7147
    self._processMap["getRechargeTransactions"] = Processor.process_getRechargeTransactions
7068
    self._processMap["getRechargeTransaction"] = Processor.process_getRechargeTransaction
7148
    self._processMap["getRechargeTransaction"] = Processor.process_getRechargeTransaction
7069
    self._processMap["getFRCs"] = Processor.process_getFRCs
7149
    self._processMap["getFRCs"] = Processor.process_getFRCs
-
 
7150
    self._processMap["getHotspotStore"] = Processor.process_getHotspotStore
-
 
7151
    self._processMap["getTelecomCircle"] = Processor.process_getTelecomCircle
7070
 
7152
 
7071
  def process(self, iprot, oprot):
7153
  def process(self, iprot, oprot):
7072
    (name, type, seqid) = iprot.readMessageBegin()
7154
    (name, type, seqid) = iprot.readMessageBegin()
7073
    if name not in self._processMap:
7155
    if name not in self._processMap:
7074
      iprot.skip(TType.STRUCT)
7156
      iprot.skip(TType.STRUCT)
Line 9102... Line 9184...
9102
    oprot.writeMessageBegin("getFRCs", TMessageType.REPLY, seqid)
9184
    oprot.writeMessageBegin("getFRCs", TMessageType.REPLY, seqid)
9103
    result.write(oprot)
9185
    result.write(oprot)
9104
    oprot.writeMessageEnd()
9186
    oprot.writeMessageEnd()
9105
    oprot.trans.flush()
9187
    oprot.trans.flush()
9106
 
9188
 
-
 
9189
  def process_getHotspotStore(self, seqid, iprot, oprot):
-
 
9190
    args = getHotspotStore_args()
-
 
9191
    args.read(iprot)
-
 
9192
    iprot.readMessageEnd()
-
 
9193
    result = getHotspotStore_result()
-
 
9194
    result.success = self._handler.getHotspotStore(args.id, args.hotspotid)
-
 
9195
    oprot.writeMessageBegin("getHotspotStore", TMessageType.REPLY, seqid)
-
 
9196
    result.write(oprot)
-
 
9197
    oprot.writeMessageEnd()
-
 
9198
    oprot.trans.flush()
-
 
9199
 
-
 
9200
  def process_getTelecomCircle(self, seqid, iprot, oprot):
-
 
9201
    args = getTelecomCircle_args()
-
 
9202
    args.read(iprot)
-
 
9203
    iprot.readMessageEnd()
-
 
9204
    result = getTelecomCircle_result()
-
 
9205
    result.success = self._handler.getTelecomCircle(args.id, args.code)
-
 
9206
    oprot.writeMessageBegin("getTelecomCircle", TMessageType.REPLY, seqid)
-
 
9207
    result.write(oprot)
-
 
9208
    oprot.writeMessageEnd()
-
 
9209
    oprot.trans.flush()
-
 
9210
 
9107
 
9211
 
9108
# HELPER FUNCTIONS AND STRUCTURES
9212
# HELPER FUNCTIONS AND STRUCTURES
9109
 
9213
 
9110
class createTransaction_args:
9214
class createTransaction_args:
9111
  """
9215
  """
Line 31140... Line 31244...
31140
      oprot.writeFieldEnd()
31244
      oprot.writeFieldEnd()
31141
    oprot.writeFieldStop()
31245
    oprot.writeFieldStop()
31142
    oprot.writeStructEnd()
31246
    oprot.writeStructEnd()
31143
 
31247
 
31144
  def validate(self):
31248
  def validate(self):
-
 
31249
    return
-
 
31250
 
-
 
31251
 
-
 
31252
  def __repr__(self):
-
 
31253
    L = ['%s=%r' % (key, value)
-
 
31254
      for key, value in self.__dict__.iteritems()]
-
 
31255
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
31256
 
-
 
31257
  def __eq__(self, other):
-
 
31258
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
31259
 
-
 
31260
  def __ne__(self, other):
-
 
31261
    return not (self == other)
-
 
31262
 
-
 
31263
class getHotspotStore_args:
-
 
31264
  """
-
 
31265
  Attributes:
-
 
31266
   - id
-
 
31267
   - hotspotid
-
 
31268
  """
-
 
31269
 
-
 
31270
  thrift_spec = (
-
 
31271
    None, # 0
-
 
31272
    (1, TType.I64, 'id', None, None, ), # 1
-
 
31273
    (2, TType.STRING, 'hotspotid', None, None, ), # 2
-
 
31274
  )
-
 
31275
 
-
 
31276
  def __init__(self, id=None, hotspotid=None,):
-
 
31277
    self.id = id
-
 
31278
    self.hotspotid = hotspotid
-
 
31279
 
-
 
31280
  def read(self, iprot):
-
 
31281
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
31282
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
31283
      return
-
 
31284
    iprot.readStructBegin()
-
 
31285
    while True:
-
 
31286
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
31287
      if ftype == TType.STOP:
-
 
31288
        break
-
 
31289
      if fid == 1:
-
 
31290
        if ftype == TType.I64:
-
 
31291
          self.id = iprot.readI64();
-
 
31292
        else:
-
 
31293
          iprot.skip(ftype)
-
 
31294
      elif fid == 2:
-
 
31295
        if ftype == TType.STRING:
-
 
31296
          self.hotspotid = iprot.readString();
-
 
31297
        else:
-
 
31298
          iprot.skip(ftype)
-
 
31299
      else:
-
 
31300
        iprot.skip(ftype)
-
 
31301
      iprot.readFieldEnd()
-
 
31302
    iprot.readStructEnd()
-
 
31303
 
-
 
31304
  def write(self, oprot):
-
 
31305
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
31306
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
31307
      return
-
 
31308
    oprot.writeStructBegin('getHotspotStore_args')
-
 
31309
    if self.id is not None:
-
 
31310
      oprot.writeFieldBegin('id', TType.I64, 1)
-
 
31311
      oprot.writeI64(self.id)
-
 
31312
      oprot.writeFieldEnd()
-
 
31313
    if self.hotspotid is not None:
-
 
31314
      oprot.writeFieldBegin('hotspotid', TType.STRING, 2)
-
 
31315
      oprot.writeString(self.hotspotid)
-
 
31316
      oprot.writeFieldEnd()
-
 
31317
    oprot.writeFieldStop()
-
 
31318
    oprot.writeStructEnd()
-
 
31319
 
-
 
31320
  def validate(self):
-
 
31321
    return
-
 
31322
 
-
 
31323
 
-
 
31324
  def __repr__(self):
-
 
31325
    L = ['%s=%r' % (key, value)
-
 
31326
      for key, value in self.__dict__.iteritems()]
-
 
31327
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
31328
 
-
 
31329
  def __eq__(self, other):
-
 
31330
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
31331
 
-
 
31332
  def __ne__(self, other):
-
 
31333
    return not (self == other)
-
 
31334
 
-
 
31335
class getHotspotStore_result:
-
 
31336
  """
-
 
31337
  Attributes:
-
 
31338
   - success
-
 
31339
  """
-
 
31340
 
-
 
31341
  thrift_spec = (
-
 
31342
    (0, TType.STRUCT, 'success', (HotspotStore, HotspotStore.thrift_spec), None, ), # 0
-
 
31343
  )
-
 
31344
 
-
 
31345
  def __init__(self, success=None,):
-
 
31346
    self.success = success
-
 
31347
 
-
 
31348
  def read(self, iprot):
-
 
31349
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
31350
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
31351
      return
-
 
31352
    iprot.readStructBegin()
-
 
31353
    while True:
-
 
31354
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
31355
      if ftype == TType.STOP:
-
 
31356
        break
-
 
31357
      if fid == 0:
-
 
31358
        if ftype == TType.STRUCT:
-
 
31359
          self.success = HotspotStore()
-
 
31360
          self.success.read(iprot)
-
 
31361
        else:
-
 
31362
          iprot.skip(ftype)
-
 
31363
      else:
-
 
31364
        iprot.skip(ftype)
-
 
31365
      iprot.readFieldEnd()
-
 
31366
    iprot.readStructEnd()
-
 
31367
 
-
 
31368
  def write(self, oprot):
-
 
31369
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
31370
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
31371
      return
-
 
31372
    oprot.writeStructBegin('getHotspotStore_result')
-
 
31373
    if self.success is not None:
-
 
31374
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
-
 
31375
      self.success.write(oprot)
-
 
31376
      oprot.writeFieldEnd()
-
 
31377
    oprot.writeFieldStop()
-
 
31378
    oprot.writeStructEnd()
-
 
31379
 
-
 
31380
  def validate(self):
-
 
31381
    return
-
 
31382
 
-
 
31383
 
-
 
31384
  def __repr__(self):
-
 
31385
    L = ['%s=%r' % (key, value)
-
 
31386
      for key, value in self.__dict__.iteritems()]
-
 
31387
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
31388
 
-
 
31389
  def __eq__(self, other):
-
 
31390
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
31391
 
-
 
31392
  def __ne__(self, other):
-
 
31393
    return not (self == other)
-
 
31394
 
-
 
31395
class getTelecomCircle_args:
-
 
31396
  """
-
 
31397
  Attributes:
-
 
31398
   - id
-
 
31399
   - code
-
 
31400
  """
-
 
31401
 
-
 
31402
  thrift_spec = (
-
 
31403
    None, # 0
-
 
31404
    (1, TType.I64, 'id', None, None, ), # 1
-
 
31405
    (2, TType.STRING, 'code', None, None, ), # 2
-
 
31406
  )
-
 
31407
 
-
 
31408
  def __init__(self, id=None, code=None,):
-
 
31409
    self.id = id
-
 
31410
    self.code = code
-
 
31411
 
-
 
31412
  def read(self, iprot):
-
 
31413
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
31414
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
31415
      return
-
 
31416
    iprot.readStructBegin()
-
 
31417
    while True:
-
 
31418
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
31419
      if ftype == TType.STOP:
-
 
31420
        break
-
 
31421
      if fid == 1:
-
 
31422
        if ftype == TType.I64:
-
 
31423
          self.id = iprot.readI64();
-
 
31424
        else:
-
 
31425
          iprot.skip(ftype)
-
 
31426
      elif fid == 2:
-
 
31427
        if ftype == TType.STRING:
-
 
31428
          self.code = iprot.readString();
-
 
31429
        else:
-
 
31430
          iprot.skip(ftype)
-
 
31431
      else:
-
 
31432
        iprot.skip(ftype)
-
 
31433
      iprot.readFieldEnd()
-
 
31434
    iprot.readStructEnd()
-
 
31435
 
-
 
31436
  def write(self, oprot):
-
 
31437
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
31438
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
31439
      return
-
 
31440
    oprot.writeStructBegin('getTelecomCircle_args')
-
 
31441
    if self.id is not None:
-
 
31442
      oprot.writeFieldBegin('id', TType.I64, 1)
-
 
31443
      oprot.writeI64(self.id)
-
 
31444
      oprot.writeFieldEnd()
-
 
31445
    if self.code is not None:
-
 
31446
      oprot.writeFieldBegin('code', TType.STRING, 2)
-
 
31447
      oprot.writeString(self.code)
-
 
31448
      oprot.writeFieldEnd()
-
 
31449
    oprot.writeFieldStop()
-
 
31450
    oprot.writeStructEnd()
-
 
31451
 
-
 
31452
  def validate(self):
-
 
31453
    return
-
 
31454
 
-
 
31455
 
-
 
31456
  def __repr__(self):
-
 
31457
    L = ['%s=%r' % (key, value)
-
 
31458
      for key, value in self.__dict__.iteritems()]
-
 
31459
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
31460
 
-
 
31461
  def __eq__(self, other):
-
 
31462
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
31463
 
-
 
31464
  def __ne__(self, other):
-
 
31465
    return not (self == other)
-
 
31466
 
-
 
31467
class getTelecomCircle_result:
-
 
31468
  """
-
 
31469
  Attributes:
-
 
31470
   - success
-
 
31471
  """
-
 
31472
 
-
 
31473
  thrift_spec = (
-
 
31474
    (0, TType.STRUCT, 'success', (TelecomCircle, TelecomCircle.thrift_spec), None, ), # 0
-
 
31475
  )
-
 
31476
 
-
 
31477
  def __init__(self, success=None,):
-
 
31478
    self.success = success
-
 
31479
 
-
 
31480
  def read(self, iprot):
-
 
31481
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
31482
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
31483
      return
-
 
31484
    iprot.readStructBegin()
-
 
31485
    while True:
-
 
31486
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
31487
      if ftype == TType.STOP:
-
 
31488
        break
-
 
31489
      if fid == 0:
-
 
31490
        if ftype == TType.STRUCT:
-
 
31491
          self.success = TelecomCircle()
-
 
31492
          self.success.read(iprot)
-
 
31493
        else:
-
 
31494
          iprot.skip(ftype)
-
 
31495
      else:
-
 
31496
        iprot.skip(ftype)
-
 
31497
      iprot.readFieldEnd()
-
 
31498
    iprot.readStructEnd()
-
 
31499
 
-
 
31500
  def write(self, oprot):
-
 
31501
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
31502
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
31503
      return
-
 
31504
    oprot.writeStructBegin('getTelecomCircle_result')
-
 
31505
    if self.success is not None:
-
 
31506
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
-
 
31507
      self.success.write(oprot)
-
 
31508
      oprot.writeFieldEnd()
-
 
31509
    oprot.writeFieldStop()
-
 
31510
    oprot.writeStructEnd()
-
 
31511
 
-
 
31512
  def validate(self):
31145
    return
31513
    return
31146
 
31514
 
31147
 
31515
 
31148
  def __repr__(self):
31516
  def __repr__(self):
31149
    L = ['%s=%r' % (key, value)
31517
    L = ['%s=%r' % (key, value)