import { RefundEntity } from '../../entity/refund';
import { Inject, Post, Provide, Body } from '@midwayjs/decorator';
import { CoolController, BaseController } from '@cool-midway/core';
import { RefundService } from '../../service/refund';

@Provide()
@CoolController({
  api: ['update', 'info', 'page'],
  entity: RefundEntity,
  service: RefundService,
})
export class RefundController extends BaseController {
  @Inject()
  refundService: RefundService;

  @Post('/query', { summary: '查单' })
  async query(@Body('id') id) {
    return this.ok(await this.refundService.queryByApi(id));
  }

}
