Subversion Repositories SmartDukaan

Rev

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

Rev 11645 Rev 11653
Line 1159... Line 1159...
1159
     - offset
1159
     - offset
1160
     - limit
1160
     - limit
1161
    """
1161
    """
1162
    pass
1162
    pass
1163
 
1163
 
1164
  def getAllActivePrivateDeals(self, ):
1164
  def getAllActivePrivateDeals(self, itemIds, daysDelta):
-
 
1165
    """
-
 
1166
    Parameters:
-
 
1167
     - itemIds
-
 
1168
     - daysDelta
-
 
1169
    """
1165
    pass
1170
    pass
1166
 
1171
 
1167
  def addOrUpdatePrivateDeal(self, privateDeal):
1172
  def addOrUpdatePrivateDeal(self, privateDeal):
1168
    """
1173
    """
1169
    Parameters:
1174
    Parameters:
Line 6123... Line 6128...
6123
    self._iprot.readMessageEnd()
6128
    self._iprot.readMessageEnd()
6124
    if result.success is not None:
6129
    if result.success is not None:
6125
      return result.success
6130
      return result.success
6126
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPrivateDealItems failed: unknown result");
6131
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPrivateDealItems failed: unknown result");
6127
 
6132
 
6128
  def getAllActivePrivateDeals(self, ):
6133
  def getAllActivePrivateDeals(self, itemIds, daysDelta):
-
 
6134
    """
-
 
6135
    Parameters:
-
 
6136
     - itemIds
-
 
6137
     - daysDelta
-
 
6138
    """
6129
    self.send_getAllActivePrivateDeals()
6139
    self.send_getAllActivePrivateDeals(itemIds, daysDelta)
6130
    return self.recv_getAllActivePrivateDeals()
6140
    return self.recv_getAllActivePrivateDeals()
6131
 
6141
 
6132
  def send_getAllActivePrivateDeals(self, ):
6142
  def send_getAllActivePrivateDeals(self, itemIds, daysDelta):
6133
    self._oprot.writeMessageBegin('getAllActivePrivateDeals', TMessageType.CALL, self._seqid)
6143
    self._oprot.writeMessageBegin('getAllActivePrivateDeals', TMessageType.CALL, self._seqid)
6134
    args = getAllActivePrivateDeals_args()
6144
    args = getAllActivePrivateDeals_args()
-
 
6145
    args.itemIds = itemIds
-
 
6146
    args.daysDelta = daysDelta
6135
    args.write(self._oprot)
6147
    args.write(self._oprot)
6136
    self._oprot.writeMessageEnd()
6148
    self._oprot.writeMessageEnd()
6137
    self._oprot.trans.flush()
6149
    self._oprot.trans.flush()
6138
 
6150
 
6139
  def recv_getAllActivePrivateDeals(self, ):
6151
  def recv_getAllActivePrivateDeals(self, ):
Line 8327... Line 8339...
8327
  def process_getAllActivePrivateDeals(self, seqid, iprot, oprot):
8339
  def process_getAllActivePrivateDeals(self, seqid, iprot, oprot):
8328
    args = getAllActivePrivateDeals_args()
8340
    args = getAllActivePrivateDeals_args()
8329
    args.read(iprot)
8341
    args.read(iprot)
8330
    iprot.readMessageEnd()
8342
    iprot.readMessageEnd()
8331
    result = getAllActivePrivateDeals_result()
8343
    result = getAllActivePrivateDeals_result()
8332
    result.success = self._handler.getAllActivePrivateDeals()
8344
    result.success = self._handler.getAllActivePrivateDeals(args.itemIds, args.daysDelta)
8333
    oprot.writeMessageBegin("getAllActivePrivateDeals", TMessageType.REPLY, seqid)
8345
    oprot.writeMessageBegin("getAllActivePrivateDeals", TMessageType.REPLY, seqid)
8334
    result.write(oprot)
8346
    result.write(oprot)
8335
    oprot.writeMessageEnd()
8347
    oprot.writeMessageEnd()
8336
    oprot.trans.flush()
8348
    oprot.trans.flush()
8337
 
8349
 
Line 28888... Line 28900...
28888
 
28900
 
28889
  def __ne__(self, other):
28901
  def __ne__(self, other):
28890
    return not (self == other)
28902
    return not (self == other)
28891
 
28903
 
28892
class getAllActivePrivateDeals_args:
28904
class getAllActivePrivateDeals_args:
-
 
28905
  """
-
 
28906
  Attributes:
-
 
28907
   - itemIds
-
 
28908
   - daysDelta
-
 
28909
  """
28893
 
28910
 
28894
  thrift_spec = (
28911
  thrift_spec = (
-
 
28912
    None, # 0
-
 
28913
    (1, TType.LIST, 'itemIds', (TType.I64,None), None, ), # 1
-
 
28914
    (2, TType.I64, 'daysDelta', None, None, ), # 2
28895
  )
28915
  )
28896
 
28916
 
-
 
28917
  def __init__(self, itemIds=None, daysDelta=None,):
-
 
28918
    self.itemIds = itemIds
-
 
28919
    self.daysDelta = daysDelta
-
 
28920
 
28897
  def read(self, iprot):
28921
  def read(self, iprot):
28898
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
28922
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
28899
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
28923
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
28900
      return
28924
      return
28901
    iprot.readStructBegin()
28925
    iprot.readStructBegin()
28902
    while True:
28926
    while True:
28903
      (fname, ftype, fid) = iprot.readFieldBegin()
28927
      (fname, ftype, fid) = iprot.readFieldBegin()
28904
      if ftype == TType.STOP:
28928
      if ftype == TType.STOP:
28905
        break
28929
        break
-
 
28930
      if fid == 1:
-
 
28931
        if ftype == TType.LIST:
-
 
28932
          self.itemIds = []
-
 
28933
          (_etype658, _size655) = iprot.readListBegin()
-
 
28934
          for _i659 in xrange(_size655):
-
 
28935
            _elem660 = iprot.readI64();
-
 
28936
            self.itemIds.append(_elem660)
-
 
28937
          iprot.readListEnd()
-
 
28938
        else:
-
 
28939
          iprot.skip(ftype)
-
 
28940
      elif fid == 2:
-
 
28941
        if ftype == TType.I64:
-
 
28942
          self.daysDelta = iprot.readI64();
-
 
28943
        else:
-
 
28944
          iprot.skip(ftype)
28906
      else:
28945
      else:
28907
        iprot.skip(ftype)
28946
        iprot.skip(ftype)
28908
      iprot.readFieldEnd()
28947
      iprot.readFieldEnd()
28909
    iprot.readStructEnd()
28948
    iprot.readStructEnd()
28910
 
28949
 
28911
  def write(self, oprot):
28950
  def write(self, oprot):
28912
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
28951
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
28913
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
28952
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
28914
      return
28953
      return
28915
    oprot.writeStructBegin('getAllActivePrivateDeals_args')
28954
    oprot.writeStructBegin('getAllActivePrivateDeals_args')
-
 
28955
    if self.itemIds is not None:
-
 
28956
      oprot.writeFieldBegin('itemIds', TType.LIST, 1)
-
 
28957
      oprot.writeListBegin(TType.I64, len(self.itemIds))
-
 
28958
      for iter661 in self.itemIds:
-
 
28959
        oprot.writeI64(iter661)
-
 
28960
      oprot.writeListEnd()
-
 
28961
      oprot.writeFieldEnd()
-
 
28962
    if self.daysDelta is not None:
-
 
28963
      oprot.writeFieldBegin('daysDelta', TType.I64, 2)
-
 
28964
      oprot.writeI64(self.daysDelta)
-
 
28965
      oprot.writeFieldEnd()
28916
    oprot.writeFieldStop()
28966
    oprot.writeFieldStop()
28917
    oprot.writeStructEnd()
28967
    oprot.writeStructEnd()
28918
 
28968
 
28919
  def validate(self):
28969
  def validate(self):
28920
    return
28970
    return
Line 28954... Line 29004...
28954
      if ftype == TType.STOP:
29004
      if ftype == TType.STOP:
28955
        break
29005
        break
28956
      if fid == 0:
29006
      if fid == 0:
28957
        if ftype == TType.MAP:
29007
        if ftype == TType.MAP:
28958
          self.success = {}
29008
          self.success = {}
28959
          (_ktype656, _vtype657, _size655 ) = iprot.readMapBegin() 
29009
          (_ktype663, _vtype664, _size662 ) = iprot.readMapBegin() 
28960
          for _i659 in xrange(_size655):
29010
          for _i666 in xrange(_size662):
28961
            _key660 = iprot.readI64();
29011
            _key667 = iprot.readI64();
28962
            _val661 = PrivateDeal()
29012
            _val668 = PrivateDeal()
28963
            _val661.read(iprot)
29013
            _val668.read(iprot)
28964
            self.success[_key660] = _val661
29014
            self.success[_key667] = _val668
28965
          iprot.readMapEnd()
29015
          iprot.readMapEnd()
28966
        else:
29016
        else:
28967
          iprot.skip(ftype)
29017
          iprot.skip(ftype)
28968
      else:
29018
      else:
28969
        iprot.skip(ftype)
29019
        iprot.skip(ftype)
Line 28976... Line 29026...
28976
      return
29026
      return
28977
    oprot.writeStructBegin('getAllActivePrivateDeals_result')
29027
    oprot.writeStructBegin('getAllActivePrivateDeals_result')
28978
    if self.success is not None:
29028
    if self.success is not None:
28979
      oprot.writeFieldBegin('success', TType.MAP, 0)
29029
      oprot.writeFieldBegin('success', TType.MAP, 0)
28980
      oprot.writeMapBegin(TType.I64, TType.STRUCT, len(self.success))
29030
      oprot.writeMapBegin(TType.I64, TType.STRUCT, len(self.success))
28981
      for kiter662,viter663 in self.success.items():
29031
      for kiter669,viter670 in self.success.items():
28982
        oprot.writeI64(kiter662)
29032
        oprot.writeI64(kiter669)
28983
        viter663.write(oprot)
29033
        viter670.write(oprot)
28984
      oprot.writeMapEnd()
29034
      oprot.writeMapEnd()
28985
      oprot.writeFieldEnd()
29035
      oprot.writeFieldEnd()
28986
    oprot.writeFieldStop()
29036
    oprot.writeFieldStop()
28987
    oprot.writeStructEnd()
29037
    oprot.writeStructEnd()
28988
 
29038
 
Line 29219... Line 29269...
29219
      if ftype == TType.STOP:
29269
      if ftype == TType.STOP:
29220
        break
29270
        break
29221
      if fid == 0:
29271
      if fid == 0:
29222
        if ftype == TType.LIST:
29272
        if ftype == TType.LIST:
29223
          self.success = []
29273
          self.success = []
29224
          (_etype667, _size664) = iprot.readListBegin()
29274
          (_etype674, _size671) = iprot.readListBegin()
29225
          for _i668 in xrange(_size664):
29275
          for _i675 in xrange(_size671):
29226
            _elem669 = iprot.readI64();
29276
            _elem676 = iprot.readI64();
29227
            self.success.append(_elem669)
29277
            self.success.append(_elem676)
29228
          iprot.readListEnd()
29278
          iprot.readListEnd()
29229
        else:
29279
        else:
29230
          iprot.skip(ftype)
29280
          iprot.skip(ftype)
29231
      elif fid == 1:
29281
      elif fid == 1:
29232
        if ftype == TType.STRUCT:
29282
        if ftype == TType.STRUCT:
Line 29245... Line 29295...
29245
      return
29295
      return
29246
    oprot.writeStructBegin('getPrivateDealsCatalogIds_result')
29296
    oprot.writeStructBegin('getPrivateDealsCatalogIds_result')
29247
    if self.success is not None:
29297
    if self.success is not None:
29248
      oprot.writeFieldBegin('success', TType.LIST, 0)
29298
      oprot.writeFieldBegin('success', TType.LIST, 0)
29249
      oprot.writeListBegin(TType.I64, len(self.success))
29299
      oprot.writeListBegin(TType.I64, len(self.success))
29250
      for iter670 in self.success:
29300
      for iter677 in self.success:
29251
        oprot.writeI64(iter670)
29301
        oprot.writeI64(iter677)
29252
      oprot.writeListEnd()
29302
      oprot.writeListEnd()
29253
      oprot.writeFieldEnd()
29303
      oprot.writeFieldEnd()
29254
    if self.cex is not None:
29304
    if self.cex is not None:
29255
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
29305
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
29256
      self.cex.write(oprot)
29306
      self.cex.write(oprot)