Commit e7493171 authored by zhengyi's avatar zhengyi

收货人手机号必须是国外的错误提示业务调整

parent 0e174186
......@@ -216,13 +216,12 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
dto -> "create_order_phone_limit".equals(dto.getLabel())).findFirst().
orElse(null);
if (Objects.nonNull(createReqVO.getIsCargoControl()) &&
if (createReqVO.getHasConsignee() && Objects.nonNull(createReqVO.getIsCargoControl()) &&
createReqVO.getIsCargoControl() &&
Objects.nonNull(dictDataRespDTO) &&
StringUtils.equals(dictDataRespDTO.getValue(), "11")
&& StringUtils.isNotBlank(createReqVO.getCountryCode())
&& StringUtils.equals("86", createReqVO.getCountryCode())) {
throw exception(CONSIGNEE_PHONE_IS_EXTERNAL);
}
LogisticsInfoDto logisticsInfoDto =
......@@ -657,7 +656,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if (StringUtils.isBlank(orderConsigneeDO.getName())) {
throw exception(ORDER_CONSIGNEE_NAME_NOT_COMPLETE);
}
if (Objects.nonNull(createReqVO.getIsCargoControl()) && createReqVO.getIsCargoControl() && StringUtils.isNotBlank(orderConsigneeDO.getCountryCode()) &&
if (createReqVO.getHasConsignee() && Objects.nonNull(createReqVO.getIsCargoControl()) && createReqVO.getIsCargoControl() && StringUtils.isNotBlank(orderConsigneeDO.getCountryCode()) &&
Objects.nonNull(dictDataRespDTO) && StringUtils.equals(dictDataRespDTO.getValue(), "11") && StringUtils.equals("86", orderConsigneeDO.getCountryCode())) {
throw exception(CONSIGNEE_PHONE_IS_EXTERNAL);
}
......@@ -937,7 +936,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
throw exception(ORDER_CONSIGNEE_PHONE_INCORRECT_FORMAT);
}
}
if (Objects.nonNull(createReqVO.getIsCargoControl()) && createReqVO.getIsCargoControl() && StringUtils.isNotBlank(orderConsigneeDO.getCountryCode()) &&
if (createReqVO.getHasConsignee() && Objects.nonNull(createReqVO.getIsCargoControl()) && createReqVO.getIsCargoControl() && StringUtils.isNotBlank(orderConsigneeDO.getCountryCode()) &&
Objects.nonNull(dictDataRespDTO) && StringUtils.equals(dictDataRespDTO.getValue(), "11") && StringUtils.equals("86", orderConsigneeDO.getCountryCode())) {
throw exception(CONSIGNEE_PHONE_IS_EXTERNAL);
}
......@@ -1513,7 +1512,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
List<DictDataRespDTO> dictList = dictDataApi.getDictDatas("part_function_switch");
// 智慧预装功能开关
DictDataRespDTO dictDataRespDTO = dictList.stream().filter(dto -> "create_order_phone_limit".equals(dto.getLabel())).findFirst().orElse(null);
if (Objects.nonNull(updateReqVO.getIsCargoControl()) &&
if (updateReqVO.getHasConsignee() && Objects.nonNull(updateReqVO.getIsCargoControl()) &&
updateReqVO.getIsCargoControl() &&
Objects.nonNull(dictDataRespDTO) && StringUtils.equals(dictDataRespDTO.getValue(), "11") && StringUtils.isNotBlank(updateReqVO.getCountryCode()) && StringUtils.equals("86", updateReqVO.getCountryCode())) {
throw exception(CONSIGNEE_PHONE_IS_EXTERNAL);
......@@ -2716,7 +2715,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if (!Objects.equals(orderConsigneeBackVO.getCustomerContactsId(), consigneeContactsDO.getId())) {
// 收货人电话
if (!StringUtils.equals(orderConsigneeBackVO.getPhone(), consigneeContactsDO.getPhoneNew()) || !StringUtils.equals(orderConsigneeBackVO.getCountryCode(), consigneeContactsDO.getAreaCode())) {
if (Objects.nonNull(updateReqVO.getIsCargoControl()) && updateReqVO.getIsCargoControl() && StringUtils.isNotBlank(consigneeContactsDO.getAreaCode()) &&
if (updateReqVO.getHasConsignee() && Objects.nonNull(updateReqVO.getIsCargoControl()) && updateReqVO.getIsCargoControl() && StringUtils.isNotBlank(consigneeContactsDO.getAreaCode()) &&
Objects.nonNull(dictDataRespDTO) && StringUtils.equals(dictDataRespDTO.getValue(), "11") && StringUtils.equals("86", consigneeContactsDO.getAreaCode())) {
throw exception(CONSIGNEE_PHONE_IS_EXTERNAL);
}
......@@ -3292,7 +3291,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if (StringUtils.isBlank(orderConsigneeDO.getName())) {
throw exception(ORDER_CONSIGNEE_NAME_NOT_COMPLETE);
}
if ((Objects.isNull(updateReqVO.getIsCargoControl()) || !updateReqVO.getIsCargoControl()) && StringUtils.isNotBlank(orderConsigneeDO.getCountryCode()) &&
if (updateReqVO.getHasConsignee() && Objects.nonNull(updateReqVO.getIsCargoControl()) && updateReqVO.getIsCargoControl() && StringUtils.isNotBlank(orderConsigneeDO.getCountryCode()) &&
Objects.nonNull(dictDataRespDTO) && StringUtils.equals("11", dictDataRespDTO.getValue()) && StringUtils.equals("86", orderConsigneeDO.getCountryCode())) {
throw exception(CONSIGNEE_PHONE_IS_EXTERNAL);
}
......@@ -3543,7 +3542,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
orderConsigneeDO.setEmail(updateReqVO.getConsigneeEmail());
orderConsigneeDO.setPhone(updateReqVO.getConsigneePhone());
}
if (Objects.nonNull(updateReqVO.getIsCargoControl()) && updateReqVO.getIsCargoControl() && StringUtils.isNotBlank(orderConsigneeDO.getCountryCode()) &&
if (updateReqVO.getHasConsignee() && Objects.nonNull(updateReqVO.getIsCargoControl()) && updateReqVO.getIsCargoControl() && StringUtils.isNotBlank(orderConsigneeDO.getCountryCode()) &&
Objects.nonNull(dictDataRespDTO) && StringUtils.equals("11", dictDataRespDTO.getValue()) && StringUtils.equals("86", orderConsigneeDO.getCountryCode())) {
throw exception(CONSIGNEE_PHONE_IS_EXTERNAL);
}
......
......@@ -523,7 +523,7 @@ public class OfferServiceImpl extends AbstractService<OfferMapper, OfferDO> impl
DictDataRespDTO dictDataRespDTO = dictList.stream().filter(dto -> "create_order_phone_limit".equals(dto.getLabel())).findFirst().orElse(null);
CustomerContactsDO consigneeContactsDO = customerContactsService.getCustomerContacts(updateReqVO.getConsigneeId());
if (Objects.nonNull(consigneeContactsDO)) {
if (Objects.nonNull(dictDataRespDTO) && StringUtils.equals(dictDataRespDTO.getValue(), "11") && StringUtils.isNotBlank(consigneeContactsDO.getAreaCode()) && StringUtils.equals("86", consigneeContactsDO.getAreaCode())) {
if (updateReqVO.getHasConsignee() && Objects.nonNull(dictDataRespDTO) && StringUtils.equals(dictDataRespDTO.getValue(), "11") && StringUtils.isNotBlank(consigneeContactsDO.getAreaCode()) && StringUtils.equals("86", consigneeContactsDO.getAreaCode())) {
throw exception(CONSIGNEE_PHONE_IS_EXTERNAL);
}
}
......
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