fix(测试跟踪): 高级搜索字段查询问题
--bug=1037138 --user=宋昌昌 【测试跟踪】github#29458,【缺陷管理】【高级搜索】高级搜索不属于某条件时查询出来出来的都是属于该条件的 https://www.tapd.cn/55049933/s/1624407
This commit is contained in:
parent
7c5750deb4
commit
351a02ee93
|
@ -395,12 +395,26 @@
|
|||
</if>
|
||||
<if test="${condition}.customs != null and ${condition}.customs.size() > 0">
|
||||
<foreach collection="${condition}.customs" item="custom" separator="" open="" close="">
|
||||
<!-- 多选字段查询条件已经拼接好 -->
|
||||
<if test="custom.type == 'multipleMember' or custom.type == 'checkbox' or custom.type == 'multipleSelect'">
|
||||
and issues.id
|
||||
<choose>
|
||||
<when test='custom.operator == "in"'>
|
||||
in
|
||||
</when>
|
||||
<when test='custom.operator == "not in"'>
|
||||
not in
|
||||
</when>
|
||||
<otherwise>
|
||||
in
|
||||
</otherwise>
|
||||
</choose>
|
||||
(select resource_id from custom_field_issues where field_id = #{custom.id} and ${custom.value})
|
||||
</if>
|
||||
<if test="custom.type != 'multipleMember' and custom.type != 'checkbox' and custom.type != 'multipleSelect'">
|
||||
and issues.id in (
|
||||
select resource_id from custom_field_issues where field_id = #{custom.id}
|
||||
<choose>
|
||||
<when test="custom.type == 'multipleMember' or custom.type == 'checkbox' or custom.type == 'multipleSelect'">
|
||||
and ${custom.value}
|
||||
</when>
|
||||
<when test="custom.type == 'date' or custom.type == 'datetime'">
|
||||
and left(replace(unix_timestamp(trim(both '"' from `value`)), '.', ''), 13)
|
||||
<include refid="io.metersphere.base.mapper.ext.ExtBaseMapper.condition">
|
||||
|
@ -421,6 +435,7 @@
|
|||
</otherwise>
|
||||
</choose>
|
||||
)
|
||||
</if>
|
||||
</foreach>
|
||||
</if>
|
||||
</sql>
|
||||
|
|
Loading…
Reference in New Issue