Commit 38a737f9 authored by 技术部-韩成龙's avatar 技术部-韩成龙

地区校验fix

parent 8af3c618
......@@ -56,9 +56,9 @@ public class AreaVerifyImpl extends AbstractProductRuleVerifyImpl {
UserAssociationBean userInfo = param.getUserInfo();
AtomicInteger hit = new AtomicInteger(0);
if (StringUtils.isNotBlank(ruleConcrete.getNativeList())){
List<Integer> nativeList = JacksonUtil.deserializeList(ruleConcrete.getNativeList(), Integer.class);
String nativeList = ruleConcrete.getNativeList();
String nativeCode = IdCardUtil.getCityCodeByIdCard(userInfo.getIdNo());
if (StringUtils.isNotBlank(nativeCode) && nativeList.contains(Integer.parseInt(nativeCode))){
if (StringUtils.isNotBlank(nativeCode) && nativeList.contains(nativeCode)){
hit.incrementAndGet();
}
if (AreaEnum.CHOOSE_ONE_MORE.equals(param.getAreaNum())){
......@@ -67,14 +67,14 @@ public class AreaVerifyImpl extends AbstractProductRuleVerifyImpl {
}
}
if (StringUtils.isNotBlank(ruleConcrete.getResidenceList())){
List<Integer> residenceList = JacksonUtil.deserializeList(ruleConcrete.getResidenceList(), Integer.class);
String residenceList = ruleConcrete.getResidenceList();
SDKUserInfo userExtInfo = userCenterService.getSDKUserExtInfo(userInfo.getPhoneNo(), null);
List<UserAddressInfo> addressList = userExtInfo.getAddressList();
if (!CollectionUtils.isEmpty(addressList)){
UserAddressInfo userAddressInfo = addressList.get(0);
boolean residenceResult = (userAddressInfo.getDistrictCode() != null && residenceList.contains(userAddressInfo.getDistrictCode()))
|| (userAddressInfo.getCityCode() != null && residenceList.contains(userAddressInfo.getCityCode()))
|| (userAddressInfo.getProvinceCode() != null && residenceList.contains(userAddressInfo.getProvinceCode()));
boolean residenceResult = (userAddressInfo.getDistrictCode() != null && residenceList.contains(String.valueOf(userAddressInfo.getDistrictCode())))
|| (userAddressInfo.getCityCode() != null && residenceList.contains(String.valueOf(userAddressInfo.getCityCode())))
|| (userAddressInfo.getProvinceCode() != null && residenceList.contains(String.valueOf(userAddressInfo.getProvinceCode())));
if (residenceResult){
hit.incrementAndGet();
}
......@@ -86,7 +86,7 @@ public class AreaVerifyImpl extends AbstractProductRuleVerifyImpl {
}
}
if (StringUtils.isNotBlank(ruleConcrete.getTelAreaNameList())){
List<String> telAreaNameList = JacksonUtil.deserializeList(ruleConcrete.getTelAreaNameList(), String.class);
String telAreaNameList = ruleConcrete.getTelAreaNameList();
PhoneNumberGeo phoneNumberGeo = new PhoneNumberGeo();
PhoneNumberInfo numberInfo = phoneNumberGeo.lookup(userInfo.getPhoneNo());
if (numberInfo == null){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment