'use strict'; const _ = require('lodash'); const meta = require('./.notice.js'); const Controller = require('egg').Controller; const { CrudController } = require('naf-framework-mongoose/lib/controller'); // 通知管理 class NoticeController extends Controller { constructor(ctx) { super(ctx); this.service = this.ctx.service.notice; } async look() { const res = await this.service.look(this.ctx.request.body); this.ctx.ok({ data: res }); } async index() { const data = await this.service.query(this.ctx.query); this.ctx.ok({ ...data }); } } module.exports = CrudController(NoticeController, meta);