1. The character string is divided by "." period, use the following operations
String[] segmentsattr = segments.split(" \\. "); //Split by "."
2. The database type is number type. When Java obtains data and converts it to Int type:
List list = query.list();
int count = list.get(0);
Reported an error: java.math.BigDecimal cannot be cast to java.lang.Integer
solution:
Listlist = query.list();
int count = 0;
if(null != list && list.size() > 0){
count = Integer.parseInt(list.get(0).toString());
}
return count;
}