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

恢复remove处理逻辑

上级 dcb913a2
...@@ -331,8 +331,9 @@ public class ${item.getCodeName()}ServiceImpl extends ServiceImpl<${de.getCodeNa ...@@ -331,8 +331,9 @@ public class ${item.getCodeName()}ServiceImpl extends ServiceImpl<${de.getCodeNa
@Override @Override
@Transactional @Transactional
public boolean remove(${srfjavatype(keyfield.stdDataType)} key) { public boolean remove(${srfjavatype(keyfield.stdDataType)} key) {
<#comment>附加数据逻辑-操作前</#comment> <#comment>附加数据逻辑-操作前,通过key构造entity传入逻辑中</#comment>
<#--<@addBoforeLogic deaction/>--> <@buildEntityParam deaction/>
<@addBoforeLogic deaction/>
<#if de.getMajorPSDERs()??> <#if de.getMajorPSDERs()??>
<#list de.getMajorPSDERs() as der> <#list de.getMajorPSDERs() as der>
<#if der.getDERType() =='DER1N' && der.isNestedRS() && der.getMinorPSDataEntity()?? && (der.getMinorPSDataEntity().getStorageMode()==1||der.getMinorPSDataEntity().getStorageMode()==2||der.getMinorPSDataEntity().getStorageMode()==4) > <#if der.getDERType() =='DER1N' && der.isNestedRS() && der.getMinorPSDataEntity()?? && (der.getMinorPSDataEntity().getStorageMode()==1||der.getMinorPSDataEntity().getStorageMode()==2||der.getMinorPSDataEntity().getStorageMode()==4) >
...@@ -344,7 +345,7 @@ public class ${item.getCodeName()}ServiceImpl extends ServiceImpl<${de.getCodeNa ...@@ -344,7 +345,7 @@ public class ${item.getCodeName()}ServiceImpl extends ServiceImpl<${de.getCodeNa
</#if> </#if>
if(!removeById(key)) return false; if(!removeById(key)) return false;
<#comment>附加数据逻辑-操作后</#comment> <#comment>附加数据逻辑-操作后</#comment>
<#--<@addAfterLogic deaction/>--> <@addAfterLogic deaction/>
return true ; return true ;
} }
...@@ -1687,6 +1688,36 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser ...@@ -1687,6 +1688,36 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
} }
</#if> </#if>
<#macro buildEntityParam deaction>
<#comment>由于getremove参数为key,构造entity以便传入逻辑中</#comment>
<#assign tempEntityName="et">
<#if deaction.getPSDEActionLogics()??>
<#list deaction.getPSDEActionLogics() as actionlogic>
<#if deaction.getCodeName()?lower_case == "get">
<#assign tempEntityName="tempET">
</#if>
${de.codeName} ${tempEntityName}=new ${de.codeName}();
<#if keyfield??>
et.set(${keyfield.codeName},key);
</#if>
<#break>
</#list>
</#if>
</#macro>
<#comment>Get行为附加逻辑-操作前</#comment>
<#macro addGetActionBoforeLogic deaction>
<#if deaction.getPSDEActionLogics()??>
<#list deaction.getPSDEActionLogics() as actionlogic>
<#if actionlogic.getAttachMode()=='BEFORE'>
<#if actionlogic.isInternalLogic()>
${actionlogic.getPSDELogic().getCodeName()?lower_case}Logic.execute(tempET);
</#if>
</#if>
</#list>
</#if>
</#macro>
<#comment>附加逻辑-操作前</#comment> <#comment>附加逻辑-操作前</#comment>
<#macro addBoforeLogic deaction> <#macro addBoforeLogic deaction>
<#if deaction.getPSDEActionLogics()??> <#if deaction.getPSDEActionLogics()??>
...@@ -1694,8 +1725,6 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser ...@@ -1694,8 +1725,6 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<#if actionlogic.getAttachMode()=='BEFORE'> <#if actionlogic.getAttachMode()=='BEFORE'>
<#if actionlogic.isInternalLogic()> <#if actionlogic.isInternalLogic()>
${actionlogic.getPSDELogic().getCodeName()?lower_case}Logic.execute(et); ${actionlogic.getPSDELogic().getCodeName()?lower_case}Logic.execute(et);
<#else>
//行为处理
</#if> </#if>
</#if> </#if>
</#list> </#list>
...@@ -1709,8 +1738,6 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser ...@@ -1709,8 +1738,6 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<#if actionlogic.getAttachMode()=='AFTER'> <#if actionlogic.getAttachMode()=='AFTER'>
<#if actionlogic.isInternalLogic()> <#if actionlogic.isInternalLogic()>
${actionlogic.getPSDELogic().getCodeName()?lower_case}Logic.execute(et); ${actionlogic.getPSDELogic().getCodeName()?lower_case}Logic.execute(et);
<#else>
//行为处理
</#if> </#if>
</#if> </#if>
</#list> </#list>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册