lrf 2 лет назад
Родитель
Сommit
c1b6e1a62e
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      app/public/ts-template.js

+ 2 - 2
app/public/ts-template.js

@@ -53,7 +53,7 @@ const ServiceContext = (data) => {
 };
 const ControllerContext = (data) => {
   const fc = [];
-  const { name: table_name } = data;
+  const { name: table_name, zh } = data;
   const prefix = _.upperFirst(table_name);
   fc.push(`import { Body, Controller, Del, Get, Inject, Param, Post, Query } from '@midwayjs/decorator';`);
   fc.push(`import { BaseController } from 'free-midway-component';`);
@@ -61,7 +61,7 @@ const ControllerContext = (data) => {
   fc.push(`import { CreateDTO, CreateVO, FetchVO, QueryDTO, QueryVO, UpdateDTO, UpdateVO } from '../interface/${table_name}.interface';`);
   fc.push(`import { ApiResponse, ApiTags } from '@midwayjs/swagger';`);
   fc.push(`import { Validate } from '@midwayjs/validate';`);
-  fc.push(`@ApiTags(['团购商品设置'])`);
+  fc.push(`@ApiTags(['${zh}'])`);
   fc.push(`@Controller('/${prefix}')`);
   fc.push(`export class ${prefix}Controller extends BaseController {`);
   fc.push(`  @Inject()`);