}
}
new Result(data, '获取成功').success(res)
});
上面是我博客的一段真实场景代码,其作用是第一可以分页,第二倒序返回数据(这样可以后发表的博客显示在最前面...,场景不同模糊搜索的需求也就不一样了。...将返回 `username` DESC
['username', 'DESC'],
// 将返回 max(`age`)
sequelize.fn('max', sequelize.col...('age')),
// 将返回 max(`age`) DESC
[sequelize.fn('max', sequelize.col('age')), 'DESC'],
//...将返回 otherfunction(`col1`, 12, 'lalala') DESC
[sequelize.fn('otherfunction', sequelize.col('col1')