const db = require("../../utils/db_config");
|
|
const { errorLogStatus } = require("../Errorlog");
|
|
async function getInvestorIdQuery(id) {
|
|
try {
|
|
let query = `select * from dbo.P2P_BI_Liquiloans_Investors where investor_id= '${id}'`;
|
|
return await db.sequelize.query(query, { type: db.sequelize.QueryTypes.SELECT });
|
|
} catch (error) {
|
|
// console.log("isInvestorPresent", err.message)
|
|
errorLogStatus(error, "nodeJs_liquiloan_isInvestorPresent")
|
|
}
|
|
|
|
}
|
|
|
|
async function getInvestorPan(pan) {
|
|
try {
|
|
let query = `Select CLIENT_CODE from ClientMasterMFD Where CLIENT_PAN IN ('${pan}') and status = 1`
|
|
return await db.sequelize.query(query, { type: db.sequelize.QueryTypes.SELECT });
|
|
} catch (error) {
|
|
errorLogStatus(error, "Error_getClientCode")
|
|
}
|
|
|
|
}
|
|
|
|
module.exports = {
|
|
getInvestorIdQuery,
|
|
getInvestorPan
|
|
}
|
Powered by TurnKey Linux.