1234567891011121314151617181920212223 |
- 'use strict';
- const { CrudService } = require('naf-framework-mongoose-free/lib/service');
- const { BusinessError, ErrorCode } = require('naf-core').Error;
- const _ = require('lodash');
- const assert = require('assert');
- // 公司信息
- class CompanyService extends CrudService {
- constructor(ctx) {
- super(ctx, "company");
- this.model = this.ctx.model.Company;
- }
- async query({ ...info }) {
- let res = {};
- const data = await this.model.findOne({ ...info });
- if (data) {
- res = data;
- }
- return res;
- }
- }
- module.exports = CompanyService;
|