'use strict'; const _ = require('lodash'); const meta = require('./.stockneed.js'); const Controller = require('egg').Controller; const { CrudController } = require('naf-framework-mongoose/lib/controller'); // 股权需求 class StockNeedController extends Controller { constructor(ctx) { super(ctx); this.service = this.ctx.service.stockneed; } //根据金融机构查询股权需求(列表)--分为指向(传金融机构ID)和非指向(不用传) async stockList() { const res = await this.service.getStockList(this.ctx.request.body); this.ctx.ok({...res }); } //根据企业用户查询股权需求(列表) async qystock() { const res = await this.service.getQystock(this.ctx.request.body); this.ctx.ok({ ...res }); } //金融机构关注股权需求 async followstock() { const res = await this.service.getFollowStock(this.ctx.request.body); this.ctx.ok({ data: res }); } //股权需求详情 async one() { const res = await this.service.getOne(this.ctx.request.body); this.ctx.ok({ data: res }); } } module.exports = CrudController(StockNeedController, meta);