wangrong
2022-03-23 9e3033c25283dff92244ccc0156b3ad1ee409767
src/app/modules/business/controller/admin/trubinelocation.ts
@@ -1,18 +1,33 @@
import { ALL, Body, Inject, Post, Provide } from '@midwayjs/decorator';
import { ALL, Body, Get, Inject, Post, Provide, Query } from '@midwayjs/decorator';
import { CoolController, BaseController } from '@cool-midway/core';
import { Trubinelocation } from '../../entity/trubinelocation';
import { TrubinelocationService } from '../../service/trubinelocation';
import { DataController } from '../../../base/controller/dataController';
/**
        * 斗轮机信息
        */
        * 斗轮机信息
        */
@Provide()
@CoolController({
  api: ['add', 'delete', 'update', 'list'],
  entity: Trubinelocation,
  service: TrubinelocationService,
@CoolController({
  api: ['add', 'delete', 'update', 'list'],
  entity: Trubinelocation,
  service: TrubinelocationService,
})
export class AdminTrubinelocationController extends DataController {
  @Inject()
  trubinelocationService: TrubinelocationService;
export class TrubinelocationController extends DataController {
  @Inject()
  trubinelocationService: TrubinelocationService;
  
  /**
  * 获得数据
  */
   @Get('/getdata', { summary: '数据接口' })
   async getData(@Query(ALL) params: any) {
      return this.ok(await this.dataService.getData(params));
   }
  /**
  * 获得数据
  */
   @Get('/postdata', { summary: '数据接口' })
   async postData(@Query(ALL) params: any) {
      return this.ok(await this.dataService.getData(params));
   }
}