Jobs promo

This commit is contained in:
CHIEFSOFT\ameye
2024-09-18 10:22:01 -04:00
parent f5508f8058
commit 6e248eefb4
3 changed files with 43 additions and 0 deletions
+36
View File
@@ -55,6 +55,42 @@ var jobs = {
}
});
},
getpromojobs: function (req, res, next) {
//console.log("REQ---->",req.body.uid);
logger.info("------lll---->");
logger.info(req.query);
var data = {
"promo": req.query.promo,
"promo_owner": req.query.promo_owner
};
let Qstring =""; // "SELECT uid,id,username FROM members LIMIT 10";
let QextraString ="";
// if ( req.body.uid != null && req.body.uid !== ""){
// QextraString= " AND j.country IN (SELECT c.country FROM members_wallet w " +
// " LEFT JOIN currency c ON c.code =w.currency " +
// " LEFT JOIN members m ON m.id = w.member_id " +
// " WHERE m.uid = '"+req.body.uid+"' )";
// }
Qstring = "SELECT uid AS job_uid, * FROM members_jobs WHERE member_id = 474 ORDER BY id DESC";
// logger.info(Qstring);
db.query(Qstring, function (err, result) {
try {
if (err) throw err;
let resultItem ={
"result": result.rows,
"total_record": result.rowCount
}
// logger.info(result);
next(null, resultItem); // pass control to the next handler
// next(null, result.rows); // pass control to the next handler
} catch (e) {
next(e.message, null); // pass control to the next handler
}
});
},
getmarketInterestCount: function (req, res, next) {
logger.info("------ ********** getmarketInterestCount() ********** ---->");
//logger.info(req.query);