sequelize 模糊查询
2019-12-12 本文已影响0人
Mokingc
Op = Sequelize.Op;
router.get('/problem/catalog/:id', async ctx => {
let { id } = ctx.params
ctx.body = await Problem.findAll({ where: { catalog_id: { [Op.like]: `%${id}%` } } })
})
Op = Sequelize.Op;
router.get('/problem/catalog/:id', async ctx => {
let { id } = ctx.params
ctx.body = await Problem.findAll({ where: { catalog_id: { [Op.like]: `%${id}%` } } })
})