Commit cd093b2e authored by 高滢's avatar 高滢

查询 无效字符处理

parent d8222a66
......@@ -20,6 +20,9 @@ public class TestScenarioServiceImpl extends ServiceImpl<TestScenarioMapper, Tes
@Override
public List<TestScenario> selectTestScenarioList(TestScenarioRequest testScenarioRequest){
if(testScenarioRequest.getTestScenario() != null && (testScenarioRequest.getTestScenario().contains("%") ||testScenarioRequest.getTestScenario().contains("_") )){
testScenarioRequest.setTestScenario(testScenarioRequest.getTestScenario().toString().replaceAll("%","/%").replaceAll("_","/_"));
}
return testScenarioMapper.selectTestScenarioList(testScenarioRequest);
}
}
......@@ -29,6 +29,9 @@ public class TestTypeServiceImpl extends ServiceImpl<TestTypeMapper, TestType> i
@Override
public List<TestType> selectTestTypeList(TestTypeRequest testTypeRequest)
{
if(testTypeRequest.getTestType() != null && (testTypeRequest.getTestType().contains("%") ||testTypeRequest.getTestType().contains("_") )){
testTypeRequest.setTestType(testTypeRequest.getTestType().toString().replaceAll("%","/%").replaceAll("_","/_"));
}
return testTypeMapper.selectTestTypeList(testTypeRequest);
}
}
......@@ -31,6 +31,9 @@ public class TestUseCaseServiceImpl extends ServiceImpl<TestUseCaseMapper, TestU
*/
@Override
public List<TestUseCase> selectseCaseList(TestUserCaseRequest testUserCaseRequest){
if(testUserCaseRequest.getSearchKeywords() != null && (testUserCaseRequest.getSearchKeywords().contains("%") ||testUserCaseRequest.getSearchKeywords().contains("_") )){
testUserCaseRequest.setSearchKeywords(testUserCaseRequest.getSearchKeywords().toString().replaceAll("%","/%").replaceAll("_","/_"));
}
return testUseCaseMapper.selectseCaseList(testUserCaseRequest);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment