kids wallet
This commit is contained in:
@@ -36,6 +36,42 @@ var wallets = {
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
},
|
||||
getuserkidswallet: function (req, res, next) {
|
||||
logger.info("getuserwallet: function (req, res, next)");
|
||||
//console.log("REQ---->",req.body.uid);
|
||||
logger.info(req.query);
|
||||
var data = {
|
||||
"uid": req.query.uid,
|
||||
"member_id": req.query.member_id,
|
||||
"family_uid": req.query.family_uid,
|
||||
"sessionid": req.query.sessionid,
|
||||
};
|
||||
let Qstring = "";
|
||||
Qstring = "SELECT w.amount,c.*,w.amount AS current_balance,c.country," +
|
||||
"w.transfer_limit,w.uid AS wallet_uid, 0 AS escrow " +
|
||||
"FROM members_wallet w " +
|
||||
"LEFT JOIN members_family f ON f.member_id = m.id"
|
||||
"LEFT JOIN currency c ON c.code=w.currency " +
|
||||
"LEFT JOIN members m ON m.id = w.member_id " +
|
||||
"WHERE f.uid = '" + data.family_uid + "' " +
|
||||
"AND f.member_id = " + data.member_id +
|
||||
" AND m.uid='" + data.uid + "' ORDER BY c.lorder DESC ";
|
||||
logger.info(Qstring);
|
||||
db.query(Qstring, function (err, result) {
|
||||
try {
|
||||
if (err) throw err;
|
||||
let resultItem = {
|
||||
"result": result.rows,
|
||||
"total_record": result.rowCount
|
||||
}
|
||||
next(null, resultItem); // pass control to the next handler
|
||||
} catch (e) {
|
||||
next(e.message, null); // pass control to the next handler
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
},
|
||||
getescrows: function (req, res, next) {
|
||||
|
||||
Reference in New Issue
Block a user