demand: 按地址匹配特区标签支持校验nbsp空格
This commit is contained in:
parent
51dbe5ed77
commit
0c8ae4b9a1
@ -276,7 +276,7 @@ public class EmisSpecialZoneAddressMatchServiceImpl implements IEmisSpecialZoneA
|
||||
}
|
||||
|
||||
// 去掉所有空白字符并统一转大写
|
||||
String normalizedAddress = address.replaceAll("\\s+", "").toUpperCase();
|
||||
String normalizedAddress = address.replaceAll("\\p{Z}+", "").toUpperCase();
|
||||
if (StringUtils.isBlank(normalizedAddress))
|
||||
{
|
||||
return null;
|
||||
|
||||
@ -65,7 +65,7 @@
|
||||
select id, country_code, province_code, special_zone_name, special_zone_tag, remark, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
|
||||
from emis_special_zone_address_match a
|
||||
where a.del_flag = '0'
|
||||
and #{normalizedAddress} like concat('%', upper(replace(a.special_zone_tag, ' ', '')), '%')
|
||||
and #{normalizedAddress} like concat('%', upper(replace(replace(replace(a.special_zone_tag, ' ', ''), char(160), ''), char(12288), '')), '%')
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user