fix: 解决报错 解决我创建的用例查询错误

This commit is contained in:
guoyuqi 2021-10-26 18:00:28 +08:00 committed by 刘瑞斌
parent c0daa6018d
commit 550766e072
3 changed files with 3 additions and 2 deletions

View File

@ -240,7 +240,7 @@ public class ApiDefinitionService {
} }
} }
//update userId //update userId
if(request.getUserId().equals("currentUserId")){ if(request.getUserId()!=null&&request.getUserId().equals("currentUserId")){
request.setUserId(SessionUtils.getUserId()); request.setUserId(SessionUtils.getUserId());
} }
return request; return request;

View File

@ -42,6 +42,7 @@ public class WorkstationService {
operatorValue.put("operator","current user"); operatorValue.put("operator","current user");
operatorValue.put("value","current user"); operatorValue.put("value","current user");
combine.put("creator",operatorValue); combine.put("creator",operatorValue);
testPlanRequest.setCombine(combine);
apiTestCaseRequest.setCombine(combine); apiTestCaseRequest.setCombine(combine);
ApiScenarioRequest apiScenarioRequest = new ApiScenarioRequest(); ApiScenarioRequest apiScenarioRequest = new ApiScenarioRequest();
apiScenarioRequest.setCombine(combine); apiScenarioRequest.setCombine(combine);

View File

@ -158,7 +158,7 @@ public class TestCaseReviewService {
return new ArrayList<>(); return new ArrayList<>();
} }
//update reviewerId //update reviewerId
if(request.getReviewerId().equals("currentUserId")){ if(request.getReviewerId()!=null&&request.getReviewerId().equals("currentUserId")){
request.setReviewerId(SessionUtils.getUserId()); request.setReviewerId(SessionUtils.getUserId());
} }
return extTestCaseReviewMapper.list(request); return extTestCaseReviewMapper.list(request);