financefollow.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. 'use strict';
  2. const _ = require('lodash');
  3. const meta = require('./.financefollow.js');
  4. const Controller = require('egg').Controller;
  5. const { CrudController } = require('naf-framework-mongoose/lib/controller');
  6. // 金融机构关注表
  7. class FinanceFollowController extends Controller {
  8. constructor(ctx) {
  9. super(ctx);
  10. this.service = this.ctx.service.financefollow;
  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 followlist() {
  19. const res = await this.service.getFollowList(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({ ... res });
  26. }
  27. //完成债权历史列表
  28. async followClaimHistory() {
  29. const res = await this.service.getFollowClaimHistory(this.ctx.request.body);
  30. this.ctx.ok({ ... res });
  31. }
  32. //完成债权历史列表
  33. async firstsuccess() {
  34. const res = await this.service.getFirstsuccess(this.ctx.request.body);
  35. this.ctx.ok({ ... res });
  36. }
  37. async finceNews() {
  38. const res = await this.service.getFinceNews(this.ctx.request.body);
  39. this.ctx.ok({data: res });
  40. }
  41. async threenews() {
  42. const res = await this.service.getThreenews();
  43. this.ctx.ok({data: res });
  44. }
  45. }
  46. module.exports = CrudController(FinanceFollowController, meta);