| Line 4... |
Line 4... |
| 4 |
from bson import json_util
|
4 |
from bson import json_util
|
| 5 |
import sys
|
5 |
import sys
|
| 6 |
sys.path.insert(0, '/usr/local/lib/python2.6/dist-packages/falcon-0.2.0b2-py2.6.egg/')
|
6 |
sys.path.insert(0, '/usr/local/lib/python2.6/dist-packages/falcon-0.2.0b2-py2.6.egg/')
|
| 7 |
sys.path.insert(0, '/usr/local/lib/python2.6/dist-packages/six-1.9.0-py2.6.egg/')
|
7 |
sys.path.insert(0, '/usr/local/lib/python2.6/dist-packages/six-1.9.0-py2.6.egg/')
|
| 8 |
sys.path.insert(0, '/usr/local/lib/python2.6/dist-packages/python_mimeparse-0.1.4-py2.6.egg/')
|
8 |
sys.path.insert(0, '/usr/local/lib/python2.6/dist-packages/python_mimeparse-0.1.4-py2.6.egg/')
|
| 9 |
sys.path.insert(0, '/home/anupam/code/trunk/PyProj/src')
|
- |
|
| 10 |
import falcon
|
9 |
import falcon
|
| 11 |
|
10 |
|
| 12 |
|
11 |
|
| 13 |
class CategoryDiscountInfo(object):
|
12 |
class CategoryDiscountInfo(object):
|
| 14 |
|
13 |
|
| Line 108... |
Line 107... |
| 108 |
'Could not decode the request body. The '
|
107 |
'Could not decode the request body. The '
|
| 109 |
'JSON was incorrect.')
|
108 |
'JSON was incorrect.')
|
| 110 |
|
109 |
|
| 111 |
store = main.getStore(int(req_json['sourceId']))
|
110 |
store = main.getStore(int(req_json['sourceId']))
|
| 112 |
result = store.parseOrderRawHtml(int(req_json['orderId']), req_json['subTagId'], int(req_json['userId']), req_json['rawHtml'], req_json['orderSuccessUrl'])
|
111 |
result = store.parseOrderRawHtml(int(req_json['orderId']), req_json['subTagId'], int(req_json['userId']), req_json['rawHtml'], req_json['orderSuccessUrl'])
|
| 113 |
resp.body = json.dumps({"result":result}, encoding='utf-8')
|
112 |
resp.body = result
|
| 114 |
|
113 |
|
| 115 |
def on_get(self, req, resp, userId):
|
114 |
def on_get(self, req, resp, userId):
|
| 116 |
page = req.get_param_as_int("page")
|
115 |
page = req.get_param_as_int("page")
|
| 117 |
window = req.get_param_as_int("window")
|
116 |
window = req.get_param_as_int("window")
|
| 118 |
result = Mongo.getMerchantOrdersByUser(int(userId), page, window)
|
117 |
result = Mongo.getMerchantOrdersByUser(int(userId), page, window)
|