| Line 3232... |
Line 3232... |
| 3232 |
offer1 = CrmRefundWallet(userId,emailId,mobileNumber,amount,refundType,store,referenceId,referenceDescription,utils.REFUND_ADJUSTMENT_MAP.get(0),to_java_date(datetime.now()))
|
3232 |
offer1 = CrmRefundWallet(userId,emailId,mobileNumber,amount,refundType,store,referenceId,referenceDescription,utils.REFUND_ADJUSTMENT_MAP.get(0),to_java_date(datetime.now()))
|
| 3233 |
dict1 = todict(offer1)
|
3233 |
dict1 = todict(offer1)
|
| 3234 |
collection.save(dict1)
|
3234 |
collection.save(dict1)
|
| 3235 |
return True
|
3235 |
return True
|
| 3236 |
|
3236 |
|
| 3237 |
def updateCrmWalletStatus(status,_id,userId,batchId):
|
3237 |
def updateCrmWalletStatus(status,_id,userId,batchId,approvedBy):
|
| 3238 |
if batchId is None:
|
3238 |
if batchId is None:
|
| 3239 |
get_mongo_connection().Dtr.crmrefundwallet.update({'_id':ObjectId(_id),},{"$set":{"status":status,"update_timestamp":to_java_date(datetime.now())}})
|
3239 |
get_mongo_connection().Dtr.crmrefundwallet.update({'_id':ObjectId(_id),},{"$set":{"status":status,"update_timestamp":to_java_date(datetime.now())}})
|
| 3240 |
else:
|
3240 |
else:
|
| 3241 |
get_mongo_connection().Dtr.crmrefundwallet.update({'_id':ObjectId(_id),},{"$set":{"status":status,"update_timestamp":to_java_date(datetime.now()),"batchId":batchId}})
|
3241 |
get_mongo_connection().Dtr.crmrefundwallet.update({'_id':ObjectId(_id),},{"$set":{"status":status,"update_timestamp":to_java_date(datetime.now()),"batchId":batchId,"approved_by":approvedBy}})
|
| 3242 |
|
3242 |
|
| 3243 |
def fetchCrmRefundUsers(status,offset,limit):
|
3243 |
def fetchCrmRefundUsers(status,offset,limit):
|
| 3244 |
cursor = list(get_mongo_connection().Dtr.crmrefundwallet.find({"status":status}).skip(offset).limit(limit).sort("created_timestamp",-1))
|
3244 |
cursor = list(get_mongo_connection().Dtr.crmrefundwallet.find({"status":status}).skip(offset).limit(limit).sort("created_timestamp",-1))
|
| 3245 |
return cursor
|
3245 |
return cursor
|
| 3246 |
|
3246 |
|