| Line 1137... |
Line 1137... |
| 1137 |
continue
|
1137 |
continue
|
| 1138 |
else:
|
1138 |
else:
|
| 1139 |
#remove items that are mapped with tag_ids recieved
|
1139 |
#remove items that are mapped with tag_ids recieved
|
| 1140 |
if tag_ids:
|
1140 |
if tag_ids:
|
| 1141 |
#construct item_availability_info TAGS not matched
|
1141 |
#construct item_availability_info TAGS not matched
|
| 1142 |
item_availability_info = [av_info for av_info in item_availability_info if not (av_info.has_key('tag_ids') and not set(tag_ids).isdisjoint(av_info.get('tag_ids')))]
|
1142 |
item_availability_info = [av_info for av_info in item_availability_info if av_info['availability']==0 and not (av_info.has_key('tag_ids') and not set(tag_ids).isdisjoint(av_info.get('tag_ids')))]
|
| 1143 |
if len(item_availability_info)==0:
|
1143 |
if len(item_availability_info)==0:
|
| 1144 |
#item_availability_info = [{}]
|
1144 |
#item_availability_info = [{}]
|
| 1145 |
continue
|
1145 |
continue
|
| 1146 |
item[0]['availabilityInfo'] = item_availability_info
|
1146 |
item[0]['availabilityInfo'] = item_availability_info
|
| 1147 |
except:
|
1147 |
except:
|
| Line 3402... |
Line 3402... |
| 3402 |
cursor = list(get_mongo_connection().Dtr.crmrefundwallet.find({"status":status}).skip(offset).limit(limit).sort("created_timestamp",-1))
|
3402 |
cursor = list(get_mongo_connection().Dtr.crmrefundwallet.find({"status":status}).skip(offset).limit(limit).sort("created_timestamp",-1))
|
| 3403 |
else:
|
3403 |
else:
|
| 3404 |
cursor = list(get_mongo_connection().Dtr.crmrefundwallet.find().skip(offset).limit(limit).sort("created_timestamp",-1))
|
3404 |
cursor = list(get_mongo_connection().Dtr.crmrefundwallet.find().skip(offset).limit(limit).sort("created_timestamp",-1))
|
| 3405 |
return cursor
|
3405 |
return cursor
|
| 3406 |
|
3406 |
|
| - |
|
3407 |
def fetchProfitmandiBanners():
|
| - |
|
3408 |
cursor = list(get_mongo_connection().Catalog.banners.find())
|
| - |
|
3409 |
return cursor
|
| - |
|
3410 |
|
| - |
|
3411 |
def addProfitMandiBanner(data):
|
| - |
|
3412 |
collection = get_mongo_connection().Catalog.banners()
|
| - |
|
3413 |
fetched = list(collection.find({
|
| - |
|
3414 |
'rank':{'$gte':data['rank']}, 'type': data['type']
|
| - |
|
3415 |
}))
|
| - |
|
3416 |
if fetched:
|
| - |
|
3417 |
for dict1 in fetched:
|
| - |
|
3418 |
dict1['rank'] += 1
|
| - |
|
3419 |
collection.save(dict1)
|
| - |
|
3420 |
collection.insert(data)
|
| - |
|
3421 |
return True
|
| - |
|
3422 |
|
| - |
|
3423 |
def removeProfitmandiBanners(bannerId):
|
| - |
|
3424 |
collection = get_mongo_connection().Catalog.banners()
|
| - |
|
3425 |
collection.remove({"_id":bannerId})
|
| - |
|
3426 |
|
| 3407 |
def fetchCrmRefundByBatchId(batchId):
|
3427 |
def fetchCrmRefundByBatchId(batchId):
|
| 3408 |
cursor = get_mongo_connection().Dtr.crmrefundwallet.find_one({"batchId":int(batchId)})
|
3428 |
cursor = get_mongo_connection().Dtr.crmrefundwallet.find_one({"batchId":int(batchId)})
|
| 3409 |
return cursor
|
3429 |
return cursor
|
| 3410 |
|
3430 |
|
| 3411 |
def userLookUpForSaholicId(userId):
|
3431 |
def userLookUpForSaholicId(userId):
|