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

补充附加行为

上级 24f48a5c
...@@ -1990,9 +1990,13 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser ...@@ -1990,9 +1990,13 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<#comment>实体行为附加逻辑</#comment> <#comment>实体行为附加逻辑</#comment>
<#if deAction.getPSDEActionLogics()??> <#if deAction.getPSDEActionLogics()??>
<#list deAction.getPSDEActionLogics() as deActionLogic> <#list deAction.getPSDEActionLogics() as deActionLogic>
<#if deActionLogic.isInternalLogic()> <#if deActionLogic.isValid()==true>
<#assign deLogic=deActionLogic.getPSDELogic()> <#if deActionLogic.isInternalLogic()>
<#assign deLogic=deActionLogic.getPSDELogic()>
<@importDELogic deLogic /> <@importDELogic deLogic />
<#elseif (deActionLogic.getDstPSDE()!'')!='' && (deActionLogic.getDstPSDEAction()!'')!=''>
<@importDEAction deActionLogic />
</#if>
</#if> </#if>
</#list> </#list>
</#if> </#if>
...@@ -2297,24 +2301,41 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser ...@@ -2297,24 +2301,41 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<#comment>附加逻辑-操作前</#comment> <#comment>附加逻辑-操作前</#comment>
<#macro addBoforeLogic deaction> <#macro addBoforeLogic deaction>
<#if deaction.getPSDEActionLogics()??> <#if deaction.getBeforePSDEActionLogics()??>
<#list deaction.getPSDEActionLogics() as actionlogic> <#list deaction.getBeforePSDEActionLogics() as actionlogic>
<#if actionlogic.getAttachMode()=='BEFORE' && actionlogic.isValid()==true> <#if actionlogic.isValid()==true>
<#if actionlogic.isInternalLogic() && actionlogic.getPSDELogic().isEnableBackend()> <#if actionlogic.isInternalLogic() && actionlogic.getPSDELogic().isEnableBackend()>
${actionlogic.getPSDELogic().getCodeName()?lower_case}Logic.execute(et); ${actionlogic.getPSDELogic().getCodeName()?lower_case}Logic.execute(et);
<#elseif (actionlogic.getDstPSDE()!'')!='' && (actionlogic.getDstPSDEAction()!'')!=''>
<@addActionLogic actionlogic/>
</#if> </#if>
</#if> </#if>
</#list> </#list>
</#if> </#if>
</#macro> </#macro>
<#comment>附加实体行为</#comment>
<#macro addActionLogic actionlogic>
<#assign actionLogicDE=actionlogic.getDstPSDE()>
<#assign actionLogicDEAction=actionlogic.getDstPSDEAction()>
<#assign logicActionType=actionLogicDEAction.getActionType()>
<#assign logicCodeName=actionLogicDEAction.getCodeName()?lower_case>
<#if (logicActionType=='USERCUSTOM')|| logicActionType=='DELOGIC'|| logicCodeName == "create" || logicCodeName == "update" || logicCodeName == "save" || logicCodeName == "getdraft" || logicCodeName == "checkkey">
${pub.getPKGCodeName()}.core.${actionLogicDE.getPSSystemModule().getCodeName()?lower_case}.domain.${actionLogicDE.getCodeName()} actionLogicDE =new ${pub.getPKGCodeName()}.core.${actionLogicDE.getPSSystemModule().getCodeName()?lower_case}.domain.${actionLogicDE.getCodeName()}();
et.copyTo(actionLogicDE,true);
${srfcaseformat(actionLogicDE.getCodeName(),'l_u2lC')}Service.${srfmethodname(actionLogicDEAction.getCodeName())}(actionLogicDE);
</#if>
</#macro>
<#comment>附加逻辑-操作后</#comment> <#comment>附加逻辑-操作后</#comment>
<#macro addAfterLogic deaction> <#macro addAfterLogic deaction>
<#if deaction.getPSDEActionLogics()??> <#if deaction.getAfterPSDEActionLogics()??>
<#list deaction.getPSDEActionLogics() as actionlogic> <#list deaction.getAfterPSDEActionLogics() as actionlogic>
<#if actionlogic.getAttachMode()=='AFTER' && actionlogic.isValid()==true> <#if actionlogic.isValid()==true>
<#if actionlogic.isInternalLogic() && actionlogic.getPSDELogic().isEnableBackend()> <#if actionlogic.isInternalLogic() && actionlogic.getPSDELogic().isEnableBackend()>
${actionlogic.getPSDELogic().getCodeName()?lower_case}Logic.execute(et); ${actionlogic.getPSDELogic().getCodeName()?lower_case}Logic.execute(et);
<#elseif (actionlogic.getDstPSDE()!'')!='' && (actionlogic.getDstPSDEAction()!'')!=''>
<@addActionLogic actionlogic/>
</#if> </#if>
</#if> </#if>
</#list> </#list>
...@@ -2329,6 +2350,17 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser ...@@ -2329,6 +2350,17 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
</#if> </#if>
</#macro> </#macro>
<#macro importDEAction actionLogic>
<#assign actionLogicDE=actionLogic.getDstPSDE()>
<#assign actionLogicDEAction=actionLogic.getDstPSDEAction()>
<#if !P.exists('DER1N',actionLogicDE.getCodeName())>
@Autowired
@Lazy
protected ${pub.getPKGCodeName()}.core.${actionLogicDE.getPSSystemModule().getCodeName()?lower_case}.service.I${actionLogicDE.getCodeName()}Service ${srfcaseformat(actionLogicDE.getCodeName(),'l_u2lC')}Service;
</#if>
</#macro>
<#comment>实体行为参数</#comment> <#comment>实体行为参数</#comment>
<#macro addDEActionParam deaction> <#macro addDEActionParam deaction>
<#if deaction.getParamMode?? && deaction.getParamMode()?? && deaction.getPSDEActionParams()??> <#if deaction.getParamMode?? && deaction.getParamMode()?? && deaction.getPSDEActionParams()??>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册