|
@@ -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()`);
|