|
@@ -3111,10 +3111,23 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
|
|
|
|
|
|
|
|
//获取运费模板区域列表按照城市排序
|
|
//获取运费模板区域列表按照城市排序
|
|
|
List<FsShippingTemplatesRegionScrm> shippingTemplatesRegionList = shippingTemplatesRegionService.selectFsShippingTemplatesRegionListByTempIdsAndCityIds(StringUtils.join(tempIds, ","), StringUtils.join(citys, ","));
|
|
List<FsShippingTemplatesRegionScrm> shippingTemplatesRegionList = shippingTemplatesRegionService.selectFsShippingTemplatesRegionListByTempIdsAndCityIds(StringUtils.join(tempIds, ","), StringUtils.join(citys, ","));
|
|
|
-
|
|
|
|
|
|
|
+ boolean isQg = false;
|
|
|
|
|
+
|
|
|
|
|
+ if (CollectionUtils.isEmpty(shippingTemplatesRegionList)&&CollectionUtils.isNotEmpty(shippingTemplatesList)&&shippingTemplatesList.size()<2) {
|
|
|
|
|
+ List<RegionInfoDTO> regionList = JSONObject.parseArray(
|
|
|
|
|
+ shippingTemplatesList.get(0).getRegionInfo(),
|
|
|
|
|
+ RegionInfoDTO.class
|
|
|
|
|
+ );
|
|
|
|
|
+ if (regionList != null && !regionList.isEmpty()) {
|
|
|
|
|
+ RegionInfoDTO regionDTO = regionList.get(0);
|
|
|
|
|
+ if ("默认全国".equals(regionDTO.getRegionName())) {
|
|
|
|
|
+ isQg = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
// 有运费模板,但当前城市没有匹配的区域
|
|
// 有运费模板,但当前城市没有匹配的区域
|
|
|
if (shippingTemplatesList != null && !shippingTemplatesList.isEmpty()
|
|
if (shippingTemplatesList != null && !shippingTemplatesList.isEmpty()
|
|
|
- && (shippingTemplatesRegionList == null || shippingTemplatesRegionList.isEmpty())) {
|
|
|
|
|
|
|
+ && (shippingTemplatesRegionList == null || shippingTemplatesRegionList.isEmpty())&&!isQg) {
|
|
|
logger.error("运费模板存在,但城市不在运费模板区域内,cityId: {}", cityId);
|
|
logger.error("运费模板存在,但城市不在运费模板区域内,cityId: {}", cityId);
|
|
|
return badCode;
|
|
return badCode;
|
|
|
}
|
|
}
|
|
@@ -3143,7 +3156,7 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
|
|
|
// 如果商品有运费模板,但没有找到对应的区域配置,返回错误码
|
|
// 如果商品有运费模板,但没有找到对应的区域配置,返回错误码
|
|
|
if (shippingTemplatesList != null && !shippingTemplatesList.isEmpty()
|
|
if (shippingTemplatesList != null && !shippingTemplatesList.isEmpty()
|
|
|
&& shippingTemplatesList.stream().anyMatch(t -> t.getId().equals(tempId))
|
|
&& shippingTemplatesList.stream().anyMatch(t -> t.getId().equals(tempId))
|
|
|
- && shippingTemplatesRegion == null) {
|
|
|
|
|
|
|
+ && shippingTemplatesRegion == null&&!isQg) {
|
|
|
logger.error("商品运费模板存在,但城市不在运费模板区域内,tempId: {}, cityId: {}", tempId, cityId);
|
|
logger.error("商品运费模板存在,但城市不在运费模板区域内,tempId: {}, cityId: {}", tempId, cityId);
|
|
|
return badCode;
|
|
return badCode;
|
|
|
}
|
|
}
|