|
@@ -1,23 +1,17 @@
|
|
|
-import { MatchService } from '../../service/platform/match.service';
|
|
|
import { CVO_match, FVO_match, QVO_match, UVAO_match } from '../../interface/platform/match.interface';
|
|
|
import { ApiResponse, ApiTags, ApiQuery } from '@midwayjs/swagger';
|
|
|
import { Validate } from '@midwayjs/validate';
|
|
|
import { Controller, Inject, Get, Param, Post, Body, Del, Query } from '@midwayjs/core';
|
|
|
-import { get, omit, pick } from 'lodash';
|
|
|
+import { omit, pick } from 'lodash';
|
|
|
import { ServiceError, ErrorCode } from '../../error/service.error';
|
|
|
import { BaseController } from '../../frame/BaseController';
|
|
|
-import { ServiceUtilService } from '../../service/serviceUtil.service';
|
|
|
import { MatchExtService } from '../../service/match/matchExt.service';
|
|
|
const namePrefix = '创新大赛拓展';
|
|
|
@ApiTags(['创新大赛拓展'])
|
|
|
@Controller('/matchExt', { tagName: namePrefix })
|
|
|
export class MatchExtController implements BaseController {
|
|
|
@Inject()
|
|
|
- service: MatchService;
|
|
|
- @Inject()
|
|
|
- serviceUtil: ServiceUtilService;
|
|
|
- @Inject()
|
|
|
- matchExtService: MatchExtService;
|
|
|
+ service: MatchExtService;
|
|
|
@Get('/')
|
|
|
@ApiTags('列表查询')
|
|
|
@ApiQuery({ name: 'query' })
|
|
@@ -54,7 +48,6 @@ export class MatchExtController implements BaseController {
|
|
|
async update(@Param('id') id: number, @Body() data: object) {
|
|
|
if (!id) throw new ServiceError(ErrorCode.ID_NOT_FOUND);
|
|
|
const result = await this.service.update({ id }, data);
|
|
|
- await this.service.updateProject({ id }, data);
|
|
|
return result;
|
|
|
}
|
|
|
|
|
@@ -64,7 +57,6 @@ export class MatchExtController implements BaseController {
|
|
|
async delete(@Param('id') id: number) {
|
|
|
if (!id) throw new ServiceError(ErrorCode.ID_NOT_FOUND);
|
|
|
const result = await this.service.delete({ id });
|
|
|
- await this.service.deleteFlow(id);
|
|
|
return result;
|
|
|
}
|
|
|
|
|
@@ -72,8 +64,6 @@ export class MatchExtController implements BaseController {
|
|
|
@ApiResponse({ type: FVO_match })
|
|
|
async detail(@Param('id') id: string) {
|
|
|
let data = await this.service.fetch({ id });
|
|
|
- data = await this.serviceUtil.fillOnwer(data);
|
|
|
- data = await this.serviceUtil.fillCollection(data, 'match');
|
|
|
return data;
|
|
|
}
|
|
|
}
|