import { ALL, Body, Get, Inject, Post, Provide, Query } from '@midwayjs/decorator';
|
import { CoolController, BaseController } from '@cool-midway/core';
|
import { Periodicsetting } from '../../entity/periodicsetting';
|
import { PeriodicsettingService } from '../../service/periodicsetting';
|
import { DataController } from '../../../base/controller/dataController';
|
/**
|
* 分组任务参数设置
|
*/
|
@Provide()
|
@CoolController({
|
api: ['add', 'delete', 'update', 'list', 'page', 'info'],
|
entity: Periodicsetting,
|
service: PeriodicsettingService,
|
})
|
export class PeriodicsettingController extends DataController {
|
@Inject()
|
periodicsettingService: PeriodicsettingService;
|
|
/**
|
* 获得数据
|
*/
|
@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));
|
}
|
}
|