refactor(用例管理): 修改类名

This commit is contained in:
WangXu10 2023-11-13 10:24:37 +08:00 committed by 刘瑞斌
parent 95c837cb7c
commit 5c47422999
3 changed files with 5 additions and 5 deletions

View File

@ -11,7 +11,7 @@ import io.metersphere.functional.mapper.FunctionalCaseFollowerMapper;
import io.metersphere.functional.mapper.FunctionalCaseMapper;
import io.metersphere.functional.request.*;
import io.metersphere.functional.result.FunctionalCaseResultCode;
import io.metersphere.project.mapper.ExtProjectVersionMapper;
import io.metersphere.project.mapper.ExtBaseProjectVersionMapper;
import io.metersphere.project.service.ProjectTemplateService;
import io.metersphere.sdk.constants.ApplicationNumScope;
import io.metersphere.sdk.constants.FunctionalCaseExecuteResult;
@ -75,7 +75,7 @@ public class FunctionalCaseService {
SqlSessionFactory sqlSessionFactory;
@Resource
private ExtProjectVersionMapper extProjectVersionMapper;
private ExtBaseProjectVersionMapper extBaseProjectVersionMapper;
public FunctionalCase addFunctionalCase(FunctionalCaseAddRequest request, List<MultipartFile> files, String userId) {
String caseId = IDGenerator.nextStr();
@ -111,7 +111,7 @@ public class FunctionalCaseService {
functionalCase.setCreateUser(userId);
functionalCase.setCreateTime(System.currentTimeMillis());
functionalCase.setUpdateTime(System.currentTimeMillis());
functionalCase.setVersionId(StringUtils.defaultIfBlank(request.getVersionId(), extProjectVersionMapper.getDefaultVersion(request.getProjectId())));
functionalCase.setVersionId(StringUtils.defaultIfBlank(request.getVersionId(), extBaseProjectVersionMapper.getDefaultVersion(request.getProjectId())));
functionalCaseMapper.insertSelective(functionalCase);
//附属表
FunctionalCaseBlob functionalCaseBlob = new FunctionalCaseBlob();

View File

@ -2,7 +2,7 @@ package io.metersphere.project.mapper;
import org.apache.ibatis.annotations.Param;
public interface ExtProjectVersionMapper {
public interface ExtBaseProjectVersionMapper {
String getDefaultVersion(@Param("projectId") String projectId);
}

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="io.metersphere.project.mapper.ExtProjectVersionMapper">
<mapper namespace="io.metersphere.project.mapper.ExtBaseProjectVersionMapper">
<select id="getDefaultVersion" resultType="java.lang.String">
select id from project_version where project_id = #{projectId} and status = 'open' and latest = TRUE LIMIT 1