提交 3a94a6f2 编写于 作者: zhouweidong's avatar zhouweidong

联合主键

上级 5422615e
......@@ -234,25 +234,7 @@ public class ${item.getCodeName()} extends EntityMP implements Serializable {
}
</#if>
}
<#comment>获取联合主键:返回值 String.format("%s||%s",this.getHumanid(),this.getHumanname() </#comment>
<#function getUnionKey unionKeyList>
<#assign formatKey="">
<#assign formatValue="">
<#list item.getUnionKeyValuePSDEFields() as defield>
<#assign unionKeyPrivateCodeName = srfcaseformat(defield.getCodeName(),'l_u2lC') >
<#assign unionKeyPublicCodeName = unionKeyPrivateCodeName?cap_first >
<#assign formatKey=formatKey+"%s">
<#if defield_has_next>
<#assign formatKey=formatKey+"||">
</#if>
<#assign formatValue=formatValue+"this.get"+unionKeyPublicCodeName+"()">
<#if defield_has_next>
<#assign formatValue=formatValue+",">
</#if>
</#list>
<#assign unionKeyResult="String.format(\""+formatKey+"\" ,"+formatValue+")">
<#return unionKeyResult>
</#function>
<#comment>NoSQL存储-MongoDB</#comment>
<#elseif de.getStorageMode()==2>
......@@ -553,6 +535,26 @@ public class ${item.getCodeName()} extends EntityClient implements Serializable
</#if>
<#comment>获取联合主键:返回值 String.format("%s||%s",this.getHumanid(),this.getHumanname() </#comment>
<#function getUnionKey unionKeyList>
<#assign formatKey="">
<#assign formatValue="">
<#list item.getUnionKeyValuePSDEFields() as defield>
<#assign unionKeyPrivateCodeName = srfcaseformat(defield.getCodeName(),'l_u2lC') >
<#assign unionKeyPublicCodeName = unionKeyPrivateCodeName?cap_first >
<#assign formatKey=formatKey+"%s">
<#if defield_has_next>
<#assign formatKey=formatKey+"||">
</#if>
<#assign formatValue=formatValue+"this.get"+unionKeyPublicCodeName+"()">
<#if defield_has_next>
<#assign formatValue=formatValue+",">
</#if>
</#list>
<#assign unionKeyResult="String.format(\""+formatKey+"\" ,"+formatValue+")">
<#return unionKeyResult>
</#function>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册