fix: 接口导入模块名太长导入失败
This commit is contained in:
parent
ea328759e6
commit
aade1c020d
|
@ -51,6 +51,9 @@ public class ApiScenarioImportUtil {
|
|||
|
||||
public static void createModule(ApiScenarioModule module) {
|
||||
ApiScenarioModuleService apiModuleService = CommonBeanFactory.getBean(ApiScenarioModuleService.class);
|
||||
if (module.getName().length() > 64) {
|
||||
module.setName(module.getName().substring(0, 64));
|
||||
}
|
||||
List<ApiScenarioModule> apiModules = apiModuleService.selectSameModule(module);
|
||||
if (CollectionUtils.isEmpty(apiModules)) {
|
||||
apiModuleService.addNode(module);
|
||||
|
|
|
@ -60,6 +60,9 @@ public class ApiDefinitionImportUtil {
|
|||
public static void createModule(ApiModule module) {
|
||||
ApiModuleService apiModuleService = CommonBeanFactory.getBean(ApiModuleService.class);
|
||||
module.setProtocol(RequestType.HTTP);
|
||||
if (module.getName().length() > 64) {
|
||||
module.setName(module.getName().substring(0, 64));
|
||||
}
|
||||
List<ApiModule> apiModules = apiModuleService.selectSameModule(module);
|
||||
if (CollectionUtils.isEmpty(apiModules)) {
|
||||
apiModuleService.addNode(module);
|
||||
|
|
Loading…
Reference in New Issue