| Line 3... |
Line 3... |
| 3 |
from dtr.config import PythonPropertyReader
|
3 |
from dtr.config import PythonPropertyReader
|
| 4 |
from dtr.dao import FeaturedDeals, AppTransactions, AppOfferObj, Promotion, NotificationCampaign,CrmRefundWallet
|
4 |
from dtr.dao import FeaturedDeals, AppTransactions, AppOfferObj, Promotion, NotificationCampaign,CrmRefundWallet
|
| 5 |
from dtr.storage import DataService
|
5 |
from dtr.storage import DataService
|
| 6 |
from dtr.storage.DataService import price_preferences, brand_preferences, \
|
6 |
from dtr.storage.DataService import price_preferences, brand_preferences, \
|
| 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, user_accounts
|
| 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,REVERSE_SOURCE_MAP,\
|
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 |
get_mongo_connection_dtr_data
|
13 |
get_mongo_connection_dtr_data
|
| Line 3272... |
Line 3272... |
| 3272 |
|
3272 |
|
| 3273 |
def fetchCrmRefundByBatchId(batchId):
|
3273 |
def fetchCrmRefundByBatchId(batchId):
|
| 3274 |
cursor = get_mongo_connection().Dtr.crmrefundwallet.find_one({"batchId":int(batchId)})
|
3274 |
cursor = get_mongo_connection().Dtr.crmrefundwallet.find_one({"batchId":int(batchId)})
|
| 3275 |
return cursor
|
3275 |
return cursor
|
| 3276 |
|
3276 |
|
| - |
|
3277 |
def userLookUpForSaholicId(userId):
|
| - |
|
3278 |
result = None
|
| - |
|
3279 |
try:
|
| - |
|
3280 |
response = session.query(user_accounts.account_key).filter_by(user_id=userId).filter(user_accounts.account_type=='saholic').first()
|
| - |
|
3281 |
if response is None:
|
| - |
|
3282 |
result = 'User Not present in profitmandi'
|
| - |
|
3283 |
else:
|
| - |
|
3284 |
result = response[0]
|
| - |
|
3285 |
except:
|
| - |
|
3286 |
result = 'User Not present in profitmandi'
|
| - |
|
3287 |
traceback.print_exc()
|
| - |
|
3288 |
finally:
|
| - |
|
3289 |
session.close()
|
| - |
|
3290 |
return result
|
| 3277 |
|
3291 |
|
| 3278 |
def main():
|
3292 |
def main():
|
| 3279 |
#getDealsForSearchText("20", 'Samsung', 0, 10)
|
3293 |
#getDealsForSearchText("20", 'Samsung', 0, 10)
|
| 3280 |
|
3294 |
|
| 3281 |
x = getBrandSubCategoryInfo(6,"15^17","subCategoryInfo")
|
3295 |
x = getBrandSubCategoryInfo(6,"15^17","subCategoryInfo")
|