refactor(测试计划): 执行历史展示优化
This commit is contained in:
parent
cca651fa26
commit
aba2e91ef9
|
@ -1,53 +1,27 @@
|
|||
package io.metersphere.plan.dto.response;
|
||||
|
||||
import io.metersphere.plan.domain.TestPlanCaseExecuteHistory;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author wx
|
||||
*/
|
||||
@Data
|
||||
public class TestPlanCaseExecHistoryResponse implements Serializable {
|
||||
public class TestPlanCaseExecHistoryResponse extends TestPlanCaseExecuteHistory {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "id")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "用例id")
|
||||
private String caseId;
|
||||
|
||||
@Schema(description = "执行结果")
|
||||
private String status;
|
||||
|
||||
@Schema(description = "评论内容")
|
||||
private byte[] content;
|
||||
|
||||
@Schema(description = "评审解析内容")
|
||||
@Schema(description = "评审解析内容")
|
||||
private String contentText;
|
||||
|
||||
@Schema(description = "步骤结果")
|
||||
private String stepsExecResult;
|
||||
|
||||
@Schema(description = "执行人")
|
||||
private String createUser;
|
||||
|
||||
@Schema(description = "执行人姓名")
|
||||
private String userName;
|
||||
|
||||
@Schema(description = "执行人头像")
|
||||
@Schema(description = "执行人头像")
|
||||
private String userLogo;
|
||||
|
||||
@Schema(description = "执行人邮箱")
|
||||
@Schema(description = "执行人邮箱")
|
||||
private String email;
|
||||
|
||||
@Schema(description = "执行时间")
|
||||
private String createTime;
|
||||
|
||||
@Schema(description = "通知人")
|
||||
private String notifier;
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
tpceh.case_id as caseId,
|
||||
tpceh.status as status,
|
||||
tpceh.content as content,
|
||||
tpceh.steps as stepsExecResult,
|
||||
tpceh.steps as steps,
|
||||
tpceh.create_user as createUser,
|
||||
tpceh.create_time as createTime,
|
||||
tpceh.notifier as notifier,
|
||||
|
|
|
@ -436,7 +436,9 @@ public class TestPlanFunctionalCaseService extends TestPlanResourceService {
|
|||
executeHistory.setTestPlanId(request.getTestPlanId());
|
||||
executeHistory.setCaseId(request.getCaseId());
|
||||
executeHistory.setStatus(request.getLastExecResult());
|
||||
executeHistory.setContent(request.getContent().getBytes());
|
||||
if (StringUtils.isNotBlank(request.getContent())) {
|
||||
executeHistory.setContent(request.getContent().getBytes());
|
||||
}
|
||||
executeHistory.setSteps(StringUtils.defaultIfBlank(request.getStepsExecResult(), StringUtils.EMPTY).getBytes(StandardCharsets.UTF_8));
|
||||
executeHistory.setDeleted(false);
|
||||
executeHistory.setNotifier(request.getNotifier());
|
||||
|
@ -545,6 +547,9 @@ public class TestPlanFunctionalCaseService extends TestPlanResourceService {
|
|||
if (item.getContent() != null) {
|
||||
item.setContentText(new String(item.getContent(), StandardCharsets.UTF_8));
|
||||
}
|
||||
if (item.getSteps() != null) {
|
||||
item.setStepsExecResult(new String(item.getSteps(), StandardCharsets.UTF_8));
|
||||
}
|
||||
});
|
||||
return list;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue