Authored by wangnan

fix

... ... @@ -67,18 +67,14 @@ public class RobotQuestionServiceImpl extends BaseService implements IRobotQuest
if (StringUtils.isBlank(keyword)) {
return new SearchApiResult().setCode(400).setMessage("keyword不能为空!");
}
String minimumShouldMatch = paramMap.get("minimumShouldMatch");
if (StringUtils.isBlank(minimumShouldMatch)) {
minimumShouldMatch = "30%";
} else {
boolean result = minimumShouldMatch.matches("[0-9]+");
if (result) {
Integer mininum = Integer.valueOf(minimumShouldMatch);
if (mininum > 0 && mininum <= 100) {
minimumShouldMatch = mininum + "%";
String minimumShouldMatch = "30%";
String minimumShouldMatchNumber = paramMap.get("minimumShouldMatch");
if (StringUtils.isNotBlank(minimumShouldMatchNumber)) {
if (minimumShouldMatchNumber.matches("[0-9]+")) {
Integer miniNum = Integer.valueOf(minimumShouldMatchNumber);
if (miniNum > 0 && miniNum <= 100) {
minimumShouldMatch = miniNum + "%";
}
} else {
minimumShouldMatch = "30%";
}
}
... ...