提交 56b2c298 编写于 作者: zhouweidong's avatar zhouweidong

查询模型上下文参数支持格式:${srfdatacontext('cityid')}

上级 b21329bb
......@@ -197,7 +197,7 @@ TARGET=PSDATAENTITY
<#comment>第三次替换: #{srf.datacontext.ORGID} --> #{srf.datacontext.orgid} </#comment>
<#function contextParamConvert contextParam>
<#comment>平台配置格式替换${srfdatacontext('cityid','{"defname":"CITYID","dename":"CITY"}')} --> #{srf.srfdatacontext.cityid} </#comment>
<#assign contextParam=contextParam?replace("\\$\\{(srfdatacontext|srfsessioncontext|srfwebcontext)\\('(\\w+)','(.*)'\\)}","#\{srf.$1.$2}","r")>
<#assign contextParam=contextParam?replace("$\{(srfdatacontext|srfsessioncontext|srfwebcontext)\('(\\w+)','(.*)'\)}","#\{srf.$1.$2}","r")>
<#comment>用户配置格式替换${srfdatacontext('cityid')} --> #{srf.srfdatacontext.cityid} </#comment>
<#assign contextParam=contextParam?replace("\\$\\{(srfdatacontext|srfsessioncontext|srfwebcontext)\\('(\\w+)'\\)}","#\{srf.$1.$2}","r")>
<#comment>将上下文参数转小写 #{srf.srfdatacontext.SRFORGID} --> #{srf.srfdatacontext.srforgid}</#comment>
......@@ -206,7 +206,7 @@ TARGET=PSDATAENTITY
<#assign contextParam=contextParam?replace(param,param?lower_case)>
</#list>
<#--<#assign resultParam="">-->
<#--<#assign resultParam=contextParam?replace('$\{srfdatacontext(\'','#\{srf.datacontext.')?replace("','\\{[\\S]*}'\\)}","\\}","r")><#comment>数据上下文</#comment>-->
<#assign resultParam=contextParam?replace('$\{srfdatacontext(\'','#\{srf.datacontext.')?replace("','\\{[\\S]*}'\\)}","\\}","r")><#comment>数据上下文</#comment>
<#--<#assign resultParam=resultParam?replace('$\{srfsessioncontext(\'','#\{srf.sessioncontext.')?replace("','\\{[\\S]*}'\\)}","\\}","r")><#comment>用户上下文</#comment>-->
<#--<#assign resultParam=resultParam?replace('$\{srfwebcontext(\'','#\{srf.webcontext.')?replace("','\\{[\\S]*}'\\)}","\\}","r")><#comment>网页请求上下文</#comment>-->
<#--<#assign params=resultParam?matches('#\\{srf.[\\S]*}')>-->
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册