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

补充附加行为

上级 24f48a5c
......@@ -1990,9 +1990,13 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<#comment>实体行为附加逻辑</#comment>
<#if deAction.getPSDEActionLogics()??>
<#list deAction.getPSDEActionLogics() as deActionLogic>
<#if deActionLogic.isValid()==true>
<#if deActionLogic.isInternalLogic()>
<#assign deLogic=deActionLogic.getPSDELogic()>
<@importDELogic deLogic />
<#elseif (deActionLogic.getDstPSDE()!'')!='' && (deActionLogic.getDstPSDEAction()!'')!=''>
<@importDEAction deActionLogic />
</#if>
</#if>
</#list>
</#if>
......@@ -2297,24 +2301,41 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<#comment>附加逻辑-操作前</#comment>
<#macro addBoforeLogic deaction>
<#if deaction.getPSDEActionLogics()??>
<#list deaction.getPSDEActionLogics() as actionlogic>
<#if actionlogic.getAttachMode()=='BEFORE' && actionlogic.isValid()==true>
<#if deaction.getBeforePSDEActionLogics()??>
<#list deaction.getBeforePSDEActionLogics() as actionlogic>
<#if actionlogic.isValid()==true>
<#if actionlogic.isInternalLogic() && actionlogic.getPSDELogic().isEnableBackend()>
${actionlogic.getPSDELogic().getCodeName()?lower_case}Logic.execute(et);
<#elseif (actionlogic.getDstPSDE()!'')!='' && (actionlogic.getDstPSDEAction()!'')!=''>
<@addActionLogic actionlogic/>
</#if>
</#if>
</#list>
</#if>
</#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>
<#macro addAfterLogic deaction>
<#if deaction.getPSDEActionLogics()??>
<#list deaction.getPSDEActionLogics() as actionlogic>
<#if actionlogic.getAttachMode()=='AFTER' && actionlogic.isValid()==true>
<#if deaction.getAfterPSDEActionLogics()??>
<#list deaction.getAfterPSDEActionLogics() as actionlogic>
<#if actionlogic.isValid()==true>
<#if actionlogic.isInternalLogic() && actionlogic.getPSDELogic().isEnableBackend()>
${actionlogic.getPSDELogic().getCodeName()?lower_case}Logic.execute(et);
<#elseif (actionlogic.getDstPSDE()!'')!='' && (actionlogic.getDstPSDEAction()!'')!=''>
<@addActionLogic actionlogic/>
</#if>
</#if>
</#list>
......@@ -2329,6 +2350,17 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
</#if>
</#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>
<#macro addDEActionParam deaction>
<#if deaction.getParamMode?? && deaction.getParamMode()?? && deaction.getPSDEActionParams()??>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册