Subversion Repositories SmartDukaan

Rev

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

Rev 7738 Rev 7787
Line 199... Line 199...
199
     - cod
199
     - cod
200
     - awbs
200
     - awbs
201
    """
201
    """
202
    pass
202
    pass
203
 
203
 
204
  def getServiceableLocationAsPerProviderIdAndPincode(self, providerId, pincode):
204
  def runLogisticsLocationInfoUpdate(self, logisticsLocationInfoList, runCompleteUpdate):
205
    """
205
    """
206
    Returns true when record exist in the Serviceablelocationdetails DB Table otherwise return false.
-
 
207
 
-
 
208
    Parameters:
206
    Parameters:
209
     - providerId
207
     - logisticsLocationInfoList
210
     - pincode
208
     - runCompleteUpdate
211
    """
209
    """
212
    pass
210
    pass
213
 
211
 
214
  def runCompleteUpdateForPincode(self, ):
-
 
215
    pass
-
 
216
 
-
 
217
 
212
 
218
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
213
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
219
  def __init__(self, iprot, oprot=None):
214
  def __init__(self, iprot, oprot=None):
220
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
215
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
221
 
216
 
Line 876... Line 871...
876
    self._iprot.readMessageEnd()
871
    self._iprot.readMessageEnd()
877
    if result.success is not None:
872
    if result.success is not None:
878
      return result.success
873
      return result.success
879
    raise TApplicationException(TApplicationException.MISSING_RESULT, "addNewAwbs failed: unknown result");
874
    raise TApplicationException(TApplicationException.MISSING_RESULT, "addNewAwbs failed: unknown result");
880
 
875
 
881
  def getServiceableLocationAsPerProviderIdAndPincode(self, providerId, pincode):
876
  def runLogisticsLocationInfoUpdate(self, logisticsLocationInfoList, runCompleteUpdate):
882
    """
877
    """
883
    Returns true when record exist in the Serviceablelocationdetails DB Table otherwise return false.
-
 
884
 
-
 
885
    Parameters:
878
    Parameters:
886
     - providerId
879
     - logisticsLocationInfoList
887
     - pincode
880
     - runCompleteUpdate
888
    """
881
    """
889
    self.send_getServiceableLocationAsPerProviderIdAndPincode(providerId, pincode)
882
    self.send_runLogisticsLocationInfoUpdate(logisticsLocationInfoList, runCompleteUpdate)
890
    return self.recv_getServiceableLocationAsPerProviderIdAndPincode()
883
    self.recv_runLogisticsLocationInfoUpdate()
891
 
884
 
892
  def send_getServiceableLocationAsPerProviderIdAndPincode(self, providerId, pincode):
885
  def send_runLogisticsLocationInfoUpdate(self, logisticsLocationInfoList, runCompleteUpdate):
893
    self._oprot.writeMessageBegin('getServiceableLocationAsPerProviderIdAndPincode', TMessageType.CALL, self._seqid)
886
    self._oprot.writeMessageBegin('runLogisticsLocationInfoUpdate', TMessageType.CALL, self._seqid)
894
    args = getServiceableLocationAsPerProviderIdAndPincode_args()
887
    args = runLogisticsLocationInfoUpdate_args()
895
    args.providerId = providerId
888
    args.logisticsLocationInfoList = logisticsLocationInfoList
896
    args.pincode = pincode
889
    args.runCompleteUpdate = runCompleteUpdate
897
    args.write(self._oprot)
890
    args.write(self._oprot)
898
    self._oprot.writeMessageEnd()
891
    self._oprot.writeMessageEnd()
899
    self._oprot.trans.flush()
892
    self._oprot.trans.flush()
900
 
893
 
901
  def recv_getServiceableLocationAsPerProviderIdAndPincode(self, ):
894
  def recv_runLogisticsLocationInfoUpdate(self, ):
902
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
895
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
903
    if mtype == TMessageType.EXCEPTION:
896
    if mtype == TMessageType.EXCEPTION:
904
      x = TApplicationException()
897
      x = TApplicationException()
905
      x.read(self._iprot)
898
      x.read(self._iprot)
906
      self._iprot.readMessageEnd()
899
      self._iprot.readMessageEnd()
907
      raise x
900
      raise x
908
    result = getServiceableLocationAsPerProviderIdAndPincode_result()
-
 
909
    result.read(self._iprot)
-
 
910
    self._iprot.readMessageEnd()
-
 
911
    if result.success is not None:
-
 
912
      return result.success
-
 
913
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getServiceableLocationAsPerProviderIdAndPincode failed: unknown result");
-
 
914
 
-
 
915
  def runCompleteUpdateForPincode(self, ):
-
 
916
    self.send_runCompleteUpdateForPincode()
-
 
917
    self.recv_runCompleteUpdateForPincode()
-
 
918
 
-
 
919
  def send_runCompleteUpdateForPincode(self, ):
-
 
920
    self._oprot.writeMessageBegin('runCompleteUpdateForPincode', TMessageType.CALL, self._seqid)
-
 
921
    args = runCompleteUpdateForPincode_args()
-
 
922
    args.write(self._oprot)
-
 
923
    self._oprot.writeMessageEnd()
-
 
924
    self._oprot.trans.flush()
-
 
925
 
-
 
926
  def recv_runCompleteUpdateForPincode(self, ):
-
 
927
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
928
    if mtype == TMessageType.EXCEPTION:
-
 
929
      x = TApplicationException()
-
 
930
      x.read(self._iprot)
-
 
931
      self._iprot.readMessageEnd()
-
 
932
      raise x
-
 
933
    result = runCompleteUpdateForPincode_result()
901
    result = runLogisticsLocationInfoUpdate_result()
934
    result.read(self._iprot)
902
    result.read(self._iprot)
935
    self._iprot.readMessageEnd()
903
    self._iprot.readMessageEnd()
936
    return
904
    return
937
 
905
 
938
 
906
 
Line 956... Line 924...
956
    self._processMap["getPickupStore"] = Processor.process_getPickupStore
924
    self._processMap["getPickupStore"] = Processor.process_getPickupStore
957
    self._processMap["getPickupStoreByHotspotId"] = Processor.process_getPickupStoreByHotspotId
925
    self._processMap["getPickupStoreByHotspotId"] = Processor.process_getPickupStoreByHotspotId
958
    self._processMap["addPincode"] = Processor.process_addPincode
926
    self._processMap["addPincode"] = Processor.process_addPincode
959
    self._processMap["updatePincode"] = Processor.process_updatePincode
927
    self._processMap["updatePincode"] = Processor.process_updatePincode
960
    self._processMap["addNewAwbs"] = Processor.process_addNewAwbs
928
    self._processMap["addNewAwbs"] = Processor.process_addNewAwbs
961
    self._processMap["getServiceableLocationAsPerProviderIdAndPincode"] = Processor.process_getServiceableLocationAsPerProviderIdAndPincode
-
 
962
    self._processMap["runCompleteUpdateForPincode"] = Processor.process_runCompleteUpdateForPincode
929
    self._processMap["runLogisticsLocationInfoUpdate"] = Processor.process_runLogisticsLocationInfoUpdate
963
 
930
 
964
  def process(self, iprot, oprot):
931
  def process(self, iprot, oprot):
965
    (name, type, seqid) = iprot.readMessageBegin()
932
    (name, type, seqid) = iprot.readMessageBegin()
966
    if name not in self._processMap:
933
    if name not in self._processMap:
967
      iprot.skip(TType.STRUCT)
934
      iprot.skip(TType.STRUCT)
Line 1213... Line 1180...
1213
    oprot.writeMessageBegin("addNewAwbs", TMessageType.REPLY, seqid)
1180
    oprot.writeMessageBegin("addNewAwbs", TMessageType.REPLY, seqid)
1214
    result.write(oprot)
1181
    result.write(oprot)
1215
    oprot.writeMessageEnd()
1182
    oprot.writeMessageEnd()
1216
    oprot.trans.flush()
1183
    oprot.trans.flush()
1217
 
1184
 
1218
  def process_getServiceableLocationAsPerProviderIdAndPincode(self, seqid, iprot, oprot):
-
 
1219
    args = getServiceableLocationAsPerProviderIdAndPincode_args()
-
 
1220
    args.read(iprot)
-
 
1221
    iprot.readMessageEnd()
-
 
1222
    result = getServiceableLocationAsPerProviderIdAndPincode_result()
-
 
1223
    result.success = self._handler.getServiceableLocationAsPerProviderIdAndPincode(args.providerId, args.pincode)
-
 
1224
    oprot.writeMessageBegin("getServiceableLocationAsPerProviderIdAndPincode", TMessageType.REPLY, seqid)
-
 
1225
    result.write(oprot)
-
 
1226
    oprot.writeMessageEnd()
-
 
1227
    oprot.trans.flush()
-
 
1228
 
-
 
1229
  def process_runCompleteUpdateForPincode(self, seqid, iprot, oprot):
1185
  def process_runLogisticsLocationInfoUpdate(self, seqid, iprot, oprot):
1230
    args = runCompleteUpdateForPincode_args()
1186
    args = runLogisticsLocationInfoUpdate_args()
1231
    args.read(iprot)
1187
    args.read(iprot)
1232
    iprot.readMessageEnd()
1188
    iprot.readMessageEnd()
1233
    result = runCompleteUpdateForPincode_result()
1189
    result = runLogisticsLocationInfoUpdate_result()
1234
    self._handler.runCompleteUpdateForPincode()
1190
    self._handler.runLogisticsLocationInfoUpdate(args.logisticsLocationInfoList, args.runCompleteUpdate)
1235
    oprot.writeMessageBegin("runCompleteUpdateForPincode", TMessageType.REPLY, seqid)
1191
    oprot.writeMessageBegin("runLogisticsLocationInfoUpdate", TMessageType.REPLY, seqid)
1236
    result.write(oprot)
1192
    result.write(oprot)
1237
    oprot.writeMessageEnd()
1193
    oprot.writeMessageEnd()
1238
    oprot.trans.flush()
1194
    oprot.trans.flush()
1239
 
1195
 
1240
 
1196
 
Line 3913... Line 3869...
3913
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3869
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3914
 
3870
 
3915
  def __ne__(self, other):
3871
  def __ne__(self, other):
3916
    return not (self == other)
3872
    return not (self == other)
3917
 
3873
 
3918
class getServiceableLocationAsPerProviderIdAndPincode_args:
3874
class runLogisticsLocationInfoUpdate_args:
3919
  """
3875
  """
3920
  Attributes:
3876
  Attributes:
3921
   - providerId
3877
   - logisticsLocationInfoList
3922
   - pincode
3878
   - runCompleteUpdate
3923
  """
3879
  """
3924
 
3880
 
3925
  thrift_spec = (
3881
  thrift_spec = (
3926
    None, # 0
3882
    None, # 0
3927
    (1, TType.I64, 'providerId', None, None, ), # 1
3883
    (1, TType.LIST, 'logisticsLocationInfoList', (TType.STRUCT,(LogisticsLocationInfo, LogisticsLocationInfo.thrift_spec)), None, ), # 1
3928
    (2, TType.STRING, 'pincode', None, None, ), # 2
3884
    (2, TType.BOOL, 'runCompleteUpdate', None, None, ), # 2
3929
  )
3885
  )
3930
 
3886
 
3931
  def __init__(self, providerId=None, pincode=None,):
3887
  def __init__(self, logisticsLocationInfoList=None, runCompleteUpdate=None,):
3932
    self.providerId = providerId
3888
    self.logisticsLocationInfoList = logisticsLocationInfoList
3933
    self.pincode = pincode
3889
    self.runCompleteUpdate = runCompleteUpdate
3934
 
3890
 
3935
  def read(self, iprot):
3891
  def read(self, iprot):
3936
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3892
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3937
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3893
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3938
      return
3894
      return
Line 3940... Line 3896...
3940
    while True:
3896
    while True:
3941
      (fname, ftype, fid) = iprot.readFieldBegin()
3897
      (fname, ftype, fid) = iprot.readFieldBegin()
3942
      if ftype == TType.STOP:
3898
      if ftype == TType.STOP:
3943
        break
3899
        break
3944
      if fid == 1:
3900
      if fid == 1:
3945
        if ftype == TType.I64:
3901
        if ftype == TType.LIST:
-
 
3902
          self.logisticsLocationInfoList = []
3946
          self.providerId = iprot.readI64();
3903
          (_etype54, _size51) = iprot.readListBegin()
-
 
3904
          for _i55 in xrange(_size51):
-
 
3905
            _elem56 = LogisticsLocationInfo()
-
 
3906
            _elem56.read(iprot)
-
 
3907
            self.logisticsLocationInfoList.append(_elem56)
-
 
3908
          iprot.readListEnd()
3947
        else:
3909
        else:
3948
          iprot.skip(ftype)
3910
          iprot.skip(ftype)
3949
      elif fid == 2:
3911
      elif fid == 2:
3950
        if ftype == TType.STRING:
-
 
3951
          self.pincode = iprot.readString();
-
 
3952
        else:
-
 
3953
          iprot.skip(ftype)
-
 
3954
      else:
-
 
3955
        iprot.skip(ftype)
-
 
3956
      iprot.readFieldEnd()
-
 
3957
    iprot.readStructEnd()
-
 
3958
 
-
 
3959
  def write(self, oprot):
-
 
3960
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
3961
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
3962
      return
-
 
3963
    oprot.writeStructBegin('getServiceableLocationAsPerProviderIdAndPincode_args')
-
 
3964
    if self.providerId is not None:
-
 
3965
      oprot.writeFieldBegin('providerId', TType.I64, 1)
-
 
3966
      oprot.writeI64(self.providerId)
-
 
3967
      oprot.writeFieldEnd()
-
 
3968
    if self.pincode is not None:
-
 
3969
      oprot.writeFieldBegin('pincode', TType.STRING, 2)
-
 
3970
      oprot.writeString(self.pincode)
-
 
3971
      oprot.writeFieldEnd()
-
 
3972
    oprot.writeFieldStop()
-
 
3973
    oprot.writeStructEnd()
-
 
3974
 
-
 
3975
  def validate(self):
-
 
3976
    return
-
 
3977
 
-
 
3978
 
-
 
3979
  def __repr__(self):
-
 
3980
    L = ['%s=%r' % (key, value)
-
 
3981
      for key, value in self.__dict__.iteritems()]
-
 
3982
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
3983
 
-
 
3984
  def __eq__(self, other):
-
 
3985
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
3986
 
-
 
3987
  def __ne__(self, other):
-
 
3988
    return not (self == other)
-
 
3989
 
-
 
3990
class getServiceableLocationAsPerProviderIdAndPincode_result:
-
 
3991
  """
-
 
3992
  Attributes:
-
 
3993
   - success
-
 
3994
  """
-
 
3995
 
-
 
3996
  thrift_spec = (
-
 
3997
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
3998
  )
-
 
3999
 
-
 
4000
  def __init__(self, success=None,):
-
 
4001
    self.success = success
-
 
4002
 
-
 
4003
  def read(self, iprot):
-
 
4004
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
4005
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
4006
      return
-
 
4007
    iprot.readStructBegin()
-
 
4008
    while True:
-
 
4009
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
4010
      if ftype == TType.STOP:
-
 
4011
        break
-
 
4012
      if fid == 0:
-
 
4013
        if ftype == TType.BOOL:
3912
        if ftype == TType.BOOL:
4014
          self.success = iprot.readBool();
3913
          self.runCompleteUpdate = iprot.readBool();
4015
        else:
3914
        else:
4016
          iprot.skip(ftype)
3915
          iprot.skip(ftype)
4017
      else:
3916
      else:
4018
        iprot.skip(ftype)
3917
        iprot.skip(ftype)
4019
      iprot.readFieldEnd()
3918
      iprot.readFieldEnd()
Line 4021... Line 3920...
4021
 
3920
 
4022
  def write(self, oprot):
3921
  def write(self, oprot):
4023
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3922
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4024
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3923
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4025
      return
3924
      return
4026
    oprot.writeStructBegin('getServiceableLocationAsPerProviderIdAndPincode_result')
3925
    oprot.writeStructBegin('runLogisticsLocationInfoUpdate_args')
-
 
3926
    if self.logisticsLocationInfoList is not None:
-
 
3927
      oprot.writeFieldBegin('logisticsLocationInfoList', TType.LIST, 1)
-
 
3928
      oprot.writeListBegin(TType.STRUCT, len(self.logisticsLocationInfoList))
-
 
3929
      for iter57 in self.logisticsLocationInfoList:
-
 
3930
        iter57.write(oprot)
-
 
3931
      oprot.writeListEnd()
-
 
3932
      oprot.writeFieldEnd()
4027
    if self.success is not None:
3933
    if self.runCompleteUpdate is not None:
4028
      oprot.writeFieldBegin('success', TType.BOOL, 0)
3934
      oprot.writeFieldBegin('runCompleteUpdate', TType.BOOL, 2)
4029
      oprot.writeBool(self.success)
3935
      oprot.writeBool(self.runCompleteUpdate)
4030
      oprot.writeFieldEnd()
3936
      oprot.writeFieldEnd()
4031
    oprot.writeFieldStop()
3937
    oprot.writeFieldStop()
4032
    oprot.writeStructEnd()
3938
    oprot.writeStructEnd()
4033
 
3939
 
4034
  def validate(self):
3940
  def validate(self):
Line 4044... Line 3950...
4044
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3950
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4045
 
3951
 
4046
  def __ne__(self, other):
3952
  def __ne__(self, other):
4047
    return not (self == other)
3953
    return not (self == other)
4048
 
3954
 
4049
class runCompleteUpdateForPincode_args:
-
 
4050
 
-
 
4051
  thrift_spec = (
-
 
4052
  )
-
 
4053
 
-
 
4054
  def read(self, iprot):
-
 
4055
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
4056
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
4057
      return
-
 
4058
    iprot.readStructBegin()
-
 
4059
    while True:
-
 
4060
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
4061
      if ftype == TType.STOP:
-
 
4062
        break
-
 
4063
      else:
-
 
4064
        iprot.skip(ftype)
-
 
4065
      iprot.readFieldEnd()
-
 
4066
    iprot.readStructEnd()
-
 
4067
 
-
 
4068
  def write(self, oprot):
-
 
4069
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
4070
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
4071
      return
-
 
4072
    oprot.writeStructBegin('runCompleteUpdateForPincode_args')
-
 
4073
    oprot.writeFieldStop()
-
 
4074
    oprot.writeStructEnd()
-
 
4075
 
-
 
4076
  def validate(self):
-
 
4077
    return
-
 
4078
 
-
 
4079
 
-
 
4080
  def __repr__(self):
-
 
4081
    L = ['%s=%r' % (key, value)
-
 
4082
      for key, value in self.__dict__.iteritems()]
-
 
4083
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
4084
 
-
 
4085
  def __eq__(self, other):
-
 
4086
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
4087
 
-
 
4088
  def __ne__(self, other):
-
 
4089
    return not (self == other)
-
 
4090
 
-
 
4091
class runCompleteUpdateForPincode_result:
3955
class runLogisticsLocationInfoUpdate_result:
4092
 
3956
 
4093
  thrift_spec = (
3957
  thrift_spec = (
4094
  )
3958
  )
4095
 
3959
 
4096
  def read(self, iprot):
3960
  def read(self, iprot):
Line 4109... Line 3973...
4109
 
3973
 
4110
  def write(self, oprot):
3974
  def write(self, oprot):
4111
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3975
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4112
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3976
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4113
      return
3977
      return
4114
    oprot.writeStructBegin('runCompleteUpdateForPincode_result')
3978
    oprot.writeStructBegin('runLogisticsLocationInfoUpdate_result')
4115
    oprot.writeFieldStop()
3979
    oprot.writeFieldStop()
4116
    oprot.writeStructEnd()
3980
    oprot.writeStructEnd()
4117
 
3981
 
4118
  def validate(self):
3982
  def validate(self):
4119
    return
3983
    return