提交 9f73b55f 编写于 作者: zhouweidong's avatar zhouweidong

修复无值为空bug(包含)

上级 94c41139
...@@ -285,7 +285,7 @@ TARGET=PSDATAENTITY ...@@ -285,7 +285,7 @@ TARGET=PSDATAENTITY
<#comment>补充上下文的IN查询(in通过$获取参数,其余为#)</#comment> <#comment>补充上下文的IN查询(in通过$获取参数,其余为#)</#comment>
<#assign resultParam=resultParam?replace("<#assign _value=srf(datacontext|sessioncontext|webcontext)\\('(\\w+)','(.*?)'\\)><#if _value\\?length gt 0>(.*?)\\(\\$\\{_value}\\)<#else>1=1</#if>","<choose><when test=\"srf.$1.$2 != null\"> <![CDATA[ $4 \\$\{srf.$1.$2} ]]> </when><otherwise>1=1</otherwise></choose>","r")> <#assign resultParam=resultParam?replace("<#assign _value=srf(datacontext|sessioncontext|webcontext)\\('(\\w+)','(.*?)'\\)><#if _value\\?length gt 0>(.*?)\\(\\$\\{_value}\\)<#else>1=1</#if>","<choose><when test=\"srf.$1.$2 != null\"> <![CDATA[ $4 \\$\{srf.$1.$2} ]]> </when><otherwise>1=1</otherwise></choose>","r")>
<#comment>获取模型中的空值条件,在条件外层补充mybatis判断条件 <choose><when test="srf.datacontext.name != null"> <![CDATA[ t1.`NAME` <= #{srf.datacontext.name} ]]> </when><otherwise>1=1</otherwise></choose> </#comment> <#comment>获取模型中的空值条件,在条件外层补充mybatis判断条件 <choose><when test="srf.datacontext.name != null"> <![CDATA[ t1.`NAME` <= #{srf.datacontext.name} ]]> </when><otherwise>1=1</otherwise></choose> </#comment>
<#assign resultParam=resultParam?replace("<#assign _value=srf(datacontext|sessioncontext|webcontext)\\('(\\w+)','(.*?)'\\)><#if _value\\?length gt 0>(.*?)\\$\\{_value}.*?<#else>1=1</#if>","<choose><when test=\"srf.$1.$2 != null\"> <![CDATA[ $4 #\{srf.$1.$2} ]]> </when><otherwise>1=1</otherwise></choose>","r")> <#assign resultParam=resultParam?replace("<#assign _value=srf(datacontext|sessioncontext|webcontext)\\('(\\w+)','(.*?)'\\)><#if _value\\?length gt 0>(.*?)\\$\\{_value}(.*?)?<#else>1=1</#if>","<choose><when test=\"srf.$1.$2 != null\"> <![CDATA[ $4#\{srf.$1.$2}$5 ]]> </when><otherwise>1=1</otherwise></choose>","r")>
<#comment>对数据查询中的其余条件的context进行解析</#comment> <#comment>对数据查询中的其余条件的context进行解析</#comment>
<#assign resultParam=contextParamConvert(resultParam)> <#assign resultParam=contextParamConvert(resultParam)>
<#return resultParam> <#return resultParam>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册