let result = await user.findOne({
where: post
})
const friends = await sequelize.query(
`SElECT DISTINCT * FROM user WHERE id IN
(SELECT targetId FROM friends WHERE sourceId = "${result.id}")`
)
// 下面这行代码,未成功
result.list = friends[0]
相关分类