'use strict'; const _ = require('lodash'); const meta = require('./.company.js'); const Controller = require('egg').Controller; const { CrudController } = require('naf-framework-mongoose/lib/controller'); // 管理 class CompanyController extends Controller { constructor(ctx) { super(ctx); this.service = this.ctx.service.company; } // 更新其他信息 async updateotherinfo() { const res = await this.service.updateotherinfo(this.ctx.params, this.ctx.request.body); this.ctx.ok({ data: res }); } // 删除其他信息 async deleteotherinfo() { await this.service.deleteotherinfo(this.ctx.params, this.ctx.request.body); this.ctx.ok({ msg: 'deleted' }); } } module.exports = CrudController(CompanyController, meta);