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

继承实体

上级 0afc8ce3
......@@ -233,6 +233,10 @@ ${deaction.getRender().code}
<@addBoforeLogic deaction/>
if(!this.retBool(this.baseMapper.insert(et)))
return false;
<#comment>同步创建继承主实体数据</#comment>
<#if isIndexSubDE && indexPSDER.getDERType()=="DERINHERIT">
createIndexMajorEntityData(et);
</#if>
<#comment>1N关系中,在父实体中创建子实体的List集合</#comment>
<#if de.getMajorPSDERs?? && de.getMajorPSDERs()??>
<#list de.getMajorPSDERs() as MajorPSDER>
......@@ -259,12 +263,12 @@ ${deaction.getRender().code}
</#if>
<#comment>成功后get填充一次完整信息</#comment>
CachedBeanCopier.copy(get(et.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}()),et);
<#comment>附加数据逻辑-操作后</#comment>
<@addAfterLogic deaction/>
<#comment>同步创建索引主实体</#comment>
<#if isIndexSubDE>
<#comment>同步创建索引主实体数据</#comment>
<#if isIndexSubDE && indexPSDER.getDERType()=="DERINDEX">
createIndexMajorEntityData(et);
</#if>
<#comment>附加数据逻辑-操作后</#comment>
<@addAfterLogic deaction/>
return true;
}
......@@ -293,6 +297,10 @@ ${deaction.getRender().code}
<#if de.getKeyPSDEField()??>
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("${keyfield.name?lower_case}",et.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}())))
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>
<#if de.getMajorPSDERs?? && de.getMajorPSDERs()??>
<#list de.getMajorPSDERs() as MajorPSDER>
......@@ -319,8 +327,8 @@ ${deaction.getRender().code}
</#if>
<#comment>成功后get填充一次完整信息</#comment>
CachedBeanCopier.copy(get(et.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}()),et);
<#comment>同步更新索引主实体</#comment>
<#if isIndexSubDE>
<#comment>同步更新索引主实体数据</#comment>
<#if isIndexSubDE && indexPSDER.getDERType()=="DERINDEX">
${srfcaseformat(majorIndexDECodeName,'l_u2lC')}Service.update(${de.codeName?lower_case}InheritMapping.to${majorIndexDECodeNameCamel}(et));
</#if>
<#comment>附加数据逻辑-操作后</#comment>
......@@ -398,7 +406,7 @@ ${deaction.getRender().code}
</#list>
</#if>
boolean result=removeById(key);
<#comment>同步清除索引主实体</#comment>
<#comment>同步清除索引主实体数据</#comment>
<#if isIndexSubDE>
${srfcaseformat(majorIndexDECodeName,'l_u2lC')}Service.remove(key);
</#if>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册