fix(接口测试): 后置脚本中,是否引用公共脚本无法保存成功

This commit is contained in:
AgAngle 2024-12-17 17:36:14 +08:00 committed by 刘瑞斌
parent 80be2bb343
commit 773acd7937
3 changed files with 3 additions and 2 deletions

View File

@ -46,7 +46,6 @@ public class MsScriptAssertion extends MsAssertion {
} }
} }
@JsonIgnore
public boolean isEnableCommonScript() { public boolean isEnableCommonScript() {
return BooleanUtils.isTrue(enableCommonScript); return BooleanUtils.isTrue(enableCommonScript);
} }

View File

@ -54,7 +54,6 @@ public class ScriptProcessor extends MsProcessor {
} }
} }
@JsonIgnore
public boolean isEnableCommonScript() { public boolean isEnableCommonScript() {
return BooleanUtils.isTrue(enableCommonScript); return BooleanUtils.isTrue(enableCommonScript);
} }

View File

@ -296,6 +296,9 @@ public class FileAssociationService {
Map<String,String> fileIdMap = new HashMap<>(); Map<String,String> fileIdMap = new HashMap<>();
for (FileAssociation fileAssociation:fileAssociationList){ for (FileAssociation fileAssociation:fileAssociationList){
FileAssociationSource source = extFileAssociationMapper.selectNameBySourceTableAndId(FileAssociationSourceUtil.getQuerySql(fileAssociation.getSourceType()),fileAssociation.getSourceId()); FileAssociationSource source = extFileAssociationMapper.selectNameBySourceTableAndId(FileAssociationSourceUtil.getQuerySql(fileAssociation.getSourceType()),fileAssociation.getSourceId());
if (source == null) {
continue;
}
this.validateSourceName(source); this.validateSourceName(source);
String fileName = null; String fileName = null;
if(fileIdMap.containsKey(fileAssociation.getFileId())){ if(fileIdMap.containsKey(fileAssociation.getFileId())){