2 回答
TA贡献1818条经验 获得超7个赞
您的where情况应如下 -
where = {
[Op.or]: [
sequelize.where(sequelize.col('requests.id'), { [Op.like]: `%${req.query.queryStr}%` }),
sequelize.where(sequelize.col('requests.user_id'), { [Op.like]: `%${req.query.queryStr}%` }),
sequelize.where(sequelize.col('requests.uuid'), { [Op.like]: `%${req.query.queryStr}%` }),
sequelize.where(sequelize.col('requests.status'), { [Op.like]: `%${req.query.queryStr}%` }),
sequelize.where(sequelize.col('requests.csv_url'), { [Op.like]: `%${req.query.queryStr}%` }),
sequelize.where(sequelize.col('requestURLs.url'), { [Op.like]: `%${req.query.queryStr}%` }),
]
},
我希望它有帮助!
添加回答
举报