|
@ -116,13 +116,24 @@ |
|
|
<if test="resiRules != null and resiRules.size() > 0"> |
|
|
<if test="resiRules != null and resiRules.size() > 0"> |
|
|
and |
|
|
and |
|
|
<foreach collection="resiRules" item="rule" open="(" close=")"> |
|
|
<foreach collection="resiRules" item="rule" open="(" close=")"> |
|
|
${rule.colTable}.${rule.colKey} ${rule.queryType} |
|
|
|
|
|
<choose> |
|
|
<choose> |
|
|
<when test="rule.queryType == 'like'"> |
|
|
<!--针对为空/不为空进行单独处理--> |
|
|
CONCAT('%',#{rule.colVal} ,'%') |
|
|
<when test="rule.queryType == 'is_null'"> |
|
|
|
|
|
(${rule.colTable}.${rule.colKey} is null or ${rule.colTable}.${rule.colKey} = '') |
|
|
|
|
|
</when> |
|
|
|
|
|
<when test="rule.queryType == 'is_not_null'"> |
|
|
|
|
|
(${rule.colTable}.${rule.colKey} is not null and ${rule.colTable}.${rule.colKey} != '') |
|
|
</when> |
|
|
</when> |
|
|
<otherwise> |
|
|
<otherwise> |
|
|
#{rule.colVal} |
|
|
${rule.colTable}.${rule.colKey} ${rule.queryType} |
|
|
|
|
|
<choose> |
|
|
|
|
|
<when test="rule.queryType == 'like'"> |
|
|
|
|
|
CONCAT('%',#{rule.colVal} ,'%') |
|
|
|
|
|
</when> |
|
|
|
|
|
<otherwise> |
|
|
|
|
|
#{rule.colVal} |
|
|
|
|
|
</otherwise> |
|
|
|
|
|
</choose> |
|
|
</otherwise> |
|
|
</otherwise> |
|
|
</choose> |
|
|
</choose> |
|
|
${rule.nextLogicalRel} |
|
|
${rule.nextLogicalRel} |
|
|