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.framework.commons.pojo.CommonResult;
|
||||
import cd.casic.framework.commons.pojo.PageResult;
|
||||
import com.jcraft.jsch.JSchException;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@ -43,7 +42,7 @@ public class TestCaseManagerController {
|
||||
|
||||
|
||||
@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());
|
||||
|
||||
|
@ -113,7 +113,7 @@ public class ScaMirrorWorker extends HttpWorker {
|
||||
append(context,"SCA-MIRROR节点执行失败失败,请检查当前节点配置!");
|
||||
append(context,e.getMessage());
|
||||
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 {
|
||||
append(context,"==================SCA接口异常,调用失败=================");
|
||||
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.framework.commons.pojo.PageResult;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jcraft.jsch.JSchException;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import java.util.List;
|
||||
@ -23,7 +22,7 @@ public interface TestCaseManagerService extends IService<TestCaseManager> {
|
||||
|
||||
String create(@Valid TestCaseManagerReq req);
|
||||
|
||||
void delete(String id) throws JSchException, InterruptedException;
|
||||
void delete(String id);
|
||||
|
||||
void updateTestCaseManager(@Valid TestCaseManagerReq req);
|
||||
|
||||
|
@ -63,7 +63,7 @@ public class TestCaseManagerServiceImpl extends ServiceImpl<TestCaseManagerDao,
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(String id) throws JSchException, InterruptedException {
|
||||
public void delete(String id){
|
||||
TestCaseManager testCaseManager = testCaseManagerDao.selectById(id);
|
||||
if (ObjectUtils.isEmpty(testCaseManager)){
|
||||
throw new ServiceException(GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode(),"数据错误请联系管理员");
|
||||
|
Loading…
x
Reference in New Issue
Block a user