1234567891011121314151617181920212223 |
- 'use strict';
- const { CrudService } = require('naf-framework-mongoose-free/lib/service');
- class TableService extends CrudService {
- constructor(ctx) {
- super(ctx, 'table');
- this.model = this.ctx.model.Table;
- }
- async query(condition) {
- condition = this.turnFilter(this.turnDateRangeQuery(condition));
- console.log(condition);
- const res = await this.model.find(condition);
- console.log(res);
- }
- async count(condition) {
- console.log(condition);
- }
- }
- module.exports = TableService;
|