wangrong
2022-06-28 0b31be01af4247244e1b6285d6c537c2894acea9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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', 'page', 'info'],
  entity: Trubinelocation,
  // service: 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));
  }
  /**
  * 获得数据
  */
  @Post('/postdata', { summary: '数据接口' })
  async postData(@Query(ALL) params: any) {
    return this.ok(await this.dataService.getData(params));
  }
}