提交 27482c25 编写于 作者: zhouweidong's avatar zhouweidong

索引、继承关系

上级 f66a1bfb
...@@ -231,12 +231,12 @@ ${deaction.getRender().code} ...@@ -231,12 +231,12 @@ ${deaction.getRender().code}
</#if> </#if>
<#comment>附加数据逻辑-操作前</#comment> <#comment>附加数据逻辑-操作前</#comment>
<@addBoforeLogic deaction/> <@addBoforeLogic deaction/>
if(!this.retBool(this.baseMapper.insert(et))) <#comment>同步创建索引主实体、继承主实体数据:继承子实体属性来源与父,先保存父,再保存子,最后get一次获取父数据返回</#comment>
return false; <#if isIndexSubDE>
<#comment>同步创建继承主实体数据</#comment>
<#if isIndexSubDE && indexPSDER.getDERType()=="DERINHERIT">
createIndexMajorEntityData(et); createIndexMajorEntityData(et);
</#if> </#if>
if(!this.retBool(this.baseMapper.insert(et)))
return false;
<#comment>1N关系中,在父实体中创建子实体的List集合</#comment> <#comment>1N关系中,在父实体中创建子实体的List集合</#comment>
<#if de.getMajorPSDERs?? && de.getMajorPSDERs()??> <#if de.getMajorPSDERs?? && de.getMajorPSDERs()??>
<#list de.getMajorPSDERs() as MajorPSDER> <#list de.getMajorPSDERs() as MajorPSDER>
...@@ -263,10 +263,6 @@ ${deaction.getRender().code} ...@@ -263,10 +263,6 @@ ${deaction.getRender().code}
</#if> </#if>
<#comment>成功后get填充一次完整信息</#comment> <#comment>成功后get填充一次完整信息</#comment>
CachedBeanCopier.copy(get(et.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}()),et); CachedBeanCopier.copy(get(et.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}()),et);
<#comment>同步创建索引主实体数据</#comment>
<#if isIndexSubDE && indexPSDER.getDERType()=="DERINDEX">
createIndexMajorEntityData(et);
</#if>
<#comment>附加数据逻辑-操作后</#comment> <#comment>附加数据逻辑-操作后</#comment>
<@addAfterLogic deaction/> <@addAfterLogic deaction/>
return true; return true;
...@@ -294,13 +290,13 @@ ${deaction.getRender().code} ...@@ -294,13 +290,13 @@ ${deaction.getRender().code}
</#if> </#if>
<#comment>附加数据逻辑-操作前</#comment> <#comment>附加数据逻辑-操作前</#comment>
<@addBoforeLogic deaction/> <@addBoforeLogic deaction/>
<#comment>同步更新索引主实体、继承主实体数据:继承子实体属性来源与父,先保存父,再保存子,最后get一次获取父数据返回</#comment>
<#if isIndexSubDE>
${srfcaseformat(majorIndexDECodeName,'l_u2lC')}Service.update(${de.codeName?lower_case}InheritMapping.to${majorIndexDECodeNameCamel}(et));
</#if>
<#if de.getKeyPSDEField()??> <#if de.getKeyPSDEField()??>
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("${keyfield.name?lower_case}",et.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}()))) if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("${keyfield.name?lower_case}",et.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}())))
return false; return false;
<#comment>同步更新继承主实体数据</#comment>
<#if isIndexSubDE && indexPSDER.getDERType()=="DERINHERIT">
${srfcaseformat(majorIndexDECodeName,'l_u2lC')}Service.update(${de.codeName?lower_case}InheritMapping.to${majorIndexDECodeNameCamel}(et));
</#if>
<#comment>1N关系中,在父实体中创建子实体的List集合</#comment> <#comment>1N关系中,在父实体中创建子实体的List集合</#comment>
<#if de.getMajorPSDERs?? && de.getMajorPSDERs()??> <#if de.getMajorPSDERs?? && de.getMajorPSDERs()??>
<#list de.getMajorPSDERs() as MajorPSDER> <#list de.getMajorPSDERs() as MajorPSDER>
...@@ -327,10 +323,6 @@ ${deaction.getRender().code} ...@@ -327,10 +323,6 @@ ${deaction.getRender().code}
</#if> </#if>
<#comment>成功后get填充一次完整信息</#comment> <#comment>成功后get填充一次完整信息</#comment>
CachedBeanCopier.copy(get(et.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}()),et); CachedBeanCopier.copy(get(et.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}()),et);
<#comment>同步更新索引主实体数据</#comment>
<#if isIndexSubDE && indexPSDER.getDERType()=="DERINDEX">
${srfcaseformat(majorIndexDECodeName,'l_u2lC')}Service.update(${de.codeName?lower_case}InheritMapping.to${majorIndexDECodeNameCamel}(et));
</#if>
<#comment>附加数据逻辑-操作后</#comment> <#comment>附加数据逻辑-操作后</#comment>
<@addAfterLogic deaction/> <@addAfterLogic deaction/>
return true; return true;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册