import { Controller, Get, Inject, Query } from '@midwayjs/core';
import { Opera } from '../frame/dbOpera';
import { InitSystemDataService } from '../service/initData/initSystemData.service';
import { ExportConfigService } from '../service/exportConfig.service';
import { ExportMissionService } from '../service/exportMission.service';
import { AsyncExportService } from '../service/asyncExport.service';
import { AliyunSmsService } from '../service/thirdParty/aliyunSms.service';
@Controller('/')
export class HomeController {
  @Inject()
  ec: ExportConfigService;
  @Inject()
  missionService: ExportMissionService;

  @Inject()
  aeService: AsyncExportService;
  Opera = Opera;

  @Inject()
  smsService: AliyunSmsService;

  @Get('/')
  async home(@Query() query: object): Promise<any> {
    // await this.ec.initData()
    // await this.missionService.toSendMq(1);
    // await this.aeService.execute(11);
    // await this.smsService.send('13089419810', '2234');
    return 'starting...';
  }
  // @Get('/:method')
  // async test(@Param('method') method: string, @Query() query: object) {
  //   const result: any = await this.adminService[method](query);
  //   return result;
  // }
}
