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

执行后逻辑外部逻辑支持 --- fix1

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