fix(接口测试): 高级搜索不等于等条件,搜索结果有误

--bug=1046849 --user=陈建星 【接口测试】接口定义-筛选-路径不等于筛选时没有统计 非HTTP协议的接口数据 https://www.tapd.cn/55049933/s/1582908
This commit is contained in:
AgAngle 2024-09-23 10:33:17 +08:00 committed by Craftsman
parent 751fcb5c41
commit 7aa6be4a72
2 changed files with 3 additions and 2 deletions

View File

@ -175,8 +175,6 @@ public class ApiScenarioService extends MoveNodeService {
public List<ApiScenarioDTO> getScenarioPage(ApiScenarioPageRequest request, boolean isRepeat, String testPlanId) { public List<ApiScenarioDTO> getScenarioPage(ApiScenarioPageRequest request, boolean isRepeat, String testPlanId) {
//CustomFieldUtils.setBaseQueryRequestCustomMultipleFields(request, userId);
//TODO 场景的自定义字段 等设计 不一定会有
List<ApiScenarioDTO> list = extApiScenarioMapper.list(request, isRepeat, testPlanId); List<ApiScenarioDTO> list = extApiScenarioMapper.list(request, isRepeat, testPlanId);
if (CollectionUtils.isNotEmpty(list)) { if (CollectionUtils.isNotEmpty(list)) {
processApiScenario(list); processApiScenario(list);

View File

@ -214,6 +214,7 @@
<when test="${condition}.operator == 'NOT_CONTAINS'"> <when test="${condition}.operator == 'NOT_CONTAINS'">
<foreach collection="${condition}.value.split(' ')" item="item" separator="or"> <foreach collection="${condition}.value.split(' ')" item="item" separator="or">
${column} not like CONCAT('%', #{item},'%') ${column} not like CONCAT('%', #{item},'%')
or ${column} is null
</foreach> </foreach>
</when> </when>
<when test="${condition}.operator == 'IN'"> <when test="${condition}.operator == 'IN'">
@ -239,6 +240,7 @@
<foreach collection="${condition}.value" item="v" separator="," open="(" close=")"> <foreach collection="${condition}.value" item="v" separator="," open="(" close=")">
#{v} #{v}
</foreach> </foreach>
or ${column} is null
</when> </when>
<when test="${condition}.operator == 'BETWEEN'"> <when test="${condition}.operator == 'BETWEEN'">
${column} between #{condition.value[0]} and #{condition.value[1]} ${column} between #{condition.value[0]} and #{condition.value[1]}
@ -266,6 +268,7 @@
</when> </when>
<when test="${condition}.operator == 'NOT_EQUALS'"> <when test="${condition}.operator == 'NOT_EQUALS'">
${column} != #{condition.value} ${column} != #{condition.value}
or ${column} is null
</when> </when>
</choose> </choose>
</trim> </trim>