zs 8 ماه پیش
والد
کامیت
6ee0a49bdf

+ 12 - 0
src/controller/platform/footplate.controller.ts

@@ -7,6 +7,7 @@ import { ServiceError, ErrorCode } from '../../error/service.error';
 import { BaseController } from '../../frame/BaseController';
 import { QVO_footplate, FVO_footplate, CVO_footplate, UVAO_footplate } from '../../interface/platform/footplate.interface';
 import { Context } from '@midwayjs/koa';
+import { ServiceUtilService } from '../../service/serviceUtil.service';
 const namePrefix = '中试平台';
 @ApiTags(['中试平台'])
 @Controller('/footplate', { tagName: namePrefix })
@@ -17,6 +18,9 @@ export class FootplateController implements BaseController {
   @Inject()
   ctx: Context;
 
+  @Inject()
+  serviceUtil: ServiceUtilService;
+
   @Get('/')
   @ApiTags('列表查询')
   @ApiQuery({ name: 'query' })
@@ -73,4 +77,12 @@ export class FootplateController implements BaseController {
     const result = await this.service.delete({ id });
     return result;
   }
+
+  @Get('/detail/:id')
+  @ApiResponse({ type: FVO_footplate })
+  async detail(@Param('id') id: string) {
+    let data = await this.service.fetch({ id });
+    data = await this.serviceUtil.fillCollection(data);
+    return data;
+  }
 }

+ 12 - 0
src/controller/platform/news.controller.ts

@@ -6,6 +6,7 @@ import { omit, pick } from 'lodash';
 import { ServiceError, ErrorCode } from '../../error/service.error';
 import { Controller, Inject, Get, Param, Post, Body, Del, Query } from '@midwayjs/core';
 import { BaseController } from '../../frame/BaseController';
+import { ServiceUtilService } from '../../service/serviceUtil.service';
 const namePrefix = '收藏';
 @ApiTags(['收藏'])
 @Controller('/news', { tagName: namePrefix })
@@ -13,6 +14,9 @@ export class NewsController implements BaseController {
   @Inject()
   service: NewsService;
 
+  @Inject()
+  serviceUtil: ServiceUtilService;
+
   @Get('/')
   @ApiTags('列表查询')
   @ApiQuery({ name: 'query' })
@@ -63,4 +67,12 @@ export class NewsController implements BaseController {
     const result = await this.service.delete({ id });
     return result;
   }
+
+  @Get('/detail/:id')
+  @ApiResponse({ type: FVO_news })
+  async detail(@Param('id') id: string) {
+    let data = await this.service.fetch({ id });
+    data = await this.serviceUtil.fillCollection(data);
+    return data;
+  }
 }

+ 12 - 0
src/controller/platform/support.controller.ts

@@ -7,6 +7,7 @@ import { ServiceError, ErrorCode } from '../../error/service.error';
 import { BaseController } from '../../frame/BaseController';
 import { QVO_support, FVO_support, CVO_support, UVAO_support } from '../../interface/platform/support.interface';
 import { Context } from '@midwayjs/koa';
+import { ServiceUtilService } from '../../service/serviceUtil.service';
 const namePrefix = '服务支撑';
 @ApiTags(['服务支撑'])
 @Controller('/support', { tagName: namePrefix })
@@ -17,6 +18,9 @@ export class SupportController implements BaseController {
   @Inject()
   ctx: Context;
 
+  @Inject()
+  serviceUtil: ServiceUtilService;
+
   @Get('/')
   @ApiTags('列表查询')
   @ApiQuery({ name: 'query' })
@@ -73,4 +77,12 @@ export class SupportController implements BaseController {
     const result = await this.service.delete({ id });
     return result;
   }
+
+  @Get('/detail/:id')
+  @ApiResponse({ type: FVO_support })
+  async detail(@Param('id') id: string) {
+    let data = await this.service.fetch({ id });
+    data = await this.serviceUtil.fillCollection(data);
+    return data;
+  }
 }