12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- 'use strict';
- const _ = require('lodash');
- const meta = require('./.claimneed.js');
- const Controller = require('egg').Controller;
- const { CrudController } = require('naf-framework-mongoose/lib/controller');
- // 债权需求
- class ClaimNeedController extends Controller {
- constructor(ctx) {
- super(ctx);
- this.service = this.ctx.service.claimneed;
- }
-
- //根据金融机构查询债权需求(列表)--分为指向(传金融机构ID)和非指向(不用传)
- async fclaim() {
- const res = await this.service.getFclaim(this.ctx.request.body);
- this.ctx.ok({...res });
- }
- //根据企业用户查询
- async qyclaim() {
- const res = await this.service.getQyclaim(this.ctx.request.body);
- this.ctx.ok({ ...res });
- }
- //金融机构关注债权需求
- async followclaim() {
- const res = await this.service.getFollowClaim(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 });
- }
- //关注前请求的接口
- async beforFollow() {
- const res = await this.service.getBeforFollow(this.ctx.request.body);
- this.ctx.ok({ data: res });
- }
- //小程序企业需求查询
- async littleqyclaim() {
- const res = await this.service.getLittleqyclaim(this.ctx.request.body);
- this.ctx.ok({ ...res });
- }
- }
- module.exports = CrudController(ClaimNeedController, meta);
|