fix(用例管理): 修复功能用例列表全选传值参数问题

--bug=1039613 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001039613
This commit is contained in:
guoyuqi 2024-04-18 16:22:44 +08:00 committed by 刘瑞斌
parent 419cd02a11
commit f6936b5ce8
4 changed files with 42 additions and 26 deletions

View File

@ -236,7 +236,7 @@
<include refid="io.metersphere.system.mapper.BaseMapper.filterInWrapper"/> <include refid="io.metersphere.system.mapper.BaseMapper.filterInWrapper"/>
) )
</when> </when>
<!-- 创建--> <!-- 更新-->
<when test="key=='updateUserName'"> <when test="key=='updateUserName'">
and functional_case.update_user in and functional_case.update_user in
<include refid="io.metersphere.system.mapper.BaseMapper.filterInWrapper"/> <include refid="io.metersphere.system.mapper.BaseMapper.filterInWrapper"/>
@ -246,7 +246,7 @@
and functional_case.create_user in and functional_case.create_user in
<include refid="io.metersphere.system.mapper.BaseMapper.filterInWrapper"/> <include refid="io.metersphere.system.mapper.BaseMapper.filterInWrapper"/>
</when> </when>
<!-- 创建--> <!-- 删除-->
<when test="key=='deleteUserName'"> <when test="key=='deleteUserName'">
and functional_case.delete_user in and functional_case.delete_user in
<include refid="io.metersphere.system.mapper.BaseMapper.filterInWrapper"/> <include refid="io.metersphere.system.mapper.BaseMapper.filterInWrapper"/>

View File

@ -109,6 +109,9 @@ public class NotificationService {
public Integer getUnRead(String projectId) { public Integer getUnRead(String projectId) {
NotificationExample example = new NotificationExample(); NotificationExample example = new NotificationExample();
if (StringUtils.isBlank(projectId)) {
return 0;
}
example.createCriteria().andProjectIdEqualTo(projectId).andStatusEqualTo(NotificationConstants.Status.UNREAD.name()); example.createCriteria().andProjectIdEqualTo(projectId).andStatusEqualTo(NotificationConstants.Status.UNREAD.name());
return (int) notificationMapper.countByExample(example); return (int) notificationMapper.countByExample(example);
} }

View File

@ -953,7 +953,6 @@
keyword: keyword.value, keyword: keyword.value,
moduleIds, moduleIds,
projectId: currentProjectId.value, projectId: currentProjectId.value,
filter: { filter: {
reviewStatus: statusFilters.value, reviewStatus: statusFilters.value,
caseLevel: caseFilters.value, caseLevel: caseFilters.value,
@ -961,11 +960,7 @@
updateUserName: updateUserFilters.value, updateUserName: updateUserFilters.value,
createUserName: createUserFilters.value, createUserName: createUserFilters.value,
}, },
condition: { combine: batchParams.value.condition,
keyword: keyword.value,
filter: propsRes.value.filter,
combine: batchParams.value.condition,
},
}; };
} }
// //
@ -1113,7 +1108,13 @@
excludeIds: batchParams.value?.excludeIds || [], excludeIds: batchParams.value?.excludeIds || [],
condition: { condition: {
keyword: keyword.value, keyword: keyword.value,
filter: propsRes.value.filter, filter: {
reviewStatus: statusFilters.value,
caseLevel: caseFilters.value,
lastExecuteResult: executeResultFilters.value,
updateUserName: updateUserFilters.value,
createUserName: createUserFilters.value,
},
combine: batchParams.value.condition, combine: batchParams.value.condition,
}, },
projectId: currentProjectId.value, projectId: currentProjectId.value,
@ -1192,7 +1193,13 @@
moduleIds: props.activeFolder === 'all' ? [] : [props.activeFolder, ...props.offspringIds], moduleIds: props.activeFolder === 'all' ? [] : [props.activeFolder, ...props.offspringIds],
condition: { condition: {
keyword: keyword.value, keyword: keyword.value,
filter: propsRes.value.filter, filter: {
reviewStatus: statusFilters.value,
caseLevel: caseFilters.value,
lastExecuteResult: executeResultFilters.value,
updateUserName: updateUserFilters.value,
createUserName: createUserFilters.value,
},
combine: batchParams.value.condition, combine: batchParams.value.condition,
}, },
selectAll, selectAll,
@ -1431,7 +1438,13 @@
condition: { condition: {
keyword: keyword.value, keyword: keyword.value,
searchMode: accordBelow, searchMode: accordBelow,
filter: propsRes.value.filter, filter: {
reviewStatus: statusFilters.value,
caseLevel: caseFilters.value,
lastExecuteResult: executeResultFilters.value,
updateUserName: updateUserFilters.value,
createUserName: createUserFilters.value,
},
combine, combine,
}, },
}; };
@ -1575,7 +1588,13 @@
}, },
condition: { condition: {
keyword: keyword.value, keyword: keyword.value,
filter: propsRes.value.filter, filter: {
reviewStatus: statusFilters.value,
caseLevel: caseFilters.value,
lastExecuteResult: executeResultFilters.value,
updateUserName: updateUserFilters.value,
createUserName: createUserFilters.value,
},
combine: batchParams.value.condition, combine: batchParams.value.condition,
}, },
functionalDemandBatchRequest, functionalDemandBatchRequest,

View File

@ -677,17 +677,16 @@
selectIds: batchParams.value.selectedIds, selectIds: batchParams.value.selectedIds,
moduleIds: searchParams.value.moduleIds, moduleIds: searchParams.value.moduleIds,
projectId: currentProjectId.value, projectId: currentProjectId.value,
filter: {
reviewStatus: statusFilters.value,
caseLevel: caseFilters.value,
lastExecuteResult: executeResultFilters.value,
updateUserName: updateUserFilters.value,
createUserName: createUserFilters.value,
deleteUserName: deleteUserFilters.value,
},
condition: { condition: {
keyword: keyword.value, keyword: keyword.value,
filter: propsRes.value.filter, filter: {
reviewStatus: statusFilters.value,
caseLevel: caseFilters.value,
lastExecuteResult: executeResultFilters.value,
updateUserName: updateUserFilters.value,
createUserName: createUserFilters.value,
deleteUserName: deleteUserFilters.value,
},
combine: batchParams.value.condition, combine: batchParams.value.condition,
}, },
}; };
@ -714,11 +713,6 @@
createUserName: createUserFilters.value, createUserName: createUserFilters.value,
deleteUserName: deleteUserFilters.value, deleteUserName: deleteUserFilters.value,
}, },
condition: {
keyword: keyword.value,
filter: propsRes.value.filter,
combine: batchParams.value.condition,
},
}; };
} }