提交 542be90b 编写于 作者: zhouweidong's avatar zhouweidong

数据导入外键值检查

上级 94f75744
......@@ -2835,8 +2835,6 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<#assign importTag=foreignkeyField.getCodeName()>
<#if ((foreignkeyField.getImportTag())!'')!=''>
<#assign importTag=foreignkeyField.getImportTag()>
<#elseif ((foreignkeyField.getLogicName())!'')!=''>
<#assign importTag=foreignkeyField.getLogicName()>
</#if>
if(ObjectUtils.isEmpty(entity.get${foreignkeyId}()) && !ObjectUtils.isEmpty(entity.get${foreignkeyName}())){
QueryWrapper<${pub.getPKGCodeName()}.core.${MajorEntity.getPSSystemModule().getCodeName()?lower_case}.domain.${MajorEntityCodeName}> ${MinorPSDER.codeName?lower_case}Wrapper = new QueryWrapper<>();
......@@ -2848,7 +2846,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
errorMsgs.add("第" + lineNum + "行:未能找到[${importTag} : "+entity.get${foreignkeyName}()+"]对应的外键值。");
continue;
}else{
entity.set${foreignkeyId}(${MinorPSDER.codeName?lower_case}Entity.get${foreignkeyId}());
entity.set${foreignkeyId}(${MinorPSDER.codeName?lower_case}Entity.get${MajorEntityKeyFieldCodeName}());
}
}
</#if>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册