| Line 2392... |
Line 2392... |
| 2392 |
if status == utils.REFUND_ADJUSTMENT_MAP.get(1):
|
2392 |
if status == utils.REFUND_ADJUSTMENT_MAP.get(1):
|
| 2393 |
Mongo.updateCrmWalletStatus(status, _id,userId)
|
2393 |
Mongo.updateCrmWalletStatus(status, _id,userId)
|
| 2394 |
value = jsonReq.get('amount')
|
2394 |
value = jsonReq.get('amount')
|
| 2395 |
datetimeNow = datetime.now()
|
2395 |
datetimeNow = datetime.now()
|
| 2396 |
batchId = int(time.mktime(datetimeNow.timetuple()))
|
2396 |
batchId = int(time.mktime(datetimeNow.timetuple()))
|
| 2397 |
user_id = jsonReq.get('user_id')
|
2397 |
user_id = int(jsonReq.get('user_id'))
|
| 2398 |
value = jsonReq.get('amount')
|
2398 |
value = int(jsonReq.get('amount'))
|
| 2399 |
type = jsonReq.get('type')
|
2399 |
type = jsonReq.get('type')
|
| 2400 |
conn.refund.insert({"userId": user_id, "batch":batchId, "userAmount":value, "timestamp":datetime.strftime(datetimeNow,"%Y-%m-%d %H:%M:%S"), "type":type})
|
2400 |
conn.refund.insert({"userId": user_id, "batch":batchId, "userAmount":value, "timestamp":datetime.strftime(datetimeNow,"%Y-%m-%d %H:%M:%S"), "type":type})
|
| 2401 |
conn.user.update({"userId":user_id}, {"$inc": { "credited": value, type:value}}, upsert=True)
|
2401 |
conn.user.update({"userId":user_id}, {"$inc": { "credited": value, type:value}}, upsert=True)
|
| 2402 |
resp.body = "{\"result\":\"success\"}"
|
2402 |
resp.body = "{\"result\":\"success\"}"
|
| 2403 |
elif status == utils.REFUND_ADJUSTMENT_MAP.get(2):
|
2403 |
elif status == utils.REFUND_ADJUSTMENT_MAP.get(2):
|