| Line 7... |
Line 7... |
| 7 |
user_actions, Brands, app_offers, approved_app_transactions, user_app_cashbacks, \
|
7 |
user_actions, Brands, app_offers, approved_app_transactions, user_app_cashbacks, \
|
| 8 |
user_app_installs, appmasters, notification_campaigns
|
8 |
user_app_installs, appmasters, notification_campaigns
|
| 9 |
from dtr.storage.MemCache import MemCache
|
9 |
from dtr.storage.MemCache import MemCache
|
| 10 |
from dtr.utils.MailSender import Email
|
10 |
from dtr.utils.MailSender import Email
|
| 11 |
from dtr.utils.utils import to_java_date, CB_PENDING, CB_APPROVED, CB_INIT, \
|
11 |
from dtr.utils.utils import to_java_date, CB_PENDING, CB_APPROVED, CB_INIT, \
|
| 12 |
to_py_date, CB_REJECTED, SUB_CATEGORY_MAP,CREDIT_TYPE_REFUND,CREDIT_TYPE_OFFER,CREDIT_TYPE_ADJUSTMENT,REFUND_ADJUSTMENT_MAP, todict
|
12 |
to_py_date, CB_REJECTED, SUB_CATEGORY_MAP,CREDIT_TYPE_REFUND,CREDIT_TYPE_OFFER,CREDIT_TYPE_ADJUSTMENT,REFUND_ADJUSTMENT_MAP, todict,REVERSE_SOURCE_MAP
|
| 13 |
from sqlalchemy.sql.expression import func, func, or_, desc, asc, case
|
13 |
from sqlalchemy.sql.expression import func, func, or_, desc, asc, case
|
| 14 |
from elixir import *
|
14 |
from elixir import *
|
| 15 |
from operator import itemgetter
|
15 |
from operator import itemgetter
|
| 16 |
from pymongo.command_cursor import CommandCursor
|
16 |
from pymongo.command_cursor import CommandCursor
|
| 17 |
import pymongo
|
17 |
import pymongo
|
| Line 2806... |
Line 2806... |
| 2806 |
store = jsonReq.get('store')
|
2806 |
store = jsonReq.get('store')
|
| 2807 |
refundType = jsonReq.get('type')
|
2807 |
refundType = jsonReq.get('type')
|
| 2808 |
mobileNumber = jsonReq.get('mobile')
|
2808 |
mobileNumber = jsonReq.get('mobile')
|
| 2809 |
referenceId = jsonReq.get('reference_no')
|
2809 |
referenceId = jsonReq.get('reference_no')
|
| 2810 |
referenceDescription = jsonReq.get('reference_description')
|
2810 |
referenceDescription = jsonReq.get('reference_description')
|
| 2811 |
if store.strip() is '':
|
2811 |
if not store:
|
| 2812 |
store = None
|
2812 |
store = None
|
| - |
|
2813 |
else:
|
| - |
|
2814 |
store = REVERSE_SOURCE_MAP.get(store)
|
| 2813 |
if lower(refundType)=='refund':
|
2815 |
if lower(refundType)=='refund':
|
| 2814 |
refundType = CREDIT_TYPE_REFUND
|
2816 |
refundType = CREDIT_TYPE_REFUND
|
| 2815 |
elif lower(refundType)=='adjustment':
|
2817 |
elif lower(refundType)=='adjustment':
|
| 2816 |
refundType = CREDIT_TYPE_ADJUSTMENT
|
2818 |
refundType = CREDIT_TYPE_ADJUSTMENT
|
| 2817 |
collection = get_mongo_connection().Dtr.crmrefundwallet
|
2819 |
collection = get_mongo_connection().Dtr.crmrefundwallet
|