refactor(用例评审): 用例评审历史显示系统触发
This commit is contained in:
parent
7fae8fd801
commit
f2ec50e15b
|
@ -146,3 +146,4 @@ case_review.single=单人评审
|
|||
case_review.multiple=多人评审
|
||||
case_review.not.exist=用例评审不存在
|
||||
case_review_content.not.exist = 评审意见不能为空
|
||||
case_review_history.system=系统触发
|
||||
|
|
|
@ -163,4 +163,5 @@ case_review.single=Single person review
|
|||
case_review.multiple=Multiple reviewers
|
||||
case_review.not.exist=Case review does not exist
|
||||
case_review_content.not.exist = Review comments cannot be empty
|
||||
case_review_history.system=System trigger
|
||||
|
||||
|
|
|
@ -162,4 +162,5 @@ case_review.single=单人评审
|
|||
case_review.multiple=多人评审
|
||||
case_review.not.exist=用例评审不存在
|
||||
case_review_content.not.exist = 评审意见不能为空
|
||||
case_review_history.system=系统触发
|
||||
|
||||
|
|
|
@ -163,4 +163,5 @@ case_review.single=單人評審
|
|||
case_review.multiple=多人評審
|
||||
case_review.not.exist=用例評審不存在
|
||||
case_review_content.not.exist = 評審意見不能為空
|
||||
case_review_history.system=系統觸發
|
||||
|
||||
|
|
|
@ -218,7 +218,12 @@ public class ReviewFunctionalCaseService {
|
|||
public List<CaseReviewHistoryDTO> getCaseReviewHistoryList(String reviewId, String caseId) {
|
||||
List<CaseReviewHistoryDTO> list = extCaseReviewHistoryMapper.list(caseId, reviewId);
|
||||
for (CaseReviewHistoryDTO caseReviewHistoryDTO : list) {
|
||||
caseReviewHistoryDTO.setContentText(new String(caseReviewHistoryDTO.getContent(),StandardCharsets.UTF_8));
|
||||
if (StringUtils.equalsIgnoreCase(caseReviewHistoryDTO.getCreateUser(),"system")) {
|
||||
caseReviewHistoryDTO.setUserName(Translator.get("case_review_history.system"));
|
||||
}
|
||||
if (caseReviewHistoryDTO.getContent() != null) {
|
||||
caseReviewHistoryDTO.setContentText(new String(caseReviewHistoryDTO.getContent(),StandardCharsets.UTF_8));
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
|
|
@ -231,6 +231,14 @@ public class ReviewFunctionalCaseControllerTests extends BaseTest {
|
|||
public void getListSuccess() throws Exception {
|
||||
List<CaseReview> caseReviews = getCaseReviews("创建用例评审1");
|
||||
String reviewId = caseReviews.get(0).getId();
|
||||
CaseReviewHistory caseReviewHistory = new CaseReviewHistory();
|
||||
caseReviewHistory.setReviewId(reviewId);
|
||||
caseReviewHistory.setCaseId("gyqReviewCaseTest");
|
||||
caseReviewHistory.setCreateUser("system");
|
||||
caseReviewHistory.setStatus(FunctionalCaseReviewStatus.RE_REVIEWED.toString());
|
||||
caseReviewHistory.setId("test");
|
||||
caseReviewHistory.setCreateTime(System.currentTimeMillis());
|
||||
caseReviewHistoryMapper.insertSelective(caseReviewHistory);
|
||||
List<CaseReviewHistoryDTO> gyqReviewCaseTest = getCaseReviewHistoryList("gyqReviewCaseTest", reviewId);
|
||||
System.out.println(JSON.toJSONString(gyqReviewCaseTest));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue