Subversion Repositories SmartDukaan

Rev

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

Rev 18764 Rev 18977
Line 708... Line 708...
708
     - type1
708
     - type1
709
     - searchString
709
     - searchString
710
    """
710
    """
711
    pass
711
    pass
712
 
712
 
-
 
713
  def getCounterByUserId(self, userId):
-
 
714
    """
-
 
715
    Parameters:
-
 
716
     - userId
-
 
717
    """
-
 
718
    pass
-
 
719
 
713
  def getAllUsersByCounter(self, counterId):
720
  def getAllUsersByCounter(self, counterId):
714
    """
721
    """
715
    Parameters:
722
    Parameters:
716
     - counterId
723
     - counterId
717
    """
724
    """
Line 3472... Line 3479...
3472
    self._iprot.readMessageEnd()
3479
    self._iprot.readMessageEnd()
3473
    if result.success is not None:
3480
    if result.success is not None:
3474
      return result.success
3481
      return result.success
3475
    raise TApplicationException(TApplicationException.MISSING_RESULT, "searchCounter failed: unknown result");
3482
    raise TApplicationException(TApplicationException.MISSING_RESULT, "searchCounter failed: unknown result");
3476
 
3483
 
-
 
3484
  def getCounterByUserId(self, userId):
-
 
3485
    """
-
 
3486
    Parameters:
-
 
3487
     - userId
-
 
3488
    """
-
 
3489
    self.send_getCounterByUserId(userId)
-
 
3490
    return self.recv_getCounterByUserId()
-
 
3491
 
-
 
3492
  def send_getCounterByUserId(self, userId):
-
 
3493
    self._oprot.writeMessageBegin('getCounterByUserId', TMessageType.CALL, self._seqid)
-
 
3494
    args = getCounterByUserId_args()
-
 
3495
    args.userId = userId
-
 
3496
    args.write(self._oprot)
-
 
3497
    self._oprot.writeMessageEnd()
-
 
3498
    self._oprot.trans.flush()
-
 
3499
 
-
 
3500
  def recv_getCounterByUserId(self, ):
-
 
3501
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
3502
    if mtype == TMessageType.EXCEPTION:
-
 
3503
      x = TApplicationException()
-
 
3504
      x.read(self._iprot)
-
 
3505
      self._iprot.readMessageEnd()
-
 
3506
      raise x
-
 
3507
    result = getCounterByUserId_result()
-
 
3508
    result.read(self._iprot)
-
 
3509
    self._iprot.readMessageEnd()
-
 
3510
    if result.success is not None:
-
 
3511
      return result.success
-
 
3512
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getCounterByUserId failed: unknown result");
-
 
3513
 
3477
  def getAllUsersByCounter(self, counterId):
3514
  def getAllUsersByCounter(self, counterId):
3478
    """
3515
    """
3479
    Parameters:
3516
    Parameters:
3480
     - counterId
3517
     - counterId
3481
    """
3518
    """
Line 3866... Line 3903...
3866
    self._processMap["addPrivateDealUser"] = Processor.process_addPrivateDealUser
3903
    self._processMap["addPrivateDealUser"] = Processor.process_addPrivateDealUser
3867
    self._processMap["changePrivateDealUserStatus"] = Processor.process_changePrivateDealUserStatus
3904
    self._processMap["changePrivateDealUserStatus"] = Processor.process_changePrivateDealUserStatus
3868
    self._processMap["getPrivateDealUser"] = Processor.process_getPrivateDealUser
3905
    self._processMap["getPrivateDealUser"] = Processor.process_getPrivateDealUser
3869
    self._processMap["registerCounter"] = Processor.process_registerCounter
3906
    self._processMap["registerCounter"] = Processor.process_registerCounter
3870
    self._processMap["searchCounter"] = Processor.process_searchCounter
3907
    self._processMap["searchCounter"] = Processor.process_searchCounter
-
 
3908
    self._processMap["getCounterByUserId"] = Processor.process_getCounterByUserId
3871
    self._processMap["getAllUsersByCounter"] = Processor.process_getAllUsersByCounter
3909
    self._processMap["getAllUsersByCounter"] = Processor.process_getAllUsersByCounter
3872
    self._processMap["getActiveAccessTokenForUser"] = Processor.process_getActiveAccessTokenForUser
3910
    self._processMap["getActiveAccessTokenForUser"] = Processor.process_getActiveAccessTokenForUser
3873
    self._processMap["validateAccessToken"] = Processor.process_validateAccessToken
3911
    self._processMap["validateAccessToken"] = Processor.process_validateAccessToken
3874
    self._processMap["addItemsToCart"] = Processor.process_addItemsToCart
3912
    self._processMap["addItemsToCart"] = Processor.process_addItemsToCart
3875
    self._processMap["validateCartNew"] = Processor.process_validateCartNew
3913
    self._processMap["validateCartNew"] = Processor.process_validateCartNew
Line 4948... Line 4986...
4948
    oprot.writeMessageBegin("searchCounter", TMessageType.REPLY, seqid)
4986
    oprot.writeMessageBegin("searchCounter", TMessageType.REPLY, seqid)
4949
    result.write(oprot)
4987
    result.write(oprot)
4950
    oprot.writeMessageEnd()
4988
    oprot.writeMessageEnd()
4951
    oprot.trans.flush()
4989
    oprot.trans.flush()
4952
 
4990
 
-
 
4991
  def process_getCounterByUserId(self, seqid, iprot, oprot):
-
 
4992
    args = getCounterByUserId_args()
-
 
4993
    args.read(iprot)
-
 
4994
    iprot.readMessageEnd()
-
 
4995
    result = getCounterByUserId_result()
-
 
4996
    result.success = self._handler.getCounterByUserId(args.userId)
-
 
4997
    oprot.writeMessageBegin("getCounterByUserId", TMessageType.REPLY, seqid)
-
 
4998
    result.write(oprot)
-
 
4999
    oprot.writeMessageEnd()
-
 
5000
    oprot.trans.flush()
-
 
5001
 
4953
  def process_getAllUsersByCounter(self, seqid, iprot, oprot):
5002
  def process_getAllUsersByCounter(self, seqid, iprot, oprot):
4954
    args = getAllUsersByCounter_args()
5003
    args = getAllUsersByCounter_args()
4955
    args.read(iprot)
5004
    args.read(iprot)
4956
    iprot.readMessageEnd()
5005
    iprot.readMessageEnd()
4957
    result = getAllUsersByCounter_result()
5006
    result = getAllUsersByCounter_result()
Line 16174... Line 16223...
16174
      oprot.writeFieldEnd()
16223
      oprot.writeFieldEnd()
16175
    oprot.writeFieldStop()
16224
    oprot.writeFieldStop()
16176
    oprot.writeStructEnd()
16225
    oprot.writeStructEnd()
16177
 
16226
 
16178
  def validate(self):
16227
  def validate(self):
-
 
16228
    return
-
 
16229
 
-
 
16230
 
-
 
16231
  def __repr__(self):
-
 
16232
    L = ['%s=%r' % (key, value)
-
 
16233
      for key, value in self.__dict__.iteritems()]
-
 
16234
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
16235
 
-
 
16236
  def __eq__(self, other):
-
 
16237
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
16238
 
-
 
16239
  def __ne__(self, other):
-
 
16240
    return not (self == other)
-
 
16241
 
-
 
16242
class getCounterByUserId_args:
-
 
16243
  """
-
 
16244
  Attributes:
-
 
16245
   - userId
-
 
16246
  """
-
 
16247
 
-
 
16248
  thrift_spec = (
-
 
16249
    None, # 0
-
 
16250
    (1, TType.I64, 'userId', None, None, ), # 1
-
 
16251
  )
-
 
16252
 
-
 
16253
  def __init__(self, userId=None,):
-
 
16254
    self.userId = userId
-
 
16255
 
-
 
16256
  def read(self, iprot):
-
 
16257
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
16258
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
16259
      return
-
 
16260
    iprot.readStructBegin()
-
 
16261
    while True:
-
 
16262
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
16263
      if ftype == TType.STOP:
-
 
16264
        break
-
 
16265
      if fid == 1:
-
 
16266
        if ftype == TType.I64:
-
 
16267
          self.userId = iprot.readI64();
-
 
16268
        else:
-
 
16269
          iprot.skip(ftype)
-
 
16270
      else:
-
 
16271
        iprot.skip(ftype)
-
 
16272
      iprot.readFieldEnd()
-
 
16273
    iprot.readStructEnd()
-
 
16274
 
-
 
16275
  def write(self, oprot):
-
 
16276
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
16277
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
16278
      return
-
 
16279
    oprot.writeStructBegin('getCounterByUserId_args')
-
 
16280
    if self.userId is not None:
-
 
16281
      oprot.writeFieldBegin('userId', TType.I64, 1)
-
 
16282
      oprot.writeI64(self.userId)
-
 
16283
      oprot.writeFieldEnd()
-
 
16284
    oprot.writeFieldStop()
-
 
16285
    oprot.writeStructEnd()
-
 
16286
 
-
 
16287
  def validate(self):
-
 
16288
    return
-
 
16289
 
-
 
16290
 
-
 
16291
  def __repr__(self):
-
 
16292
    L = ['%s=%r' % (key, value)
-
 
16293
      for key, value in self.__dict__.iteritems()]
-
 
16294
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
16295
 
-
 
16296
  def __eq__(self, other):
-
 
16297
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
16298
 
-
 
16299
  def __ne__(self, other):
-
 
16300
    return not (self == other)
-
 
16301
 
-
 
16302
class getCounterByUserId_result:
-
 
16303
  """
-
 
16304
  Attributes:
-
 
16305
   - success
-
 
16306
  """
-
 
16307
 
-
 
16308
  thrift_spec = (
-
 
16309
    (0, TType.STRUCT, 'success', (Counter, Counter.thrift_spec), None, ), # 0
-
 
16310
  )
-
 
16311
 
-
 
16312
  def __init__(self, success=None,):
-
 
16313
    self.success = success
-
 
16314
 
-
 
16315
  def read(self, iprot):
-
 
16316
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
16317
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
16318
      return
-
 
16319
    iprot.readStructBegin()
-
 
16320
    while True:
-
 
16321
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
16322
      if ftype == TType.STOP:
-
 
16323
        break
-
 
16324
      if fid == 0:
-
 
16325
        if ftype == TType.STRUCT:
-
 
16326
          self.success = Counter()
-
 
16327
          self.success.read(iprot)
-
 
16328
        else:
-
 
16329
          iprot.skip(ftype)
-
 
16330
      else:
-
 
16331
        iprot.skip(ftype)
-
 
16332
      iprot.readFieldEnd()
-
 
16333
    iprot.readStructEnd()
-
 
16334
 
-
 
16335
  def write(self, oprot):
-
 
16336
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
16337
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
16338
      return
-
 
16339
    oprot.writeStructBegin('getCounterByUserId_result')
-
 
16340
    if self.success is not None:
-
 
16341
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
-
 
16342
      self.success.write(oprot)
-
 
16343
      oprot.writeFieldEnd()
-
 
16344
    oprot.writeFieldStop()
-
 
16345
    oprot.writeStructEnd()
-
 
16346
 
-
 
16347
  def validate(self):
16179
    return
16348
    return
16180
 
16349
 
16181
 
16350
 
16182
  def __repr__(self):
16351
  def __repr__(self):
16183
    L = ['%s=%r' % (key, value)
16352
    L = ['%s=%r' % (key, value)