0630 ljc 修改测试用例管理接口
This commit is contained in:
parent
2b56c7a87d
commit
f817f21c89
@ -8,7 +8,6 @@ import cd.casic.ci.process.process.dataObject.base.BaseIdReq;
|
|||||||
import cd.casic.ci.process.process.service.testCase.TestCaseManagerService;
|
import cd.casic.ci.process.process.service.testCase.TestCaseManagerService;
|
||||||
import cd.casic.framework.commons.pojo.CommonResult;
|
import cd.casic.framework.commons.pojo.CommonResult;
|
||||||
import cd.casic.framework.commons.pojo.PageResult;
|
import cd.casic.framework.commons.pojo.PageResult;
|
||||||
import com.jcraft.jsch.JSchException;
|
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
@ -43,7 +42,7 @@ public class TestCaseManagerController {
|
|||||||
|
|
||||||
|
|
||||||
@PostMapping(path="/delete")
|
@PostMapping(path="/delete")
|
||||||
public CommonResult<Void> delete(@RequestBody @Valid BaseIdReq req) throws JSchException, InterruptedException {
|
public CommonResult<Void> delete(@RequestBody @Valid BaseIdReq req){
|
||||||
|
|
||||||
testCaseManagerService.delete(req.getId());
|
testCaseManagerService.delete(req.getId());
|
||||||
|
|
||||||
|
@ -113,7 +113,7 @@ public class ScaMirrorWorker extends HttpWorker {
|
|||||||
append(context,"SCA-MIRROR节点执行失败失败,请检查当前节点配置!");
|
append(context,"SCA-MIRROR节点执行失败失败,请检查当前节点配置!");
|
||||||
append(context,e.getMessage());
|
append(context,e.getMessage());
|
||||||
log.error("==================SCA-MIRROR节点执行失败=================",e);
|
log.error("==================SCA-MIRROR节点执行失败=================",e);
|
||||||
throw new ServiceException(GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode(),"SCA-SBOM节点执行失败");
|
throw new ServiceException(GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode(),"SCA-MIRROR节点执行失败");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -156,7 +156,7 @@ public class ScaMirrorWorker extends HttpWorker {
|
|||||||
} else {
|
} else {
|
||||||
append(context,"==================SCA接口异常,调用失败=================");
|
append(context,"==================SCA接口异常,调用失败=================");
|
||||||
append(context,message);
|
append(context,message);
|
||||||
throw new ServiceException(GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode(),"SCA-SBOM节点执行失败");
|
throw new ServiceException(GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode(),"SCA-MIRROR节点执行失败");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,7 +7,6 @@ import cd.casic.ci.process.dto.resp.testCase.TestCaseManagerResp;
|
|||||||
import cd.casic.ci.process.process.dataObject.testCase.TestCaseManager;
|
import cd.casic.ci.process.process.dataObject.testCase.TestCaseManager;
|
||||||
import cd.casic.framework.commons.pojo.PageResult;
|
import cd.casic.framework.commons.pojo.PageResult;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.jcraft.jsch.JSchException;
|
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -23,7 +22,7 @@ public interface TestCaseManagerService extends IService<TestCaseManager> {
|
|||||||
|
|
||||||
String create(@Valid TestCaseManagerReq req);
|
String create(@Valid TestCaseManagerReq req);
|
||||||
|
|
||||||
void delete(String id) throws JSchException, InterruptedException;
|
void delete(String id);
|
||||||
|
|
||||||
void updateTestCaseManager(@Valid TestCaseManagerReq req);
|
void updateTestCaseManager(@Valid TestCaseManagerReq req);
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ public class TestCaseManagerServiceImpl extends ServiceImpl<TestCaseManagerDao,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void delete(String id) throws JSchException, InterruptedException {
|
public void delete(String id){
|
||||||
TestCaseManager testCaseManager = testCaseManagerDao.selectById(id);
|
TestCaseManager testCaseManager = testCaseManagerDao.selectById(id);
|
||||||
if (ObjectUtils.isEmpty(testCaseManager)){
|
if (ObjectUtils.isEmpty(testCaseManager)){
|
||||||
throw new ServiceException(GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode(),"数据错误请联系管理员");
|
throw new ServiceException(GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode(),"数据错误请联系管理员");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user