sql — там нужно вытащить количество чисел,которые попадают в диапазоны рефакторинг кода
Таблица
| NUM |
|-----|
| 1 | 0-9 - 1 60-69 - 0
| 99 | 10-19 - 0 70-79 - 0
| 33 | 20-29 - 1 80-89 - 0
| 21 | 30-39 - 0 90-99 - 2
| 99 | 40-49 - 0
| _ | 50-59 - 0
-------
Num - [1:99]
@Component no usages
@RequiredArgsConstructor
public class VerifyHelper {
private UserValidationServiceImpl us; 3 usages
private ParamServiceImpl serviceImpl; 2 usages
public String performAction(String str) { no usages
if (str != null && str.length() > 0) {
if (serviceImpl.getParamVal("NEWCLIENTMODEL").equals("YES")) {
final String[] split = str.split("\|");
StringBuffer sb = new StringBuffer();
sb.append("id>").append(split[0]).append("id>");
sb.append("code>").append(split[1]).append("code>");
sb.append("date>").append(new Date()).append("date>");
sb.append("");
return us.validate(sb.toString());
} else {
StringBuffer sb = new StringBuffer();
sb.append("").append("id>").append(str).append("id>")
.append("date>").append(new Date()).append("date>")
.append("");
return us.validate(sb.toString());
}
} else {
return "INVALID_PARAMETER";
}
}
public VerifyHelper() { no usages
us = (UserValidationServiceImpl) SpringSupport.getBean("userValidation");
serviceImpl = (ParamServiceImpl) SpringSupport.getBean("paramService");
}
}