fix(接口测试): 修复自动生成mock数据时判断条件是长度小于的错误

修复自动生成mock数据时判断条件是长度小于的错误
This commit is contained in:
song-tianyang 2022-03-23 16:20:02 +08:00 committed by xiaomeinvG
parent 9943a1d507
commit 40526eb3b3

View File

@ -36,7 +36,7 @@ public class MockTestDataUtil {
} else if (StringUtils.equals(MockApiUtils.parseCondition(request.getCondition()), MockParamConditionEnum.LENGTH_SHOT_THAN.name())) {
int length = Integer.parseInt(request.getValue());
if(length > 1){
return RandomStringUtils.randomAlphanumeric(length);
return RandomStringUtils.randomAlphanumeric(length-1);
}else {
return "";
}