stockneed.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. 'use strict';
  2. const _ = require('lodash');
  3. const meta = require('./.stockneed.js');
  4. const Controller = require('egg').Controller;
  5. const { CrudController } = require('naf-framework-mongoose/lib/controller');
  6. // 股权需求
  7. class StockNeedController extends Controller {
  8. constructor(ctx) {
  9. super(ctx);
  10. this.service = this.ctx.service.stockneed;
  11. }
  12. //根据金融机构查询股权需求(列表)--分为指向(传金融机构ID)和非指向(不用传)
  13. async stockList() {
  14. const res = await this.service.getStockList(this.ctx.request.body);
  15. this.ctx.ok({...res });
  16. }
  17. //根据企业用户查询股权需求(列表)
  18. async qystock() {
  19. const res = await this.service.getQystock(this.ctx.request.body);
  20. this.ctx.ok({ ...res });
  21. }
  22. //金融机构关注股权需求
  23. async followstock() {
  24. const res = await this.service.getFollowStock(this.ctx.request.body);
  25. this.ctx.ok({ data: res });
  26. }
  27. //股权需求详情
  28. async one() {
  29. const res = await this.service.getOne(this.ctx.request.body);
  30. this.ctx.ok({ data: res });
  31. }
  32. }
  33. module.exports = CrudController(StockNeedController, meta);