smartdocking.js 671 B

12345678910111213141516171819202122232425262728
  1. 'use strict';
  2. const _ = require('lodash');
  3. const meta = require('./.smartdocking.js');
  4. const Controller = require('egg').Controller;
  5. const { CrudController } = require('naf-framework-mongoose/lib/controller');
  6. // 管理
  7. class SmartdockingController extends Controller {
  8. constructor(ctx) {
  9. super(ctx);
  10. this.service = this.ctx.service.smartdocking;
  11. }
  12. async docking() {
  13. const res = await this.service.docking(this.ctx.request.body);
  14. this.ctx.ok(res);
  15. }
  16. async companySearch() {
  17. const res = await this.service.companySearch(this.ctx.request.body);
  18. this.ctx.ok(res);
  19. }
  20. }
  21. module.exports = CrudController(SmartdockingController, meta);