master
2022-04-20 09f5baff0d14f593b52920b9b76d46fedfb753a8
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 { Comconfig } from '../../entity/comconfig';
// import { ComconfigService } from '../../service/comconfig';
import { DataController } from '../../../base/controller/dataController';
/**
        * 监测元数据
        */
@Provide()
@CoolController({
  api: ['add', 'delete', 'update', 'list', 'page', 'info'],
  entity: Comconfig,
  //   service: ComconfigService,
})
export class ComconfigController extends DataController {
  //   @Inject()
  //   comconfigService: ComconfigService;
 
  /**
  * 获得数据
  */
  @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));
  }
}