From bfc88364a72c33d35c6bab1f93e57f032de904fe Mon Sep 17 00:00:00 2001 From: wangmaojian Date: Wed, 31 Jul 2024 16:38:35 +0800 Subject: [PATCH 1/4] =?UTF-8?q?bff=E7=94=9F=E6=88=90=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bff-generator/pom.xml | 6 +++++- .../GetChildChangeConvertorGenerator.java | 9 ++++++--- .../VMDefalutFilterConditionGenereator.java | 5 ++++- .../querycondition/VMDefaultSortConditionGenerator.java | 5 ++++- .../method/GetChildDeserConvertorGenerator.java | 5 ++++- .../dataconverter/method/JsonSerializerGenerator.java | 5 ++++- .../rtgen/entitygenerator/BffEntityImplGenerator.java | 5 +++++ .../entitygenerator/method/GetChildEntityGenerator.java | 6 +++++- .../methodgenerators/CreateChildDataMethodGenerator.java | 5 ++++- .../converter/method/GetDefaultValueGenerator.java | 5 ++++- .../method/GetChildDataConvertorMethodGenerator.java | 6 ++++-- 11 files changed, 49 insertions(+), 13 deletions(-) diff --git a/bff-generator/pom.xml b/bff-generator/pom.xml index cfb18b2..355d2b0 100644 --- a/bff-generator/pom.xml +++ b/bff-generator/pom.xml @@ -32,7 +32,11 @@ 0.2.2-SNAPSHOT - + + com.inspur.edp + business-entity-generator-exception + 0.1.3 + com.inspur.edp cef-designtime-api diff --git a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/changeconvertor/methodgenerator/GetChildChangeConvertorGenerator.java b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/changeconvertor/methodgenerator/GetChildChangeConvertorGenerator.java index daeb19b..a53ae31 100644 --- a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/changeconvertor/methodgenerator/GetChildChangeConvertorGenerator.java +++ b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/changeconvertor/methodgenerator/GetChildChangeConvertorGenerator.java @@ -16,6 +16,8 @@ package com.inspur.edp.bff.designtime.generator.changeconvertor.methodgenerator; +import com.inspur.edp.bef.generator.exception.BefGenerationErrorCodeConst; +import com.inspur.edp.bef.generator.exception.BefGenerationException; import com.inspur.edp.bff.designtime.generator.changeconvertor.FSChangeConvertorGenContext; import com.inspur.edp.bff.spi.AbstractChangeConvertor; import com.inspur.edp.caf.generator.baseInfo.ParameterInfo; @@ -127,9 +129,10 @@ public class GetChildChangeConvertorGenerator extends ClassMethodGenerator { } private ThrowStatement getExceptionStatement() { - addImport(CefException.class.getTypeName()); - ThrowStatement statement = GeneratorUtil.getThrowStatement(ast,"不存在子表",paramChildCode,true); - + addImport(BefGenerationException.class.getTypeName()); +// ThrowStatement statement = GeneratorUtil.getThrowStatement(ast,"不存在子表",paramChildCode,true); + ThrowStatement statement=GeneratorUtil.getThrowBefExStatement(ast, null, + BefGenerationErrorCodeConst.GSP_BFF_GENERATION_0002, paramChildCode); // var invocation = ast.newClassInstanceCreation(); // invocation.setType(ast.newSimpleType(ast.newSimpleName("RuntimeException"))); // invocation.setType(new TypeInfo(RuntimeException.class).getType(ast, changeConvertorContext.getEntityGenContext())); diff --git a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/querycondition/VMDefalutFilterConditionGenereator.java b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/querycondition/VMDefalutFilterConditionGenereator.java index 1daf633..20f56b3 100644 --- a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/querycondition/VMDefalutFilterConditionGenereator.java +++ b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/querycondition/VMDefalutFilterConditionGenereator.java @@ -19,6 +19,7 @@ package com.inspur.edp.bff.designtime.generator.core.querycondition; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; +import com.inspur.edp.bef.generator.exception.BefGenerationErrorCodeConst; import com.inspur.edp.bff.designtime.generator.core.VmCoreGenContext; import com.inspur.edp.caf.generator.baseInfo.ParameterInfo; import com.inspur.edp.caf.generator.baseInfo.TypeInfo; @@ -134,7 +135,9 @@ public class VMDefalutFilterConditionGenereator extends ClassMethodGenerator { singleVar.setName(ast.newSimpleName("e")); catchClause.setException(singleVar); addImport(CefException.class.getTypeName()); - ThrowStatement throwStatement= GeneratorUtil.getThrowStatementWithMessage(ast,"过滤条件反序列化失败!"); +// ThrowStatement throwStatement= GeneratorUtil.getThrowStatementWithMessage(ast,"过滤条件反序列化失败!"); + ThrowStatement throwStatement=GeneratorUtil.getThrowBefExStatement(ast, null, + BefGenerationErrorCodeConst.GSP_BFF_GENERATION_0001); // ClassInstanceCreation creation1=ast.newClassInstanceCreation(); // creation1.setType(ast.newSimpleType(ast.newName(RuntimeException.class.getTypeName()))); // diff --git a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/querycondition/VMDefaultSortConditionGenerator.java b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/querycondition/VMDefaultSortConditionGenerator.java index a4fa7bc..da13adb 100644 --- a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/querycondition/VMDefaultSortConditionGenerator.java +++ b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/querycondition/VMDefaultSortConditionGenerator.java @@ -19,6 +19,7 @@ package com.inspur.edp.bff.designtime.generator.core.querycondition; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; +import com.inspur.edp.bef.generator.exception.BefGenerationErrorCodeConst; import com.inspur.edp.bff.designtime.generator.core.VmCoreGenContext; import com.inspur.edp.caf.generator.baseInfo.ParameterInfo; import com.inspur.edp.caf.generator.baseInfo.TypeInfo; @@ -154,7 +155,9 @@ public class VMDefaultSortConditionGenerator extends ClassMethodGenerator { singleVar.setName(ast.newSimpleName("e")); catchClause.setException(singleVar); addImport(CefException.class.getTypeName()); - ThrowStatement throwStatement= GeneratorUtil.getThrowStatementWithMessage(ast,"排序条件反序列化失败!"); +// ThrowStatement throwStatement= GeneratorUtil.getThrowStatementWithMessage(ast,"排序条件反序列化失败!"); + ThrowStatement throwStatement=GeneratorUtil.getThrowBefExStatement(ast, null, + BefGenerationErrorCodeConst.GSP_BFF_GENERATION_0003); // ClassInstanceCreation creation1=ast.newClassInstanceCreation(); // creation1.setType(ast.newSimpleType(ast.newName(RuntimeException.class.getTypeName()))); // diff --git a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/dataconverter/method/GetChildDeserConvertorGenerator.java b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/dataconverter/method/GetChildDeserConvertorGenerator.java index 9cab025..c4020e2 100644 --- a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/dataconverter/method/GetChildDeserConvertorGenerator.java +++ b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/dataconverter/method/GetChildDeserConvertorGenerator.java @@ -25,6 +25,7 @@ import com.inspur.edp.cef.generator.coreGenerator.base.serializer.dataser.deseri import com.inspur.edp.cef.generator.overall.GeneratorUtil; import com.inspur.edp.cef.spi.jsonser.util.SerializerUtil; import com.inspur.edp.commonmodel.spi.AbstractEntityDataDeSerializer; +import com.inspur.edp.bef.generator.exception.BefGenerationErrorCodeConst; import org.eclipse.jdt.core.dom.*; import java.util.ArrayList; @@ -50,7 +51,9 @@ public class GetChildDeserConvertorGenerator extends ClassMethodGenerator { private void buildThowExceptionStatement(Block block) { addImport(CefException.class.getTypeName()); - ThrowStatement throwStatement = GeneratorUtil.getThrowStatement(ast,null); +// ThrowStatement throwStatement = GeneratorUtil.getThrowStatement(ast,null); + ThrowStatement throwStatement=GeneratorUtil.getThrowBefExStatement(ast, null, + "BFF异常1", paramChildCode); // ClassInstanceCreation classInstanceCreation = ast.newClassInstanceCreation(); // classInstanceCreation.setType(new TypeInfo(RuntimeException.class).getType(ast)); // throwStatement.setExpression(classInstanceCreation); diff --git a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/dataconverter/method/JsonSerializerGenerator.java b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/dataconverter/method/JsonSerializerGenerator.java index a40f5c3..b85ac8e 100644 --- a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/dataconverter/method/JsonSerializerGenerator.java +++ b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/dataconverter/method/JsonSerializerGenerator.java @@ -17,6 +17,7 @@ package com.inspur.edp.bff.designtime.generator.core.rtgen.dataconverter.method; import com.fasterxml.jackson.databind.JsonSerializer; +import com.inspur.edp.bef.generator.exception.BefGenerationErrorCodeConst; import com.inspur.edp.bff.designtime.generator.core.VmCoreGenContext; import com.inspur.edp.caf.generator.baseInfo.ParameterInfo; import com.inspur.edp.caf.generator.baseInfo.TypeInfo; @@ -57,7 +58,9 @@ public class JsonSerializerGenerator extends ClassMethodGenerator { MethodInvocation methodInvocation = ast.newMethodInvocation(); methodInvocation.setExpression(ast.newSimpleName(methodParam())); methodInvocation.setName(ast.newSimpleName("getClass")); - ThrowStatement throwStatement = GeneratorUtil.getThrowStatement(ast,"获取序列化器失败 ClassName:",methodInvocation,true); +// ThrowStatement throwStatement = GeneratorUtil.getThrowStatement(ast,"获取序列化器失败 ClassName:",methodInvocation,true); + ThrowStatement throwStatement= GeneratorUtil.getThrowBefExStatement(ast, null, + BefGenerationErrorCodeConst.GSP_BFF_GENERATION_0005); // ClassInstanceCreation classInstanceCreation = ast.newClassInstanceCreation(); // classInstanceCreation.setType(new TypeInfo(RuntimeException.class).getType(ast)); // InfixExpression infixExpression = ast.newInfixExpression(); diff --git a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/entitygenerator/BffEntityImplGenerator.java b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/entitygenerator/BffEntityImplGenerator.java index baf60a8..fa7c63f 100644 --- a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/entitygenerator/BffEntityImplGenerator.java +++ b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/entitygenerator/BffEntityImplGenerator.java @@ -99,6 +99,11 @@ public class BffEntityImplGenerator extends EntityImplGenerator { return null; } + @Override + protected ClassMethodGenerator getCreateAfterSaveDtmAssMethodGenerator() { + return null; + } + @Override protected ClassMethodGenerator getCreateAfterModifyValAssMethodGenerator() { return null; diff --git a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/entitygenerator/method/GetChildEntityGenerator.java b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/entitygenerator/method/GetChildEntityGenerator.java index 2e7457a..72786a9 100644 --- a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/entitygenerator/method/GetChildEntityGenerator.java +++ b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/entitygenerator/method/GetChildEntityGenerator.java @@ -17,12 +17,14 @@ package com.inspur.edp.bff.designtime.generator.core.rtgen.entitygenerator.method; +import com.inspur.edp.bef.generator.exception.BefGenerationErrorCodeConst; import com.inspur.edp.caf.generator.baseInfo.AnnotationInfo; import com.inspur.edp.caf.generator.baseInfo.ParameterInfo; import com.inspur.edp.caf.generator.baseInfo.TypeInfo; import com.inspur.edp.caf.generator.method.ClassMethodGenerator; import com.inspur.edp.cef.api.dataType.entity.ICefEntity; import com.inspur.edp.cef.api.message.CefException; +import com.inspur.edp.cef.generator.overall.GeneratorUtil; import com.inspur.edp.cef.generator.repository.RepositoryGenUtil; import org.eclipse.jdt.core.dom.*; @@ -112,7 +114,9 @@ public class GetChildEntityGenerator extends ClassMethodGenerator { SwitchCase defaultCase = ast.newSwitchCase(); defaultCase.setExpression(null); addImport(CefException.class.getTypeName()); - Statement throwRuntimeException = RepositoryGenUtil.createThrowRuntimeException(ast, RepositoryGenUtil.createStringLiteral(ast, "找不到子节点")); +// Statement throwRuntimeException = RepositoryGenUtil.createThrowRuntimeException(ast, RepositoryGenUtil.createStringLiteral(ast, "找不到子节点")); + ThrowStatement throwRuntimeException= GeneratorUtil.getThrowBefExStatement(ast, null, + BefGenerationErrorCodeConst.GSP_BFF_GENERATION_0004); statements.add(defaultCase); statements.add(throwRuntimeException); } diff --git a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/managergenerator/mgrImplclass/methodgenerators/CreateChildDataMethodGenerator.java b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/managergenerator/mgrImplclass/methodgenerators/CreateChildDataMethodGenerator.java index 5d86aa5..9c010aa 100644 --- a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/managergenerator/mgrImplclass/methodgenerators/CreateChildDataMethodGenerator.java +++ b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/managergenerator/mgrImplclass/methodgenerators/CreateChildDataMethodGenerator.java @@ -17,6 +17,7 @@ package com.inspur.edp.bff.designtime.generator.core.rtgen.managergenerator.mgrImplclass.methodgenerators; +import com.inspur.edp.bef.generator.exception.BefGenerationErrorCodeConst; import com.inspur.edp.bff.designtime.generator.core.rtgen.managergenerator.mgrImplclass.FSMgrImplGenContext; import com.inspur.edp.bff.designtime.generator.core.rtgen.typeinfo.FSDataClassTypeInfo; import com.inspur.edp.caf.generator.baseInfo.ParameterInfo; @@ -193,7 +194,9 @@ public class CreateChildDataMethodGenerator extends CreateDataCoreGenerator { //====== private void addThrowNotSupportChildCodeException(Block block) { addImport(CefException.class.getTypeName()); - ThrowStatement throwStatement = GeneratorUtil.getThrowStatement(ast,"不存在子表",param_ChildCode,true); +// ThrowStatement throwStatement = GeneratorUtil.getThrowStatement(ast,"不存在子表",param_ChildCode,true); + ThrowStatement throwStatement=GeneratorUtil.getThrowBefExStatement(ast, null, + BefGenerationErrorCodeConst.GSP_BFF_GENERATION_0002, param_ChildCode); block.statements().add(throwStatement); } diff --git a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/defaultvalue/converter/method/GetDefaultValueGenerator.java b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/defaultvalue/converter/method/GetDefaultValueGenerator.java index 2be7206..d602135 100644 --- a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/defaultvalue/converter/method/GetDefaultValueGenerator.java +++ b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/defaultvalue/converter/method/GetDefaultValueGenerator.java @@ -17,6 +17,7 @@ package com.inspur.edp.bff.designtime.generator.defaultvalue.converter.method; import com.fasterxml.jackson.core.JsonParser; +import com.inspur.edp.bef.generator.exception.BefGenerationErrorCodeConst; import com.inspur.edp.bff.designtime.generator.VmGeneratorContext; import com.inspur.edp.bff.designtime.generator.common.VMChangeJsonConvertorGenUtils; import com.inspur.edp.caf.generator.baseInfo.ParameterInfo; @@ -208,7 +209,9 @@ public class GetDefaultValueGenerator extends ClassMethodGenerator { caseExpression.setExpression(null); result.statements().add(caseExpression); addImport(CefException.class.getTypeName()); - ThrowStatement throwStatement = GeneratorUtil.getThrowStatement(ast,null); +// ThrowStatement throwStatement = GeneratorUtil.getThrowStatement(ast,null); + ThrowStatement throwStatement=GeneratorUtil.getThrowBefExStatement(ast, null, + BefGenerationErrorCodeConst.GSP_BFF_GENERATION_0006 ); // ClassInstanceCreation creation = ast.newClassInstanceCreation(); // creation.setType(new TypeInfo(RuntimeException.class).getType(ast, vmContext.getEntityContext())); // ThrowStatement throwStatement = ast.newThrowStatement(); diff --git a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/entitydataconvertor/method/GetChildDataConvertorMethodGenerator.java b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/entitydataconvertor/method/GetChildDataConvertorMethodGenerator.java index e48c762..efc02c6 100644 --- a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/entitydataconvertor/method/GetChildDataConvertorMethodGenerator.java +++ b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/entitydataconvertor/method/GetChildDataConvertorMethodGenerator.java @@ -17,6 +17,7 @@ package com.inspur.edp.bff.designtime.generator.entitydataconvertor.method; +import com.inspur.edp.bef.generator.exception.BefGenerationErrorCodeConst; import com.inspur.edp.bff.designtime.generator.entitydataconvertor.VMObjectDataConvertorGenContext; import com.inspur.edp.caf.generator.baseInfo.ParameterInfo; import com.inspur.edp.caf.generator.baseInfo.TypeInfo; @@ -171,8 +172,9 @@ public class GetChildDataConvertorMethodGenerator extends ClassMethodGenerator { private ThrowStatement getExceptionStatement() { addImport(CefException.class.getTypeName()); - ThrowStatement statement = GeneratorUtil.getThrowStatement(ast,"不存在子表",param_ChildCode,true); - +// ThrowStatement statement = GeneratorUtil.getThrowStatement(ast,"不存在子表",param_ChildCode,true); + ThrowStatement statement=GeneratorUtil.getThrowBefExStatement(ast, null, + BefGenerationErrorCodeConst.GSP_BFF_GENERATION_0002, param_ChildCode); // ClassInstanceCreation invocation = ast.newClassInstanceCreation(); // //invocation.setType(ast.newSimpleType(ast.newSimpleName("RuntimeException"))); // invocation.setType(new TypeInfo(RuntimeException.class).getType(ast, voDataConvertorGenContext.getEntityGenContext())); -- Gitee From 27c790c90b07a3a27141ea787fdfabcd65cfaf5f Mon Sep 17 00:00:00 2001 From: wangmaojian Date: Sat, 3 Aug 2024 16:45:18 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E5=BC=95=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../querycondition/VMDefalutFilterConditionGenereator.java | 3 ++- .../core/querycondition/VMDefaultSortConditionGenerator.java | 3 ++- .../dataconverter/method/GetChildDeserConvertorGenerator.java | 3 ++- .../rtgen/dataconverter/method/JsonSerializerGenerator.java | 3 ++- .../rtgen/entitygenerator/method/GetChildEntityGenerator.java | 3 ++- .../methodgenerators/CreateChildDataMethodGenerator.java | 3 ++- .../converter/method/GetDefaultValueGenerator.java | 3 ++- .../method/GetChildDataConvertorMethodGenerator.java | 3 ++- 8 files changed, 16 insertions(+), 8 deletions(-) diff --git a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/querycondition/VMDefalutFilterConditionGenereator.java b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/querycondition/VMDefalutFilterConditionGenereator.java index 20f56b3..26ae09c 100644 --- a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/querycondition/VMDefalutFilterConditionGenereator.java +++ b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/querycondition/VMDefalutFilterConditionGenereator.java @@ -20,6 +20,7 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; import com.inspur.edp.bef.generator.exception.BefGenerationErrorCodeConst; +import com.inspur.edp.bef.generator.exception.BefGenerationException; import com.inspur.edp.bff.designtime.generator.core.VmCoreGenContext; import com.inspur.edp.caf.generator.baseInfo.ParameterInfo; import com.inspur.edp.caf.generator.baseInfo.TypeInfo; @@ -134,7 +135,7 @@ public class VMDefalutFilterConditionGenereator extends ClassMethodGenerator { singleVar.setType(ast.newSimpleType(ast.newName(JsonProcessingException.class.getTypeName()))); singleVar.setName(ast.newSimpleName("e")); catchClause.setException(singleVar); - addImport(CefException.class.getTypeName()); + addImport(BefGenerationException.class.getTypeName()); // ThrowStatement throwStatement= GeneratorUtil.getThrowStatementWithMessage(ast,"过滤条件反序列化失败!"); ThrowStatement throwStatement=GeneratorUtil.getThrowBefExStatement(ast, null, BefGenerationErrorCodeConst.GSP_BFF_GENERATION_0001); diff --git a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/querycondition/VMDefaultSortConditionGenerator.java b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/querycondition/VMDefaultSortConditionGenerator.java index da13adb..9584517 100644 --- a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/querycondition/VMDefaultSortConditionGenerator.java +++ b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/querycondition/VMDefaultSortConditionGenerator.java @@ -20,6 +20,7 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; import com.inspur.edp.bef.generator.exception.BefGenerationErrorCodeConst; +import com.inspur.edp.bef.generator.exception.BefGenerationException; import com.inspur.edp.bff.designtime.generator.core.VmCoreGenContext; import com.inspur.edp.caf.generator.baseInfo.ParameterInfo; import com.inspur.edp.caf.generator.baseInfo.TypeInfo; @@ -154,7 +155,7 @@ public class VMDefaultSortConditionGenerator extends ClassMethodGenerator { singleVar.setType(ast.newSimpleType(ast.newName(JsonProcessingException.class.getTypeName()))); singleVar.setName(ast.newSimpleName("e")); catchClause.setException(singleVar); - addImport(CefException.class.getTypeName()); + addImport(BefGenerationException.class.getTypeName()); // ThrowStatement throwStatement= GeneratorUtil.getThrowStatementWithMessage(ast,"排序条件反序列化失败!"); ThrowStatement throwStatement=GeneratorUtil.getThrowBefExStatement(ast, null, BefGenerationErrorCodeConst.GSP_BFF_GENERATION_0003); diff --git a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/dataconverter/method/GetChildDeserConvertorGenerator.java b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/dataconverter/method/GetChildDeserConvertorGenerator.java index c4020e2..68734f2 100644 --- a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/dataconverter/method/GetChildDeserConvertorGenerator.java +++ b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/dataconverter/method/GetChildDeserConvertorGenerator.java @@ -16,6 +16,7 @@ package com.inspur.edp.bff.designtime.generator.core.rtgen.dataconverter.method; +import com.inspur.edp.bef.generator.exception.BefGenerationException; import com.inspur.edp.caf.generator.baseInfo.ParameterInfo; import com.inspur.edp.caf.generator.baseInfo.TypeInfo; import com.inspur.edp.caf.generator.method.ClassMethodGenerator; @@ -50,7 +51,7 @@ public class GetChildDeserConvertorGenerator extends ClassMethodGenerator { } private void buildThowExceptionStatement(Block block) { - addImport(CefException.class.getTypeName()); + addImport(BefGenerationException.class.getTypeName()); // ThrowStatement throwStatement = GeneratorUtil.getThrowStatement(ast,null); ThrowStatement throwStatement=GeneratorUtil.getThrowBefExStatement(ast, null, "BFF异常1", paramChildCode); diff --git a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/dataconverter/method/JsonSerializerGenerator.java b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/dataconverter/method/JsonSerializerGenerator.java index b85ac8e..f7d2b49 100644 --- a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/dataconverter/method/JsonSerializerGenerator.java +++ b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/dataconverter/method/JsonSerializerGenerator.java @@ -18,6 +18,7 @@ package com.inspur.edp.bff.designtime.generator.core.rtgen.dataconverter.method; import com.fasterxml.jackson.databind.JsonSerializer; import com.inspur.edp.bef.generator.exception.BefGenerationErrorCodeConst; +import com.inspur.edp.bef.generator.exception.BefGenerationException; import com.inspur.edp.bff.designtime.generator.core.VmCoreGenContext; import com.inspur.edp.caf.generator.baseInfo.ParameterInfo; import com.inspur.edp.caf.generator.baseInfo.TypeInfo; @@ -54,7 +55,7 @@ public class JsonSerializerGenerator extends ClassMethodGenerator { } private void buildThowExceptionStatement(Block block) { - addImport(CefException.class.getTypeName()); + addImport(BefGenerationException.class.getTypeName()); MethodInvocation methodInvocation = ast.newMethodInvocation(); methodInvocation.setExpression(ast.newSimpleName(methodParam())); methodInvocation.setName(ast.newSimpleName("getClass")); diff --git a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/entitygenerator/method/GetChildEntityGenerator.java b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/entitygenerator/method/GetChildEntityGenerator.java index 72786a9..b14f519 100644 --- a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/entitygenerator/method/GetChildEntityGenerator.java +++ b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/entitygenerator/method/GetChildEntityGenerator.java @@ -18,6 +18,7 @@ package com.inspur.edp.bff.designtime.generator.core.rtgen.entitygenerator.metho import com.inspur.edp.bef.generator.exception.BefGenerationErrorCodeConst; +import com.inspur.edp.bef.generator.exception.BefGenerationException; import com.inspur.edp.caf.generator.baseInfo.AnnotationInfo; import com.inspur.edp.caf.generator.baseInfo.ParameterInfo; import com.inspur.edp.caf.generator.baseInfo.TypeInfo; @@ -113,7 +114,7 @@ public class GetChildEntityGenerator extends ClassMethodGenerator { private void addDefautSection(ArrayList statements) { SwitchCase defaultCase = ast.newSwitchCase(); defaultCase.setExpression(null); - addImport(CefException.class.getTypeName()); + addImport(BefGenerationException.class.getTypeName()); // Statement throwRuntimeException = RepositoryGenUtil.createThrowRuntimeException(ast, RepositoryGenUtil.createStringLiteral(ast, "找不到子节点")); ThrowStatement throwRuntimeException= GeneratorUtil.getThrowBefExStatement(ast, null, BefGenerationErrorCodeConst.GSP_BFF_GENERATION_0004); diff --git a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/managergenerator/mgrImplclass/methodgenerators/CreateChildDataMethodGenerator.java b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/managergenerator/mgrImplclass/methodgenerators/CreateChildDataMethodGenerator.java index 9c010aa..bdd0e4d 100644 --- a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/managergenerator/mgrImplclass/methodgenerators/CreateChildDataMethodGenerator.java +++ b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/managergenerator/mgrImplclass/methodgenerators/CreateChildDataMethodGenerator.java @@ -18,6 +18,7 @@ package com.inspur.edp.bff.designtime.generator.core.rtgen.managergenerator.mgrI import com.inspur.edp.bef.generator.exception.BefGenerationErrorCodeConst; +import com.inspur.edp.bef.generator.exception.BefGenerationException; import com.inspur.edp.bff.designtime.generator.core.rtgen.managergenerator.mgrImplclass.FSMgrImplGenContext; import com.inspur.edp.bff.designtime.generator.core.rtgen.typeinfo.FSDataClassTypeInfo; import com.inspur.edp.caf.generator.baseInfo.ParameterInfo; @@ -193,7 +194,7 @@ public class CreateChildDataMethodGenerator extends CreateDataCoreGenerator { //====== private void addThrowNotSupportChildCodeException(Block block) { - addImport(CefException.class.getTypeName()); + addImport(BefGenerationException.class.getTypeName()); // ThrowStatement throwStatement = GeneratorUtil.getThrowStatement(ast,"不存在子表",param_ChildCode,true); ThrowStatement throwStatement=GeneratorUtil.getThrowBefExStatement(ast, null, BefGenerationErrorCodeConst.GSP_BFF_GENERATION_0002, param_ChildCode); diff --git a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/defaultvalue/converter/method/GetDefaultValueGenerator.java b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/defaultvalue/converter/method/GetDefaultValueGenerator.java index d602135..d1aab3d 100644 --- a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/defaultvalue/converter/method/GetDefaultValueGenerator.java +++ b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/defaultvalue/converter/method/GetDefaultValueGenerator.java @@ -18,6 +18,7 @@ package com.inspur.edp.bff.designtime.generator.defaultvalue.converter.method; import com.fasterxml.jackson.core.JsonParser; import com.inspur.edp.bef.generator.exception.BefGenerationErrorCodeConst; +import com.inspur.edp.bef.generator.exception.BefGenerationException; import com.inspur.edp.bff.designtime.generator.VmGeneratorContext; import com.inspur.edp.bff.designtime.generator.common.VMChangeJsonConvertorGenUtils; import com.inspur.edp.caf.generator.baseInfo.ParameterInfo; @@ -208,7 +209,7 @@ public class GetDefaultValueGenerator extends ClassMethodGenerator { var caseExpression = ast.newSwitchCase(); caseExpression.setExpression(null); result.statements().add(caseExpression); - addImport(CefException.class.getTypeName()); + addImport(BefGenerationException.class.getTypeName()); // ThrowStatement throwStatement = GeneratorUtil.getThrowStatement(ast,null); ThrowStatement throwStatement=GeneratorUtil.getThrowBefExStatement(ast, null, BefGenerationErrorCodeConst.GSP_BFF_GENERATION_0006 ); diff --git a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/entitydataconvertor/method/GetChildDataConvertorMethodGenerator.java b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/entitydataconvertor/method/GetChildDataConvertorMethodGenerator.java index efc02c6..ea26009 100644 --- a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/entitydataconvertor/method/GetChildDataConvertorMethodGenerator.java +++ b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/entitydataconvertor/method/GetChildDataConvertorMethodGenerator.java @@ -18,6 +18,7 @@ package com.inspur.edp.bff.designtime.generator.entitydataconvertor.method; import com.inspur.edp.bef.generator.exception.BefGenerationErrorCodeConst; +import com.inspur.edp.bef.generator.exception.BefGenerationException; import com.inspur.edp.bff.designtime.generator.entitydataconvertor.VMObjectDataConvertorGenContext; import com.inspur.edp.caf.generator.baseInfo.ParameterInfo; import com.inspur.edp.caf.generator.baseInfo.TypeInfo; @@ -171,7 +172,7 @@ public class GetChildDataConvertorMethodGenerator extends ClassMethodGenerator { } private ThrowStatement getExceptionStatement() { - addImport(CefException.class.getTypeName()); + addImport(BefGenerationException.class.getTypeName()); // ThrowStatement statement = GeneratorUtil.getThrowStatement(ast,"不存在子表",param_ChildCode,true); ThrowStatement statement=GeneratorUtil.getThrowBefExStatement(ast, null, BefGenerationErrorCodeConst.GSP_BFF_GENERATION_0002, param_ChildCode); -- Gitee From 7238f8941d855697840a95a935d255ace4bd1b18 Mon Sep 17 00:00:00 2001 From: wangmaojian Date: Sat, 3 Aug 2024 17:02:45 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E5=B8=B8=E9=87=8F=E7=B1=BB=E5=BC=95=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../methodgenerator/GetChildChangeConvertorGenerator.java | 1 + .../core/querycondition/VMDefalutFilterConditionGenereator.java | 1 + .../core/querycondition/VMDefaultSortConditionGenerator.java | 1 + .../dataconverter/method/GetChildDeserConvertorGenerator.java | 1 + .../core/rtgen/dataconverter/method/JsonSerializerGenerator.java | 1 + .../methodgenerators/CreateChildDataMethodGenerator.java | 1 + .../defaultvalue/converter/method/GetDefaultValueGenerator.java | 1 + .../method/GetChildDataConvertorMethodGenerator.java | 1 + 8 files changed, 8 insertions(+) diff --git a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/changeconvertor/methodgenerator/GetChildChangeConvertorGenerator.java b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/changeconvertor/methodgenerator/GetChildChangeConvertorGenerator.java index a53ae31..8af1a6c 100644 --- a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/changeconvertor/methodgenerator/GetChildChangeConvertorGenerator.java +++ b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/changeconvertor/methodgenerator/GetChildChangeConvertorGenerator.java @@ -130,6 +130,7 @@ public class GetChildChangeConvertorGenerator extends ClassMethodGenerator { private ThrowStatement getExceptionStatement() { addImport(BefGenerationException.class.getTypeName()); + addImport(BefGenerationErrorCodeConst.class.getTypeName()); // ThrowStatement statement = GeneratorUtil.getThrowStatement(ast,"不存在子表",paramChildCode,true); ThrowStatement statement=GeneratorUtil.getThrowBefExStatement(ast, null, BefGenerationErrorCodeConst.GSP_BFF_GENERATION_0002, paramChildCode); diff --git a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/querycondition/VMDefalutFilterConditionGenereator.java b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/querycondition/VMDefalutFilterConditionGenereator.java index 26ae09c..6036d1b 100644 --- a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/querycondition/VMDefalutFilterConditionGenereator.java +++ b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/querycondition/VMDefalutFilterConditionGenereator.java @@ -136,6 +136,7 @@ public class VMDefalutFilterConditionGenereator extends ClassMethodGenerator { singleVar.setName(ast.newSimpleName("e")); catchClause.setException(singleVar); addImport(BefGenerationException.class.getTypeName()); + addImport(BefGenerationErrorCodeConst.class.getTypeName()); // ThrowStatement throwStatement= GeneratorUtil.getThrowStatementWithMessage(ast,"过滤条件反序列化失败!"); ThrowStatement throwStatement=GeneratorUtil.getThrowBefExStatement(ast, null, BefGenerationErrorCodeConst.GSP_BFF_GENERATION_0001); diff --git a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/querycondition/VMDefaultSortConditionGenerator.java b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/querycondition/VMDefaultSortConditionGenerator.java index 9584517..863b77a 100644 --- a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/querycondition/VMDefaultSortConditionGenerator.java +++ b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/querycondition/VMDefaultSortConditionGenerator.java @@ -156,6 +156,7 @@ public class VMDefaultSortConditionGenerator extends ClassMethodGenerator { singleVar.setName(ast.newSimpleName("e")); catchClause.setException(singleVar); addImport(BefGenerationException.class.getTypeName()); + addImport(BefGenerationErrorCodeConst.class.getTypeName()); // ThrowStatement throwStatement= GeneratorUtil.getThrowStatementWithMessage(ast,"排序条件反序列化失败!"); ThrowStatement throwStatement=GeneratorUtil.getThrowBefExStatement(ast, null, BefGenerationErrorCodeConst.GSP_BFF_GENERATION_0003); diff --git a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/dataconverter/method/GetChildDeserConvertorGenerator.java b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/dataconverter/method/GetChildDeserConvertorGenerator.java index 68734f2..7671509 100644 --- a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/dataconverter/method/GetChildDeserConvertorGenerator.java +++ b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/dataconverter/method/GetChildDeserConvertorGenerator.java @@ -52,6 +52,7 @@ public class GetChildDeserConvertorGenerator extends ClassMethodGenerator { private void buildThowExceptionStatement(Block block) { addImport(BefGenerationException.class.getTypeName()); + addImport(BefGenerationErrorCodeConst.class.getTypeName()); // ThrowStatement throwStatement = GeneratorUtil.getThrowStatement(ast,null); ThrowStatement throwStatement=GeneratorUtil.getThrowBefExStatement(ast, null, "BFF异常1", paramChildCode); diff --git a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/dataconverter/method/JsonSerializerGenerator.java b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/dataconverter/method/JsonSerializerGenerator.java index f7d2b49..47f88e8 100644 --- a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/dataconverter/method/JsonSerializerGenerator.java +++ b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/dataconverter/method/JsonSerializerGenerator.java @@ -56,6 +56,7 @@ public class JsonSerializerGenerator extends ClassMethodGenerator { private void buildThowExceptionStatement(Block block) { addImport(BefGenerationException.class.getTypeName()); + addImport(BefGenerationErrorCodeConst.class.getTypeName()); MethodInvocation methodInvocation = ast.newMethodInvocation(); methodInvocation.setExpression(ast.newSimpleName(methodParam())); methodInvocation.setName(ast.newSimpleName("getClass")); diff --git a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/managergenerator/mgrImplclass/methodgenerators/CreateChildDataMethodGenerator.java b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/managergenerator/mgrImplclass/methodgenerators/CreateChildDataMethodGenerator.java index bdd0e4d..d822fc2 100644 --- a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/managergenerator/mgrImplclass/methodgenerators/CreateChildDataMethodGenerator.java +++ b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/managergenerator/mgrImplclass/methodgenerators/CreateChildDataMethodGenerator.java @@ -195,6 +195,7 @@ public class CreateChildDataMethodGenerator extends CreateDataCoreGenerator { //====== private void addThrowNotSupportChildCodeException(Block block) { addImport(BefGenerationException.class.getTypeName()); + addImport(BefGenerationErrorCodeConst.class.getTypeName()); // ThrowStatement throwStatement = GeneratorUtil.getThrowStatement(ast,"不存在子表",param_ChildCode,true); ThrowStatement throwStatement=GeneratorUtil.getThrowBefExStatement(ast, null, BefGenerationErrorCodeConst.GSP_BFF_GENERATION_0002, param_ChildCode); diff --git a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/defaultvalue/converter/method/GetDefaultValueGenerator.java b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/defaultvalue/converter/method/GetDefaultValueGenerator.java index d1aab3d..727829a 100644 --- a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/defaultvalue/converter/method/GetDefaultValueGenerator.java +++ b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/defaultvalue/converter/method/GetDefaultValueGenerator.java @@ -210,6 +210,7 @@ public class GetDefaultValueGenerator extends ClassMethodGenerator { caseExpression.setExpression(null); result.statements().add(caseExpression); addImport(BefGenerationException.class.getTypeName()); + addImport(BefGenerationErrorCodeConst.class.getTypeName()); // ThrowStatement throwStatement = GeneratorUtil.getThrowStatement(ast,null); ThrowStatement throwStatement=GeneratorUtil.getThrowBefExStatement(ast, null, BefGenerationErrorCodeConst.GSP_BFF_GENERATION_0006 ); diff --git a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/entitydataconvertor/method/GetChildDataConvertorMethodGenerator.java b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/entitydataconvertor/method/GetChildDataConvertorMethodGenerator.java index ea26009..e4c5f1c 100644 --- a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/entitydataconvertor/method/GetChildDataConvertorMethodGenerator.java +++ b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/entitydataconvertor/method/GetChildDataConvertorMethodGenerator.java @@ -173,6 +173,7 @@ public class GetChildDataConvertorMethodGenerator extends ClassMethodGenerator { private ThrowStatement getExceptionStatement() { addImport(BefGenerationException.class.getTypeName()); + addImport(BefGenerationErrorCodeConst.class.getTypeName()); // ThrowStatement statement = GeneratorUtil.getThrowStatement(ast,"不存在子表",param_ChildCode,true); ThrowStatement statement=GeneratorUtil.getThrowBefExStatement(ast, null, BefGenerationErrorCodeConst.GSP_BFF_GENERATION_0002, param_ChildCode); -- Gitee From c5ddfab6cd452f891b198b08b98a710da2cca808 Mon Sep 17 00:00:00 2001 From: wangmaojian Date: Sat, 3 Aug 2024 17:08:09 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E5=B8=B8=E9=87=8F=E7=B1=BB=E5=BC=95=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rtgen/entitygenerator/method/GetChildEntityGenerator.java | 1 + 1 file changed, 1 insertion(+) diff --git a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/entitygenerator/method/GetChildEntityGenerator.java b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/entitygenerator/method/GetChildEntityGenerator.java index b14f519..b01b50c 100644 --- a/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/entitygenerator/method/GetChildEntityGenerator.java +++ b/bff-generator/src/main/java/com/inspur/edp/bff/designtime/generator/core/rtgen/entitygenerator/method/GetChildEntityGenerator.java @@ -115,6 +115,7 @@ public class GetChildEntityGenerator extends ClassMethodGenerator { SwitchCase defaultCase = ast.newSwitchCase(); defaultCase.setExpression(null); addImport(BefGenerationException.class.getTypeName()); + addImport(BefGenerationErrorCodeConst.class.getTypeName()); // Statement throwRuntimeException = RepositoryGenUtil.createThrowRuntimeException(ast, RepositoryGenUtil.createStringLiteral(ast, "找不到子节点")); ThrowStatement throwRuntimeException= GeneratorUtil.getThrowBefExStatement(ast, null, BefGenerationErrorCodeConst.GSP_BFF_GENERATION_0004); -- Gitee