fix(测试计划): 修复测试计划详情页关联用例无需增加校验问题

This commit is contained in:
guoyuqi 2024-05-22 17:01:51 +08:00 committed by Craftsman
parent bdeabaf54b
commit 2b7acc53e5
1 changed files with 0 additions and 14 deletions

View File

@ -45,8 +45,6 @@ import io.metersphere.system.log.aspect.OperationLogAspect;
import io.metersphere.system.log.constants.OperationLogModule;
import io.metersphere.system.log.constants.OperationLogType;
import io.metersphere.system.log.dto.LogDTO;
import io.metersphere.system.log.service.OperationLogService;
import io.metersphere.system.mapper.ExtCheckOwnerMapper;
import io.metersphere.system.mapper.ExtUserMapper;
import io.metersphere.system.notice.constants.NoticeConstants;
import io.metersphere.system.service.UserLoginService;
@ -107,20 +105,11 @@ public class TestPlanFunctionalCaseService extends TestPlanResourceService {
private FunctionalCaseAttachmentService functionalCaseAttachmentService;
@Resource
private TestPlanSendNoticeService testPlanSendNoticeService;
@Resource
private FunctionalCaseMapper functionalCaseMapper;
@Resource
private OperationLogService operationLogService;
@Resource
private ExtCheckOwnerMapper extCheckOwnerMapper;
@Resource
private ExtUserMapper extUserMapper;
private static final String CASE_MODULE_COUNT_ALL = "all";
private static final String FUNCTIONAL_CASE = "functional_case";
private static final String CHECK_OWNER_CASE = "check_owner_case";
@Override
public void deleteBatchByTestPlanId(List<String> testPlanIdList) {
@ -559,9 +548,6 @@ public class TestPlanFunctionalCaseService extends TestPlanResourceService {
public TestPlanCaseDetailResponse getFunctionalCaseDetail(String id, String userId) {
TestPlanFunctionalCase planFunctionalCase = testPlanFunctionalCaseMapper.selectByPrimaryKey(id);
String caseId = planFunctionalCase.getFunctionalCaseId();
if (!extCheckOwnerMapper.checkoutOwner(FUNCTIONAL_CASE, userId, List.of(caseId))) {
throw new MSException(Translator.get(CHECK_OWNER_CASE));
}
FunctionalCaseDetailDTO functionalCaseDetail = functionalCaseService.getFunctionalCaseDetail(caseId, userId);
String caseDetailSteps = functionalCaseDetail.getSteps();
TestPlanCaseExecuteHistoryExample testPlanCaseExecuteHistoryExample = new TestPlanCaseExecuteHistoryExample();