Subversion Repositories SmartDukaan

Rev

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

Rev 2981 Rev 3376
Line 3... Line 3...
3
#
3
#
4
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
4
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
#
5
#
6
 
6
 
7
from thrift.Thrift import *
7
from thrift.Thrift import *
-
 
8
import shop2020.thriftpy.generic.GenericService
8
from ttypes import *
9
from ttypes import *
9
from thrift.Thrift import TProcessor
10
from thrift.Thrift import TProcessor
10
from thrift.transport import TTransport
11
from thrift.transport import TTransport
11
from thrift.protocol import TBinaryProtocol
12
from thrift.protocol import TBinaryProtocol
12
try:
13
try:
13
  from thrift.protocol import fastbinary
14
  from thrift.protocol import fastbinary
14
except:
15
except:
15
  fastbinary = None
16
  fastbinary = None
16
 
17
 
17
 
18
 
18
class Iface:
19
class Iface(shop2020.thriftpy.generic.GenericService.Iface):
19
  """
20
  """
20
  Promotion Service
21
  Promotion Service
21
  """
22
  """
22
  def closeSession(self, ):
23
  def closeSession(self, ):
23
    """
24
    """
Line 77... Line 78...
77
     - userId
78
     - userId
78
    """
79
    """
79
    pass
80
    pass
80
 
81
 
81
 
82
 
82
class Client(Iface):
83
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
83
  """
84
  """
84
  Promotion Service
85
  Promotion Service
85
  """
86
  """
86
  def __init__(self, iprot, oprot=None):
87
  def __init__(self, iprot, oprot=None):
87
    self._iprot = self._oprot = iprot
88
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
88
    if oprot != None:
-
 
89
      self._oprot = oprot
-
 
90
    self._seqid = 0
-
 
91
 
89
 
92
  def closeSession(self, ):
90
  def closeSession(self, ):
93
    """
91
    """
94
    For closing the open session in sqlalchemy
92
    For closing the open session in sqlalchemy
95
    """
93
    """
Line 343... Line 341...
343
    if result.pex != None:
341
    if result.pex != None:
344
      raise result.pex
342
      raise result.pex
345
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getCouponUsageCountByUser failed: unknown result");
343
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getCouponUsageCountByUser failed: unknown result");
346
 
344
 
347
 
345
 
348
class Processor(Iface, TProcessor):
346
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
349
  def __init__(self, handler):
347
  def __init__(self, handler):
350
    self._handler = handler
348
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
351
    self._processMap = {}
-
 
352
    self._processMap["closeSession"] = Processor.process_closeSession
349
    self._processMap["closeSession"] = Processor.process_closeSession
353
    self._processMap["createPromotion"] = Processor.process_createPromotion
350
    self._processMap["createPromotion"] = Processor.process_createPromotion
354
    self._processMap["getAllPromotions"] = Processor.process_getAllPromotions
351
    self._processMap["getAllPromotions"] = Processor.process_getAllPromotions
355
    self._processMap["getPromotionById"] = Processor.process_getPromotionById
352
    self._processMap["getPromotionById"] = Processor.process_getPromotionById
356
    self._processMap["generateCouponsForPromotion"] = Processor.process_generateCouponsForPromotion
353
    self._processMap["generateCouponsForPromotion"] = Processor.process_generateCouponsForPromotion