Ejemplo n.º 1
0
 def post(self):
     id = self.get_argument('id')
     print "id=", id
     orderService = OrderService.OrderInfoService()
     orderInfo = orderService.find_by_id(id)
     result = json.dumps(orderInfo)
     self.write(result)
Ejemplo n.º 2
0
 def post(self):
     key = self.get_argument('key')
     value = self.get_argument('value')
     print "key=", key, ", value=", value
     orderService = OrderService.OrderInfoService()
     result = orderService.find_by_params(key, value)
     # result = json.dumps(orderInfo, default= OridinaryViewObject.encode_json_bean)
     self.write(result.__str__())
Ejemplo n.º 3
0
 def post(self):
     orderEnum = OrderEnum.EXCEPTION
     id = self.get_argument('id')
     key = self.get_argument('key')
     value = self.get_argument('value')
     print "key=", key, ", value=", value
     orderService = OrderService.OrderInfoService()
     orderEnum = orderService.update_by_id(id, key, value)
     self.write(orderEnum.__str__())
Ejemplo n.º 4
0
 def post(self):
     orderEnum = OrderEnum.EXCEPTION
     id = self.get_argument('id')
     name = self.get_argument('name')
     age = self.get_argument('age')
     version = self.get_argument('version', 0)
     create_time = datetime.datetime.now()
     update_time = datetime.datetime.now()
     source = self.request.headers['source']
     print "id=", id, " ,name=", name, " ,create_time=", create_time, " ,update_time=", update_time, " ,version=", version, " ,source=", source
     orderService = OrderService.OrderInfoService()
     orderEnum = orderService.insertObj(id, name, age, create_time,
                                        update_time, version)
     self.write(orderEnum.__str__())
Ejemplo n.º 5
0
 def post(self):
     orderEnum = OrderEnum.EXCEPTION
     encode_json = self.request.body
     print 'encode_json ', encode_json
     dictOrder = json.loads(encode_json)
     id = dictOrder['id']
     name = dictOrder['name']
     age = dictOrder['age']
     version = dictOrder['version']
     create_time = datetime.datetime.now()
     update_time = datetime.datetime.now()
     source = self.request.headers['source']
     print "id=", id, " ,name=", name, " ,create_time=", create_time, " ,update_time=", update_time, " ,version=", version, " ,source=", source
     orderService = OrderService.OrderInfoService()
     orderEnum = orderService.insertObj(id, name, age, create_time,
                                        update_time, version)
     self.write(orderEnum.__str__())
Ejemplo n.º 6
0
 def post(self):
     orderService = OrderService.OrderInfoService()
     result = orderService.find_by_all()
     # result = simplejson.dumps(orderInfo, default= OridinaryViewObject.encode_json_bean)
     # result = simplejson.dumps(orderInfo)
     self.write(result.__str__())