refactor: UI报告处理代码优化
This commit is contained in:
parent
8825abf2dc
commit
09f4d7057e
|
@ -80,7 +80,7 @@ public class ApiScenarioReportService {
|
|||
@Resource
|
||||
private ApiDefinitionExecResultMapper definitionExecResultMapper;
|
||||
@Resource
|
||||
private UiAutomationProxyService uiAutomationProxyService;
|
||||
private UiReporServicetProxy uiReporServicetProxy;
|
||||
|
||||
public void saveResult(List<RequestResult> requestResults, ResultDTO dto) {
|
||||
// 报告详情内容
|
||||
|
@ -94,7 +94,7 @@ public class ApiScenarioReportService {
|
|||
|
||||
public void saveUiResult(List<RequestResult> requestResults, ResultDTO dto) {
|
||||
// 报告详情内容
|
||||
uiAutomationProxyService.saveUiResult(dto.getReportId(), requestResults);
|
||||
uiReporServicetProxy.saveUiResult(dto.getReportId(), requestResults);
|
||||
}
|
||||
|
||||
public ApiScenarioReport testEnded(ResultDTO dto) {
|
||||
|
|
|
@ -12,7 +12,7 @@ import java.util.function.Function;
|
|||
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class UiAutomationProxyService {
|
||||
public class UiReporServicetProxy {
|
||||
|
||||
public Object saveUiResult(String reportId, List<RequestResult> queue) {
|
||||
return invoke((clazz) -> {
|
||||
|
@ -26,7 +26,7 @@ public class UiAutomationProxyService {
|
|||
}
|
||||
|
||||
private Object invoke(Function<Class, Method> getDeclaredMethod, Object... args) {
|
||||
Object uiAutomationService = CommonBeanFactory.getBean("uiAutomationService");
|
||||
Object uiAutomationService = CommonBeanFactory.getBean("uiReportService");
|
||||
try {
|
||||
Class<?> clazz = uiAutomationService.getClass();
|
||||
Method postProcessUiReport = getDeclaredMethod.apply(clazz);
|
Loading…
Reference in New Issue