From cb990f37c67dabebcc576f0970515d0698a16497 Mon Sep 17 00:00:00 2001 From: Damonny <826010988@qq.com> Date: Mon, 3 Mar 2025 17:24:00 +0800 Subject: [PATCH] =?UTF-8?q?update:=E4=BF=AE=E6=94=B9=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E5=9C=B0=E5=8C=BA=E7=BC=96=E7=A0=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/orderCatch/DouDianOrderCatchServiceImpl.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/yudao-module-haoka/yudao-module-haoka-biz/src/main/java/cn/iocoder/yudao/module/haoka/service/orderCatch/DouDianOrderCatchServiceImpl.java b/yudao-module-haoka/yudao-module-haoka-biz/src/main/java/cn/iocoder/yudao/module/haoka/service/orderCatch/DouDianOrderCatchServiceImpl.java index 4dba2cf6b7..7d5ac9ea46 100644 --- a/yudao-module-haoka/yudao-module-haoka-biz/src/main/java/cn/iocoder/yudao/module/haoka/service/orderCatch/DouDianOrderCatchServiceImpl.java +++ b/yudao-module-haoka/yudao-module-haoka-biz/src/main/java/cn/iocoder/yudao/module/haoka/service/orderCatch/DouDianOrderCatchServiceImpl.java @@ -348,7 +348,9 @@ public class DouDianOrderCatchServiceImpl implements OrderCatchService { ordersDO.setAddressCityCode(city.getId()); // 区 ordersDO.setAddressDistrict(town.getName()); - ordersDO.setAddressDistrictCode(town.getId()); + if(town.getId().length() >= 6){ + ordersDO.setAddressDistrictCode(town.getId().substring(0,6)); + } // 街道/镇 ordersDO.setTown(street.getName()); // 详细地址 @@ -546,7 +548,9 @@ public class DouDianOrderCatchServiceImpl implements OrderCatchService { ordersDO.setAddressCityCode(city.getId()); // 区 ordersDO.setAddressDistrict(town.getName()); - ordersDO.setAddressDistrictCode(town.getId()); + if(town.getId().length() >= 6){ + ordersDO.setAddressDistrictCode(town.getId().substring(0,6)); + } // 街道/镇 ordersDO.setTown(street.getName()); // 详细地址