refactor(用例管理): 修改类名
This commit is contained in:
parent
95c837cb7c
commit
5c47422999
|
@ -11,7 +11,7 @@ import io.metersphere.functional.mapper.FunctionalCaseFollowerMapper;
|
||||||
import io.metersphere.functional.mapper.FunctionalCaseMapper;
|
import io.metersphere.functional.mapper.FunctionalCaseMapper;
|
||||||
import io.metersphere.functional.request.*;
|
import io.metersphere.functional.request.*;
|
||||||
import io.metersphere.functional.result.FunctionalCaseResultCode;
|
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.project.service.ProjectTemplateService;
|
||||||
import io.metersphere.sdk.constants.ApplicationNumScope;
|
import io.metersphere.sdk.constants.ApplicationNumScope;
|
||||||
import io.metersphere.sdk.constants.FunctionalCaseExecuteResult;
|
import io.metersphere.sdk.constants.FunctionalCaseExecuteResult;
|
||||||
|
@ -75,7 +75,7 @@ public class FunctionalCaseService {
|
||||||
SqlSessionFactory sqlSessionFactory;
|
SqlSessionFactory sqlSessionFactory;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ExtProjectVersionMapper extProjectVersionMapper;
|
private ExtBaseProjectVersionMapper extBaseProjectVersionMapper;
|
||||||
|
|
||||||
public FunctionalCase addFunctionalCase(FunctionalCaseAddRequest request, List<MultipartFile> files, String userId) {
|
public FunctionalCase addFunctionalCase(FunctionalCaseAddRequest request, List<MultipartFile> files, String userId) {
|
||||||
String caseId = IDGenerator.nextStr();
|
String caseId = IDGenerator.nextStr();
|
||||||
|
@ -111,7 +111,7 @@ public class FunctionalCaseService {
|
||||||
functionalCase.setCreateUser(userId);
|
functionalCase.setCreateUser(userId);
|
||||||
functionalCase.setCreateTime(System.currentTimeMillis());
|
functionalCase.setCreateTime(System.currentTimeMillis());
|
||||||
functionalCase.setUpdateTime(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);
|
functionalCaseMapper.insertSelective(functionalCase);
|
||||||
//附属表
|
//附属表
|
||||||
FunctionalCaseBlob functionalCaseBlob = new FunctionalCaseBlob();
|
FunctionalCaseBlob functionalCaseBlob = new FunctionalCaseBlob();
|
||||||
|
|
|
@ -2,7 +2,7 @@ package io.metersphere.project.mapper;
|
||||||
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
public interface ExtProjectVersionMapper {
|
public interface ExtBaseProjectVersionMapper {
|
||||||
|
|
||||||
String getDefaultVersion(@Param("projectId") String projectId);
|
String getDefaultVersion(@Param("projectId") String projectId);
|
||||||
}
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<!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="getDefaultVersion" resultType="java.lang.String">
|
||||||
select id from project_version where project_id = #{projectId} and status = 'open' and latest = TRUE LIMIT 1
|
select id from project_version where project_id = #{projectId} and status = 'open' and latest = TRUE LIMIT 1
|
Loading…
Reference in New Issue