Browse Source

【政策找人】查询列表动作,支持传入is_null/is_not_null

master
wangxianzhang 3 years ago
parent
commit
fa1a116aa4
  1. 11
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/IcResiUserDao.xml

11
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/IcResiUserDao.xml

@ -116,6 +116,15 @@
<if test="resiRules != null and resiRules.size() > 0">
and
<foreach collection="resiRules" item="rule" open="(" close=")">
<choose>
<!--针对为空/不为空进行单独处理-->
<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>
<otherwise>
${rule.colTable}.${rule.colKey} ${rule.queryType}
<choose>
<when test="rule.queryType == 'like'">
@ -125,6 +134,8 @@
#{rule.colVal}
</otherwise>
</choose>
</otherwise>
</choose>
${rule.nextLogicalRel}
</foreach>
</if>

Loading…
Cancel
Save