123456789101112131415161718192021 |
- import { App, Controller, Get, Inject } from '@midwayjs/decorator';
- import { WxPayService } from '../util/wxpay';
- import { Application } from '@midwayjs/koa';
- import { MqSender } from '../service/mq/mqSender.service';
- @Controller('/')
- export class HomeController {
- @Inject()
- wxpayService: WxPayService;
- @App()
- app: Application;
- @Inject()
- mqService: MqSender;
- @Get('/')
- async home(): Promise<string> {
- await this.mqService.groupMsg({ order_id: '638fec34a4ec0bad05bc2c54' }, 5000);
- return 'Hello Midwayjs!';
- }
- }
|