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

恢复remove处理逻辑

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