diff --git a/backend/plugin/code_generator/api/v1/business.py b/backend/plugin/code_generator/api/v1/business.py index cc51b532..25db1685 100644 --- a/backend/plugin/code_generator/api/v1/business.py +++ b/backend/plugin/code_generator/api/v1/business.py @@ -63,7 +63,6 @@ async def get_business_all_columns( @router.post( '', summary='创建代码生成业务', - deprecated=True, dependencies=[ Depends(RequestPermission('codegen:business:add')), DependsRBAC, diff --git a/backend/plugin/code_generator/service/gen_service.py b/backend/plugin/code_generator/service/gen_service.py index 37c3b144..63a4ff76 100644 --- a/backend/plugin/code_generator/service/gen_service.py +++ b/backend/plugin/code_generator/service/gen_service.py @@ -66,7 +66,11 @@ class GenService: raise errors.ConflictError(msg='已存在相同数据库表业务') table_name = table_info['table_name'] - doc_comment = table_info['table_comment'] or table_name.split('_')[-1] + doc_comment = ( + table_info['table_comment'][:-1] + if table_info['table_comment'][-1] == '表' + else table_info['table_comment'] or table_name.split('_')[-1] + ) new_business = GenBusiness( **CreateGenBusinessParam( app_name=obj.app,