12345678910111213141516171819 |
- 'use strict';
- const { CrudService } = require('naf-framework-mongoose-free/lib/service');
- const { BusinessError, ErrorCode } = require('naf-core').Error;
- const _ = require('lodash');
- const assert = require('assert');
- class UtilService extends CrudService {
- constructor(ctx) {
- super(ctx, 'util');
- }
- async index() {
- // const res = await this.app.mysql.select('jcc_activities_times', {});
- const res = await this.ctx.service.mysql.query('jcc_activities_times');
- // const res = await this.app.mysql.insert('jcc_activities_times', { id: '123321123', title: '测试2', start_time: '2022-02-01', end_time: '2022-02-20', is_open: 0 });
- return res;
- }
- }
- module.exports = UtilService;
|