diff --git a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java index abc29f336b..9fa0fdc237 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java @@ -240,7 +240,7 @@ public class ApiDefinitionService { } } //update userId - if(request.getUserId()!=null&&request.getUserId().equals("currentUserId")){ + if(StringUtils.equalsIgnoreCase(request.getUserId(),"currentUserId")){ request.setUserId(SessionUtils.getUserId()); } return request; diff --git a/backend/src/main/java/io/metersphere/track/service/TestCaseReviewService.java b/backend/src/main/java/io/metersphere/track/service/TestCaseReviewService.java index 949644e09e..049eb93adc 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestCaseReviewService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestCaseReviewService.java @@ -158,7 +158,7 @@ public class TestCaseReviewService { return new ArrayList<>(); } //update reviewerId - if(request.getReviewerId()!=null&&request.getReviewerId().equals("currentUserId")){ + if(StringUtils.equalsIgnoreCase(request.getReviewerId(),"currentUserId")){ request.setReviewerId(SessionUtils.getUserId()); } return extTestCaseReviewMapper.list(request);