|
@@ -6,6 +6,7 @@ import { Controller, Inject, Get, Param, Post, Body, Del, Query } from '@midwayj
|
|
|
import { omit, pick } from 'lodash';
|
|
|
import { ServiceError, ErrorCode } from '../../error/service.error';
|
|
|
import { BaseController } from '../../frame/BaseController';
|
|
|
+import { Context } from '@midwayjs/koa';
|
|
|
const namePrefix = '赛事报名表';
|
|
|
|
|
|
@ApiTags(['赛事报名表'])
|
|
@@ -14,6 +15,9 @@ export class SignController implements BaseController {
|
|
|
@Inject()
|
|
|
service: SignService;
|
|
|
|
|
|
+ @Inject()
|
|
|
+ ctx: Context;
|
|
|
+
|
|
|
@Get('/')
|
|
|
@ApiTags('列表查询')
|
|
|
@ApiQuery({ name: 'query' })
|
|
@@ -41,6 +45,7 @@ export class SignController implements BaseController {
|
|
|
@Validate()
|
|
|
@ApiResponse({ type: CVO_sign })
|
|
|
async create(@Body() data: object) {
|
|
|
+ await this.service.createExamine(data);
|
|
|
const dbData = await this.service.create(data);
|
|
|
const result = new CVO_sign(dbData);
|
|
|
return result;
|
|
@@ -65,8 +70,8 @@ export class SignController implements BaseController {
|
|
|
return result;
|
|
|
}
|
|
|
@Get('/sign')
|
|
|
- async sign(@Query() filter) {
|
|
|
- const list = await this.service.sign(filter);
|
|
|
+ async sign() {
|
|
|
+ const list = await this.service.sign(this.ctx.query);
|
|
|
return list;
|
|
|
}
|
|
|
}
|