fix(用例管理): 用例自定义字段多条件查询结果有误
--bug=1046674 --user=陈建星 【用例评审】评审详情-高级筛选-自动定义字段整数类型+输入框类型筛选失败 https://www.tapd.cn/55049933/s/1580542
This commit is contained in:
parent
6ddada0d3b
commit
5699075845
|
@ -72,6 +72,7 @@
|
|||
|
||||
<if test="${combineSearch}.customFiledNoneConditions.size() > 0">
|
||||
<foreach collection="${combineSearch}.customFiledNoneConditions" item="condition">
|
||||
<trim prefix="(" suffix=")">
|
||||
${mainIdColumn} not in (
|
||||
select ${associationIdColumn} from ${associationTable} where
|
||||
field_id = #{condition.name} and
|
||||
|
@ -98,6 +99,7 @@
|
|||
</otherwise>
|
||||
</choose>
|
||||
)
|
||||
</trim>
|
||||
<include refid="io.metersphere.system.mapper.BaseMapper.queryType">
|
||||
<property name="searchMode" value="${combineSearch}.searchMode"/>
|
||||
</include>
|
||||
|
@ -105,11 +107,9 @@
|
|||
</if>
|
||||
|
||||
<if test="${combineSearch}.customFiledConditions.size() > 0">
|
||||
<foreach collection="${combineSearch}.customFiledConditions" item="condition">
|
||||
${mainIdColumn} in (
|
||||
select ${associationIdColumn} from ${associationTable} where
|
||||
<trim suffixOverrides="AND|OR">
|
||||
<foreach collection="${combineSearch}.customFiledConditions" item="condition">
|
||||
<trim prefix="(" suffix=")">
|
||||
field_id = #{condition.name} and
|
||||
<choose>
|
||||
<when test="condition.customFieldType != null and condition.isMultipleCustomField()">
|
||||
|
@ -125,13 +125,11 @@
|
|||
</include>
|
||||
</otherwise>
|
||||
</choose>
|
||||
</trim>
|
||||
)
|
||||
<include refid="io.metersphere.system.mapper.BaseMapper.queryType">
|
||||
<property name="searchMode" value="${combineSearch}.searchMode"/>
|
||||
</include>
|
||||
</foreach>
|
||||
</trim>
|
||||
)
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
|
@ -151,13 +149,13 @@
|
|||
<when test="${condition}.operator == 'NOT_CONTAINS'">
|
||||
${column} is null or ${column} = '[]' or
|
||||
<foreach collection="${condition}.value" item="tag" separator="and" open="(" close=")">
|
||||
!JSON_CONTAINS(${column}, JSON_ARRAY(#{tag}))
|
||||
not JSON_CONTAINS(${column}, JSON_ARRAY(#{tag}))
|
||||
</foreach>
|
||||
</when>
|
||||
<when test="${condition}.operator == 'NOT_IN'">
|
||||
${column} is null or ${column} = '[]' or
|
||||
<foreach collection="${condition}.value" item="tag" separator="and" open="(" close=")">
|
||||
!JSON_CONTAINS(${column}, JSON_ARRAY(#{tag}))
|
||||
not JSON_CONTAINS(${column}, JSON_ARRAY(#{tag}))
|
||||
</foreach>
|
||||
</when>
|
||||
<when test="${condition}.operator == 'COUNT_GT'">
|
||||
|
|
Loading…
Reference in New Issue