applymmoney.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. 'use strict';
  2. const _ = require('lodash');
  3. const meta = require('./.applymmoney.js');
  4. const Controller = require('egg').Controller;
  5. const { CrudController } = require('naf-framework-mongoose/lib/controller');
  6. // 申请理财产品
  7. class ApplyMmoneyController extends Controller {
  8. constructor(ctx) {
  9. super(ctx);
  10. this.service = this.ctx.service.applymmoney;
  11. }
  12. //根据金融机构ID查询申请理财信息
  13. async amlist() {
  14. const res = await this.service.getAmlist(this.ctx.request.body);
  15. this.ctx.ok({...res });
  16. }
  17. async one(){
  18. const res = await this.service.getOne(this.ctx.request.body);
  19. this.ctx.ok({ data:res });
  20. }
  21. async changefollow(){
  22. const res = await this.service.getChangefollow(this.ctx.request.body);
  23. this.ctx.ok({ data:res });
  24. }
  25. async beforecreat(){
  26. const res = await this.service.getBeforecreat(this.ctx.request.body);
  27. this.ctx.ok({ data:res });
  28. }
  29. }
  30. module.exports = CrudController(ApplyMmoneyController, meta);