'use strict'; const _ = require('lodash'); const meta = require('./.schtime.js'); const Controller = require('egg').Controller; const { CrudController } = require('naf-framework-mongoose/lib/controller'); // 培训计划学校上报时间表管理 class SchtimeController extends Controller { constructor(ctx) { super(ctx); this.service = this.ctx.service.schtime; } async updateschtimes() { console.log(_.isArray(this.ctx.request.body)); const res = await this.service.updateschtimes(this.ctx.request.body); this.ctx.ok({ msg: 'updated', data: res }); } } module.exports = CrudController(SchtimeController, meta);