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

处理逻辑

上级 d8365ed4
...@@ -92,6 +92,22 @@ public class ${item.getCodeName()}ServiceImpl extends ServiceImpl<${de.getCodeNa ...@@ -92,6 +92,22 @@ public class ${item.getCodeName()}ServiceImpl extends ServiceImpl<${de.getCodeNa
</#if> </#if>
</#list> </#list>
</#if> </#if>
<#comment>引入处理逻辑</#comment>
<#if de.getAllPSDEActions()??>
<#list de.getAllPSDEActions() as deAction>
<#comment>实体行为调用处理逻辑</#comment>
<#if deAction.getActionType() =='DELOGIC' >
<#assign deLogic=deAction.getPSDELogic()>
<@importDELogic deLogic />
</#if>
<#comment>实体行为附加逻辑</#comment>
<#if deAction.getPSDEActionLogics()??>
<#list deAction.getPSDEActionLogics() as deLogic>
<@importDELogic deLogic />
</#list>
</#if>
</#list>
</#if>
private int batchSize = 500; private int batchSize = 500;
...@@ -483,6 +499,7 @@ public class ${item.getCodeName()}ServiceImpl extends ServiceImpl<${de.getCodeNa ...@@ -483,6 +499,7 @@ public class ${item.getCodeName()}ServiceImpl extends ServiceImpl<${de.getCodeNa
if(ObjectUtils.isEmpty(${MajorEntityName})){ if(ObjectUtils.isEmpty(${MajorEntityName})){
${pub.getPKGCodeName()}.core.${MajorEntity.getPSSystemModule().getCodeName()?lower_case}.domain.${MajorEntity.getCodeName()} majorEntity=${MajorEntityService}.get(et.get${MajorKeyFieldCodeName}()); ${pub.getPKGCodeName()}.core.${MajorEntity.getPSSystemModule().getCodeName()?lower_case}.domain.${MajorEntity.getCodeName()} majorEntity=${MajorEntityService}.get(et.get${MajorKeyFieldCodeName}());
et.set${MajorEntityName?cap_first}(majorEntity); et.set${MajorEntityName?cap_first}(majorEntity);
${MajorEntityName}=majorEntity;
} }
<#comment>找出当前关系的外键值文本及附加数据字段</#comment> <#comment>找出当前关系的外键值文本及附加数据字段</#comment>
<#list de.getAllPSDEFields() as defield> <#list de.getAllPSDEFields() as defield>
...@@ -1581,7 +1598,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser ...@@ -1581,7 +1598,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<#list deaction.getPSDEActionLogics() as actionlogic> <#list deaction.getPSDEActionLogics() as actionlogic>
<#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> <#else>
//行为处理 //行为处理
</#if> </#if>
...@@ -1596,7 +1613,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser ...@@ -1596,7 +1613,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<#list deaction.getPSDEActionLogics() as actionlogic> <#list deaction.getPSDEActionLogics() as actionlogic>
<#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> <#else>
//行为处理 //行为处理
</#if> </#if>
...@@ -1604,4 +1621,12 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser ...@@ -1604,4 +1621,12 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
</#list> </#list>
</#if> </#if>
</#macro> </#macro>
<#macro importDELogic deLogic>
<#if !P.exists('DELOGIC',deLogic.getCodeName())>
@Autowired
@Lazy
private ${pub.getPKGCodeName()}.core.${de.getPSSystemModule().getCodeName()?lower_case}.service.I${de.getCodeName()}${deLogic.codeName}Logic ${deLogic.getCodeName()?lower_case}Logic;
</#if>
</#macro>
</#if> </#if>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册