fix(接口定义): 修复case高级搜索组合搜索失败的缺陷
--bug=1017838 --user=王孝刚 【接口测试】接口case-高级搜索-执行结果+用例等级组合搜索提示sql错误 https://www.tapd.cn/55049933/s/1280433
This commit is contained in:
parent
80b111e79b
commit
95e12b1b01
|
@ -114,27 +114,12 @@
|
||||||
<foreach collection="${object}.value" item="v" separator="," open="(" close=")">
|
<foreach collection="${object}.value" item="v" separator="," open="(" close=")">
|
||||||
#{v}
|
#{v}
|
||||||
</foreach>
|
</foreach>
|
||||||
<if test="${object}.value.contains(''.toString()) or ${object}.value.contains('PENDING'.toString())">
|
|
||||||
or t1.status is null or t1.status = ''
|
|
||||||
</if>
|
|
||||||
<if test="${condition}.exec_result != null">
|
|
||||||
)
|
|
||||||
</if>
|
|
||||||
</when>
|
</when>
|
||||||
<when test='${object}.operator == "not in"'>
|
<when test='${object}.operator == "not in"'>
|
||||||
not in
|
not in
|
||||||
<foreach collection="${object}.value" item="v" separator="," open="(" close=")">
|
<foreach collection="${object}.value" item="v" separator="," open="(" close=")">
|
||||||
#{v}
|
#{v}
|
||||||
</foreach>
|
</foreach>
|
||||||
<if test="${condition}.exec_result != null and (${object}.value.contains(''.toString()) or ${object}.value.contains('PENDING'.toString()))">
|
|
||||||
and t1.status is not null and t1.status != ''
|
|
||||||
</if>
|
|
||||||
<if test="${condition}.exec_result != null and !${object}.value.contains('PENDING'.toString())">
|
|
||||||
or t1.status is null or t1.status = ''
|
|
||||||
</if>
|
|
||||||
<if test="${condition}.exec_result != null">
|
|
||||||
)
|
|
||||||
</if>
|
|
||||||
</when>
|
</when>
|
||||||
<when test='${object}.operator == "between"'>
|
<when test='${object}.operator == "between"'>
|
||||||
between #{${object}.value[0]} and #{${object}.value[1]}
|
between #{${object}.value[0]} and #{${object}.value[1]}
|
||||||
|
@ -240,9 +225,35 @@
|
||||||
</if>
|
</if>
|
||||||
<if test="${condition}.exec_result != null">
|
<if test="${condition}.exec_result != null">
|
||||||
and (t1.status
|
and (t1.status
|
||||||
<include refid="condition">
|
<choose>
|
||||||
<property name="object" value="${condition}.exec_result"/>
|
<when test='${condition}.exec_result.operator == "in"'>
|
||||||
</include>
|
in
|
||||||
|
<foreach collection="${condition}.exec_result.value" item="v" separator="," open="(" close=")">
|
||||||
|
#{v}
|
||||||
|
</foreach>
|
||||||
|
<if test="${condition}.exec_result.value.contains('') or ${condition}.exec_result.value.contains('PENDING')">
|
||||||
|
or t1.status is null or t1.status = ''
|
||||||
|
</if>
|
||||||
|
<if test="${condition}.exec_result != null">
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
</when>
|
||||||
|
<when test='${condition}.exec_result.operator == "not in"'>
|
||||||
|
not in
|
||||||
|
<foreach collection="${condition}.exec_result.value" item="v" separator="," open="(" close=")">
|
||||||
|
#{v}
|
||||||
|
</foreach>
|
||||||
|
<if test="${condition}.exec_result != null and (${condition}.exec_result.value.contains('') or ${condition}.exec_result.value.contains('PENDING'))">
|
||||||
|
and t1.status is not null and t1.status != ''
|
||||||
|
</if>
|
||||||
|
<if test="${condition}.exec_result != null and !${condition}.exec_result.value.contains('PENDING')">
|
||||||
|
or t1.status is null or t1.status = ''
|
||||||
|
</if>
|
||||||
|
<if test="${condition}.exec_result != null">
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
</if>
|
</if>
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue