master
2022-04-07 58389be5d3c1bbf4e47976f7ea09977be8bb84c5
src/app/modules/business/controller/admin/devicegroup.ts
@@ -1,7 +1,7 @@
import { ALL, Body, Get, Inject, Post, Provide, Query } from '@midwayjs/decorator';
import { CoolController, BaseController } from '@cool-midway/core';
import { Devicegroup } from '../../entity/devicegroup';
import { DevicegroupService } from '../../service/devicegroup';
// import { DevicegroupService } from '../../service/devicegroup';
import { DataController } from '../../../base/controller/dataController';
/**
        * 设备分组
@@ -10,24 +10,24 @@
@CoolController({
  api: ['add', 'delete', 'update', 'list', 'page', 'info'],
  entity: Devicegroup,
  service: DevicegroupService,
  // service: DevicegroupService,
})
export class DevicegroupController extends DataController {
  @Inject()
  devicegroupService: DevicegroupService;
  // @Inject()
  // devicegroupService: DevicegroupService;
  /**
  * 获得数据
  */
  @Get('/getdata', { summary: '数据接口' })
  async getData(@Query(ALL) params: any) {
    return this.ok(await this.devicegroupService.getData(params));
  }
  /**
  * 获得数据
  */
  @Post('/postdata', { summary: '数据接口' })
  async postData(@Query(ALL) params: any) {
    return this.ok(await this.devicegroupService.getData(params));
  }
  // @Get('/getdata', { summary: '数据接口' })
  // async getData(@Query(ALL) params: any) {
  //   return this.ok(await this.devicegroupService.getData(params));
  // }
  // /**
  // * 获得数据
  // */
  // @Post('/postdata', { summary: '数据接口' })
  // async postData(@Query(ALL) params: any) {
  //   return this.ok(await this.devicegroupService.getData(params));
  // }
}