fix(用例管理): 修复取消关联评审评论不显示数据问题

--bug=1036196 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001036196
--bug=1036861 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001036861
This commit is contained in:
guoyuqi 2024-03-06 19:44:01 +08:00 committed by Craftsman
parent 259562a73d
commit 56a93a59b6
4 changed files with 32 additions and 2 deletions

View File

@ -15,6 +15,8 @@ public interface ExtCaseReviewHistoryMapper {
List<CaseReviewHistoryDTO> getHistoryListWidthAbandoned(@Param("caseId") String caseId, @Param("reviewId") String reviewId); List<CaseReviewHistoryDTO> getHistoryListWidthAbandoned(@Param("caseId") String caseId, @Param("reviewId") String reviewId);
List<CaseReviewHistoryDTO> getHistoryListWidthCaseId(@Param("caseId") String caseId, @Param("reviewId") String reviewId);
void updateDelete(@Param("caseIds") List<String> caseIds, @Param("reviewId") String reviewId, @Param("delete") boolean delete); void updateDelete(@Param("caseIds") List<String> caseIds, @Param("reviewId") String reviewId, @Param("delete") boolean delete);
void updateAbandoned(@Param("caseId") String caseId); void updateAbandoned(@Param("caseId") String caseId);

View File

@ -52,6 +52,34 @@
order by ch.create_time desc order by ch.create_time desc
</select> </select>
<select id="getHistoryListWidthCaseId" resultType="io.metersphere.functional.dto.CaseReviewHistoryDTO">
SELECT
ch.id,
ch.review_id,
ch.case_id,
ch.status,
ch.notifier,
ch.create_user,
ch.create_time,
ch.content,
u.name as userName,
ux.avatar as userLogo,
cr.name as reviewName,
u.email as email
FROM
case_review_history ch
left join user u on ch.create_user = u.id
left join user_extend ux on ch.create_user = ux.id
left join case_review cr on ch.review_id = cr.id
where ch.case_id = #{caseId}
<if test="reviewId != null and reviewId != ''">
and ch.review_id = #{reviewId}
</if>
order by ch.create_time desc
</select>
<update id="updateDelete"> <update id="updateDelete">
update case_review_history update case_review_history
set deleted = #{delete} set deleted = #{delete}

View File

@ -37,7 +37,7 @@ public class FunctionalCaseReviewService {
} }
public List<CaseReviewHistoryDTO> getCaseReviewHistory(String caseId) { public List<CaseReviewHistoryDTO> getCaseReviewHistory(String caseId) {
List<CaseReviewHistoryDTO> list = extCaseReviewHistoryMapper.getHistoryListWidthAbandoned(caseId, null); List<CaseReviewHistoryDTO> list = extCaseReviewHistoryMapper.getHistoryListWidthCaseId(caseId, null);
for (CaseReviewHistoryDTO caseReviewHistoryDTO : list) { for (CaseReviewHistoryDTO caseReviewHistoryDTO : list) {
if (StringUtils.equalsIgnoreCase(caseReviewHistoryDTO.getCreateUser(), UserRoleScope.SYSTEM)) { if (StringUtils.equalsIgnoreCase(caseReviewHistoryDTO.getCreateUser(), UserRoleScope.SYSTEM)) {
caseReviewHistoryDTO.setUserName(Translator.get("case_review_history.system")); caseReviewHistoryDTO.setUserName(Translator.get("case_review_history.system"));

View File

@ -106,7 +106,7 @@ export default {
'caseManagement.featureCase.notReviewed': '未评审', 'caseManagement.featureCase.notReviewed': '未评审',
'caseManagement.featureCase.reviewing': '评审中', 'caseManagement.featureCase.reviewing': '评审中',
'caseManagement.featureCase.passed': '已通过', 'caseManagement.featureCase.passed': '已通过',
'caseManagement.featureCase.notPass': '通过', 'caseManagement.featureCase.notPass': '通过',
'caseManagement.featureCase.retrial': '重新提审', 'caseManagement.featureCase.retrial': '重新提审',
'caseManagement.featureCase.nonExecution': '未执行', 'caseManagement.featureCase.nonExecution': '未执行',
'caseManagement.featureCase.failure': '失败', 'caseManagement.featureCase.failure': '失败',