Subversion Repositories SmartDukaan

Rev

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

Rev 7393 Rev 7427
Line 1711... Line 1711...
1711
     - cashRefundAmount
1711
     - cashRefundAmount
1712
     - cardRefundAmount
1712
     - cardRefundAmount
1713
    """
1713
    """
1714
    pass
1714
    pass
1715
 
1715
 
-
 
1716
  def getCollectionsForStore(self, storeId, startDate, endDate):
-
 
1717
    """
-
 
1718
    Parameters:
-
 
1719
     - storeId
-
 
1720
     - startDate
-
 
1721
     - endDate
-
 
1722
    """
-
 
1723
    pass
-
 
1724
 
1716
 
1725
 
1717
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1726
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1718
  def __init__(self, iprot, oprot=None):
1727
  def __init__(self, iprot, oprot=None):
1719
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1728
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1720
 
1729
 
Line 7918... Line 7927...
7918
    self._iprot.readMessageEnd()
7927
    self._iprot.readMessageEnd()
7919
    if result.success is not None:
7928
    if result.success is not None:
7920
      return result.success
7929
      return result.success
7921
    raise TApplicationException(TApplicationException.MISSING_RESULT, "saveRefundAmountsForStoreOrder failed: unknown result");
7930
    raise TApplicationException(TApplicationException.MISSING_RESULT, "saveRefundAmountsForStoreOrder failed: unknown result");
7922
 
7931
 
-
 
7932
  def getCollectionsForStore(self, storeId, startDate, endDate):
-
 
7933
    """
-
 
7934
    Parameters:
-
 
7935
     - storeId
-
 
7936
     - startDate
-
 
7937
     - endDate
-
 
7938
    """
-
 
7939
    self.send_getCollectionsForStore(storeId, startDate, endDate)
-
 
7940
    return self.recv_getCollectionsForStore()
-
 
7941
 
-
 
7942
  def send_getCollectionsForStore(self, storeId, startDate, endDate):
-
 
7943
    self._oprot.writeMessageBegin('getCollectionsForStore', TMessageType.CALL, self._seqid)
-
 
7944
    args = getCollectionsForStore_args()
-
 
7945
    args.storeId = storeId
-
 
7946
    args.startDate = startDate
-
 
7947
    args.endDate = endDate
-
 
7948
    args.write(self._oprot)
-
 
7949
    self._oprot.writeMessageEnd()
-
 
7950
    self._oprot.trans.flush()
-
 
7951
 
-
 
7952
  def recv_getCollectionsForStore(self, ):
-
 
7953
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
7954
    if mtype == TMessageType.EXCEPTION:
-
 
7955
      x = TApplicationException()
-
 
7956
      x.read(self._iprot)
-
 
7957
      self._iprot.readMessageEnd()
-
 
7958
      raise x
-
 
7959
    result = getCollectionsForStore_result()
-
 
7960
    result.read(self._iprot)
-
 
7961
    self._iprot.readMessageEnd()
-
 
7962
    if result.success is not None:
-
 
7963
      return result.success
-
 
7964
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getCollectionsForStore failed: unknown result");
-
 
7965
 
7923
 
7966
 
7924
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
7967
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
7925
  def __init__(self, handler):
7968
  def __init__(self, handler):
7926
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
7969
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
7927
    self._processMap["createTransaction"] = Processor.process_createTransaction
7970
    self._processMap["createTransaction"] = Processor.process_createTransaction
Line 8105... Line 8148...
8105
    self._processMap["addSeries"] = Processor.process_addSeries
8148
    self._processMap["addSeries"] = Processor.process_addSeries
8106
    self._processMap["saveStoreOrderDetail"] = Processor.process_saveStoreOrderDetail
8149
    self._processMap["saveStoreOrderDetail"] = Processor.process_saveStoreOrderDetail
8107
    self._processMap["getStoreOrderDetail"] = Processor.process_getStoreOrderDetail
8150
    self._processMap["getStoreOrderDetail"] = Processor.process_getStoreOrderDetail
8108
    self._processMap["getAllEdcBanks"] = Processor.process_getAllEdcBanks
8151
    self._processMap["getAllEdcBanks"] = Processor.process_getAllEdcBanks
8109
    self._processMap["saveRefundAmountsForStoreOrder"] = Processor.process_saveRefundAmountsForStoreOrder
8152
    self._processMap["saveRefundAmountsForStoreOrder"] = Processor.process_saveRefundAmountsForStoreOrder
-
 
8153
    self._processMap["getCollectionsForStore"] = Processor.process_getCollectionsForStore
8110
 
8154
 
8111
  def process(self, iprot, oprot):
8155
  def process(self, iprot, oprot):
8112
    (name, type, seqid) = iprot.readMessageBegin()
8156
    (name, type, seqid) = iprot.readMessageBegin()
8113
    if name not in self._processMap:
8157
    if name not in self._processMap:
8114
      iprot.skip(TType.STRUCT)
8158
      iprot.skip(TType.STRUCT)
Line 10428... Line 10472...
10428
    oprot.writeMessageBegin("saveRefundAmountsForStoreOrder", TMessageType.REPLY, seqid)
10472
    oprot.writeMessageBegin("saveRefundAmountsForStoreOrder", TMessageType.REPLY, seqid)
10429
    result.write(oprot)
10473
    result.write(oprot)
10430
    oprot.writeMessageEnd()
10474
    oprot.writeMessageEnd()
10431
    oprot.trans.flush()
10475
    oprot.trans.flush()
10432
 
10476
 
-
 
10477
  def process_getCollectionsForStore(self, seqid, iprot, oprot):
-
 
10478
    args = getCollectionsForStore_args()
-
 
10479
    args.read(iprot)
-
 
10480
    iprot.readMessageEnd()
-
 
10481
    result = getCollectionsForStore_result()
-
 
10482
    result.success = self._handler.getCollectionsForStore(args.storeId, args.startDate, args.endDate)
-
 
10483
    oprot.writeMessageBegin("getCollectionsForStore", TMessageType.REPLY, seqid)
-
 
10484
    result.write(oprot)
-
 
10485
    oprot.writeMessageEnd()
-
 
10486
    oprot.trans.flush()
-
 
10487
 
10433
 
10488
 
10434
# HELPER FUNCTIONS AND STRUCTURES
10489
# HELPER FUNCTIONS AND STRUCTURES
10435
 
10490
 
10436
class createTransaction_args:
10491
class createTransaction_args:
10437
  """
10492
  """
Line 35899... Line 35954...
35899
      oprot.writeFieldEnd()
35954
      oprot.writeFieldEnd()
35900
    oprot.writeFieldStop()
35955
    oprot.writeFieldStop()
35901
    oprot.writeStructEnd()
35956
    oprot.writeStructEnd()
35902
 
35957
 
35903
  def validate(self):
35958
  def validate(self):
-
 
35959
    return
-
 
35960
 
-
 
35961
 
-
 
35962
  def __repr__(self):
-
 
35963
    L = ['%s=%r' % (key, value)
-
 
35964
      for key, value in self.__dict__.iteritems()]
-
 
35965
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
35966
 
-
 
35967
  def __eq__(self, other):
-
 
35968
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
35969
 
-
 
35970
  def __ne__(self, other):
-
 
35971
    return not (self == other)
-
 
35972
 
-
 
35973
class getCollectionsForStore_args:
-
 
35974
  """
-
 
35975
  Attributes:
-
 
35976
   - storeId
-
 
35977
   - startDate
-
 
35978
   - endDate
-
 
35979
  """
-
 
35980
 
-
 
35981
  thrift_spec = (
-
 
35982
    None, # 0
-
 
35983
    (1, TType.I64, 'storeId', None, None, ), # 1
-
 
35984
    (2, TType.I64, 'startDate', None, None, ), # 2
-
 
35985
    (3, TType.I64, 'endDate', None, None, ), # 3
-
 
35986
  )
-
 
35987
 
-
 
35988
  def __init__(self, storeId=None, startDate=None, endDate=None,):
-
 
35989
    self.storeId = storeId
-
 
35990
    self.startDate = startDate
-
 
35991
    self.endDate = endDate
-
 
35992
 
-
 
35993
  def read(self, iprot):
-
 
35994
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
35995
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
35996
      return
-
 
35997
    iprot.readStructBegin()
-
 
35998
    while True:
-
 
35999
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
36000
      if ftype == TType.STOP:
-
 
36001
        break
-
 
36002
      if fid == 1:
-
 
36003
        if ftype == TType.I64:
-
 
36004
          self.storeId = iprot.readI64();
-
 
36005
        else:
-
 
36006
          iprot.skip(ftype)
-
 
36007
      elif fid == 2:
-
 
36008
        if ftype == TType.I64:
-
 
36009
          self.startDate = iprot.readI64();
-
 
36010
        else:
-
 
36011
          iprot.skip(ftype)
-
 
36012
      elif fid == 3:
-
 
36013
        if ftype == TType.I64:
-
 
36014
          self.endDate = iprot.readI64();
-
 
36015
        else:
-
 
36016
          iprot.skip(ftype)
-
 
36017
      else:
-
 
36018
        iprot.skip(ftype)
-
 
36019
      iprot.readFieldEnd()
-
 
36020
    iprot.readStructEnd()
-
 
36021
 
-
 
36022
  def write(self, oprot):
-
 
36023
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
36024
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
36025
      return
-
 
36026
    oprot.writeStructBegin('getCollectionsForStore_args')
-
 
36027
    if self.storeId is not None:
-
 
36028
      oprot.writeFieldBegin('storeId', TType.I64, 1)
-
 
36029
      oprot.writeI64(self.storeId)
-
 
36030
      oprot.writeFieldEnd()
-
 
36031
    if self.startDate is not None:
-
 
36032
      oprot.writeFieldBegin('startDate', TType.I64, 2)
-
 
36033
      oprot.writeI64(self.startDate)
-
 
36034
      oprot.writeFieldEnd()
-
 
36035
    if self.endDate is not None:
-
 
36036
      oprot.writeFieldBegin('endDate', TType.I64, 3)
-
 
36037
      oprot.writeI64(self.endDate)
-
 
36038
      oprot.writeFieldEnd()
-
 
36039
    oprot.writeFieldStop()
-
 
36040
    oprot.writeStructEnd()
-
 
36041
 
-
 
36042
  def validate(self):
-
 
36043
    return
-
 
36044
 
-
 
36045
 
-
 
36046
  def __repr__(self):
-
 
36047
    L = ['%s=%r' % (key, value)
-
 
36048
      for key, value in self.__dict__.iteritems()]
-
 
36049
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
36050
 
-
 
36051
  def __eq__(self, other):
-
 
36052
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
36053
 
-
 
36054
  def __ne__(self, other):
-
 
36055
    return not (self == other)
-
 
36056
 
-
 
36057
class getCollectionsForStore_result:
-
 
36058
  """
-
 
36059
  Attributes:
-
 
36060
   - success
-
 
36061
  """
-
 
36062
 
-
 
36063
  thrift_spec = (
-
 
36064
    (0, TType.LIST, 'success', (TType.STRUCT,(StoreOrderCollection, StoreOrderCollection.thrift_spec)), None, ), # 0
-
 
36065
  )
-
 
36066
 
-
 
36067
  def __init__(self, success=None,):
-
 
36068
    self.success = success
-
 
36069
 
-
 
36070
  def read(self, iprot):
-
 
36071
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
36072
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
36073
      return
-
 
36074
    iprot.readStructBegin()
-
 
36075
    while True:
-
 
36076
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
36077
      if ftype == TType.STOP:
-
 
36078
        break
-
 
36079
      if fid == 0:
-
 
36080
        if ftype == TType.LIST:
-
 
36081
          self.success = []
-
 
36082
          (_etype817, _size814) = iprot.readListBegin()
-
 
36083
          for _i818 in xrange(_size814):
-
 
36084
            _elem819 = StoreOrderCollection()
-
 
36085
            _elem819.read(iprot)
-
 
36086
            self.success.append(_elem819)
-
 
36087
          iprot.readListEnd()
-
 
36088
        else:
-
 
36089
          iprot.skip(ftype)
-
 
36090
      else:
-
 
36091
        iprot.skip(ftype)
-
 
36092
      iprot.readFieldEnd()
-
 
36093
    iprot.readStructEnd()
-
 
36094
 
-
 
36095
  def write(self, oprot):
-
 
36096
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
36097
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
36098
      return
-
 
36099
    oprot.writeStructBegin('getCollectionsForStore_result')
-
 
36100
    if self.success is not None:
-
 
36101
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
36102
      oprot.writeListBegin(TType.STRUCT, len(self.success))
-
 
36103
      for iter820 in self.success:
-
 
36104
        iter820.write(oprot)
-
 
36105
      oprot.writeListEnd()
-
 
36106
      oprot.writeFieldEnd()
-
 
36107
    oprot.writeFieldStop()
-
 
36108
    oprot.writeStructEnd()
-
 
36109
 
-
 
36110
  def validate(self):
35904
    return
36111
    return
35905
 
36112
 
35906
 
36113
 
35907
  def __repr__(self):
36114
  def __repr__(self):
35908
    L = ['%s=%r' % (key, value)
36115
    L = ['%s=%r' % (key, value)