提交 400f49ec 编写于 作者: tony001's avatar tony001

调整执行后逻辑外部逻辑支持

This reverts commit cd29290b.
上级 0fd37e7e
...@@ -534,25 +534,9 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr ...@@ -534,25 +534,9 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
<#list appdeAction.getAfterPSDEActionLogics() as afterlogic> <#list appdeAction.getAfterPSDEActionLogics() as afterlogic>
<#if afterlogic.getPSDELogic()?? && afterlogic.getPSDELogic().getLogicHolder?? && afterlogic.getPSDELogic().getLogicHolder()?? && (afterlogic.getPSDELogic().getLogicHolder() == 2 || afterlogic.getPSDELogic().getLogicHolder() == 3)> <#if afterlogic.getPSDELogic()?? && afterlogic.getPSDELogic().getLogicHolder?? && afterlogic.getPSDELogic().getLogicHolder()?? && (afterlogic.getPSDELogic().getLogicHolder() == 2 || afterlogic.getPSDELogic().getLogicHolder() == 3)>
<#assign singleLogic = afterlogic.getPSDELogic() /> <#assign singleLogic = afterlogic.getPSDELogic() />
<#if afterlogic.isInternalLogic()>
<#-- 内部逻辑start -->
<@compress single_line=true>let ${singleLogic.getCodeName()?lower_case}:${srfclassname('${singleLogic.getCodeName()}')}Logic = new ${srfclassname('${singleLogic.getCodeName()}')}Logic({context:JSON.parse(JSON.stringify(context)),data:JSON.parse(JSON.stringify(res)).data});</@compress> <@compress single_line=true>let ${singleLogic.getCodeName()?lower_case}:${srfclassname('${singleLogic.getCodeName()}')}Logic = new ${srfclassname('${singleLogic.getCodeName()}')}Logic({context:JSON.parse(JSON.stringify(context)),data:JSON.parse(JSON.stringify(res)).data});</@compress>
<@compress single_line=true>let ${singleLogic.getCodeName()?lower_case}Data:any = await ${singleLogic.getCodeName()?lower_case}.onExecute(context,res.data,isloading?true:false);</@compress> <@compress single_line=true>let ${singleLogic.getCodeName()?lower_case}Data:any = await ${singleLogic.getCodeName()?lower_case}.onExecute(context,res.data,isloading?true:false);</@compress>
res ={status:200,data:${singleLogic.getCodeName()?lower_case}Data}; res ={status:200,data:${singleLogic.getCodeName()?lower_case}Data};
<#-- 内部逻辑end -->
<#else>
<#-- 外部逻辑start -->
<#if afterlogic.isIgnoreException()>try {</#if>
let tempRes:any = <#if afterlogic.isCloneParam()>JSON.parse(JSON.stringify(res))<#else>{}</#if>;
<@compress single_line=true>let ${singleLogic.getCodeName()?lower_case}:${srfclassname('${singleLogic.getCodeName()}')}Logic = new ${srfclassname('${singleLogic.getCodeName()}')}Logic({context:JSON.parse(JSON.stringify(context)),data:tempRes.data});</@compress>
<@compress single_line=true>let ${singleLogic.getCodeName()?lower_case}Data:any = await ${singleLogic.getCodeName()?lower_case}.onExecute(context,tempRes.data,isloading?true:false);</@compress>
res ={status:200,data:${singleLogic.getCodeName()?lower_case}Data};
<#if afterlogic.isIgnoreException()>} catch (error) {
console.log("执行逻辑发生异常");
}
</#if>
<#-- 外部逻辑end -->
</#if>
</#if> </#if>
</#list> </#list>
</#if> </#if>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册