intelligentFollow.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. 'use strict';
  2. const _ = require('lodash');
  3. const meta = require('./.intelligentFollow.js');
  4. const Controller = require('egg').Controller;
  5. const { CrudController } = require('naf-framework-mongoose/lib/controller');
  6. // 银企对接关注表
  7. class IntelligentFollowController extends Controller {
  8. constructor(ctx) {
  9. super(ctx);
  10. this.service = this.ctx.service.intelligentFollow;
  11. }
  12. // 授信接口
  13. async credit() {
  14. const res = await this.service.getCredit(this.ctx.request.body);
  15. this.ctx.ok({ data: res });
  16. }
  17. // 关注列表
  18. async getFollowList() {
  19. const res = await this.service.getFollowList(this.ctx.request.body);
  20. this.ctx.ok({ data: res });
  21. }
  22. // 已完成列表
  23. async getFinishList() {
  24. const res = await this.service.getFinishList(this.ctx.request.body);
  25. this.ctx.ok({ data: res });
  26. }
  27. // 金融机构关注需求
  28. async followIntelligent() {
  29. const res = await this.service.getFollow(this.ctx.request.body);
  30. this.ctx.ok({ data: res });
  31. }
  32. // 关注前请求的接口
  33. async beforFollow() {
  34. const res = await this.service.getBeforFollow(this.ctx.request.body);
  35. this.ctx.ok({ data: res });
  36. }
  37. }
  38. module.exports = CrudController(IntelligentFollowController, meta);