institution.js 752 B

123456789101112131415161718192021222324252627282930
  1. 'use strict';
  2. const _ = require('lodash');
  3. const meta = require('./.institution.js');
  4. const Controller = require('egg').Controller;
  5. const { CrudController } = require('naf-framework-mongoose/lib/controller');
  6. // 管理
  7. class InstitutionController extends Controller {
  8. constructor(ctx) {
  9. super(ctx);
  10. this.service = this.ctx.service.institution;
  11. }
  12. //股权信息发布(0-未发布,1-发布)
  13. async publish(){
  14. const res = await this.service.makePublish(this.ctx.request.body);
  15. this.ctx.ok({ data: res });
  16. }
  17. //查询股权信息详情
  18. async one(){
  19. const res = await this.service.getOne(this.ctx.request.body);
  20. this.ctx.ok({ data: res });
  21. }
  22. }
  23. module.exports = CrudController(InstitutionController, meta);