diff --git a/package.json b/package.json index d850546..586290f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "less.js", - "version": "2.0.28", + "version": "2.0.29", "description": "A write less, do more MVC framework based on Koa.", "main": "src/index.js", "scripts": { diff --git a/src/extends/service.js b/src/extends/service.js index 5665d48..ac34ea6 100644 --- a/src/extends/service.js +++ b/src/extends/service.js @@ -11,7 +11,7 @@ module.exports = app => { * 查询 * @returns {Promise} */ - async find ({ id = '', attributes = null, offset = 0, limit = app.$config.PAGE_SIZE || 10, where = {}, order = [['id', 'DESC']] } = {}) { + async find ({ id = '', attributes = null, offset = 0, limit = app.$config.PAGE_SIZE || 10, group = null, where = {}, order = [['id', 'DESC']] } = {}) { if (id) { return this.Model.findByPk(id, { include: this.include, @@ -26,6 +26,7 @@ module.exports = app => { attributes, offset, limit: limit === -1 ? undefined : limit, + group, where, order })