|
@@ -1,5 +1,6 @@
|
|
package cn.cslg.pas.factorys.EsBuilderFactory;
|
|
package cn.cslg.pas.factorys.EsBuilderFactory;
|
|
|
|
|
|
|
|
+import cn.cslg.pas.common.utils.StringUtils;
|
|
import co.elastic.clients.elasticsearch._types.query_dsl.Query;
|
|
import co.elastic.clients.elasticsearch._types.query_dsl.Query;
|
|
import co.elastic.clients.elasticsearch._types.query_dsl.QueryBuilders;
|
|
import co.elastic.clients.elasticsearch._types.query_dsl.QueryBuilders;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
@@ -24,7 +25,7 @@ public class WildcardQueryBuilder implements IQueryBuilder{
|
|
String s = "";
|
|
String s = "";
|
|
if (list.contains(field)) {
|
|
if (list.contains(field)) {
|
|
String sub = value.substring(0, 2);
|
|
String sub = value.substring(0, 2);
|
|
- if ((value.length() == 13 && !sub.equalsIgnoreCase("JP") && !sub.equalsIgnoreCase("KR")) || value.length() == 15) {
|
|
|
|
|
|
+ if ((StringUtils.isPositiveInteger(sub) || sub.equalsIgnoreCase("CN")) && (value.length() == 13|| value.length() == 15)) {
|
|
String frontPart = value.substring(0, value.length() - 1);
|
|
String frontPart = value.substring(0, value.length() - 1);
|
|
String afterPart = value.substring(value.length() - 1);
|
|
String afterPart = value.substring(value.length() - 1);
|
|
String s1 = frontPart + "." + afterPart;
|
|
String s1 = frontPart + "." + afterPart;
|