From c065681b638e961f6e13aa982640a13e5c09fa4b Mon Sep 17 00:00:00 2001 From: Lemon Date: Wed, 22 Nov 2023 14:40:11 +0800 Subject: [PATCH] =?UTF-8?q?update=20=20=E6=8E=A8=E9=80=81=E8=81=94?= =?UTF-8?q?=E8=81=94=E5=B9=B3=E5=8F=B0=E7=AB=99=E7=82=B9=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=20=20AreaCode=E5=8F=AA=E5=8F=96=E6=9C=80=E5=90=8E=E4=B8=80?= =?UTF-8?q?=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jsowell-admin/src/main/resources/application-dev.yml | 8 ++++---- .../lianlian/service/impl/LianLianServiceImpl.java | 8 +++++++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/jsowell-admin/src/main/resources/application-dev.yml b/jsowell-admin/src/main/resources/application-dev.yml index 248424319..01a6c12db 100644 --- a/jsowell-admin/src/main/resources/application-dev.yml +++ b/jsowell-admin/src/main/resources/application-dev.yml @@ -36,10 +36,10 @@ spring: druid: # 主库数据源 master: -# url: jdbc:mysql://192.168.2.2:3306/jsowell_dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 -# username: jsowell_dev - url: jdbc:mysql://192.168.2.2:3306/jsowell_prd_copy?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 - username: jsowell_prd_copy + url: jdbc:mysql://192.168.2.2:3306/jsowell_dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + username: jsowell_dev +# url: jdbc:mysql://192.168.2.2:3306/jsowell_prd_copy?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 +# username: jsowell_prd_copy password: 123456 # 从库数据源 slave: diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/lianlian/service/impl/LianLianServiceImpl.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/lianlian/service/impl/LianLianServiceImpl.java index 503be6bd8..045c096cb 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/lianlian/service/impl/LianLianServiceImpl.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/lianlian/service/impl/LianLianServiceImpl.java @@ -167,7 +167,7 @@ public class LianLianServiceImpl implements LianLianService { .isAloneApply(Integer.valueOf(pileStationInfo.getAloneApply())) .isPublicParkingLot(Integer.valueOf(pileStationInfo.getPublicParking())) .countryCode(pileStationInfo.getCountryCode()) - .areaCode(pileStationInfo.getAreaCode()) + // .areaCode(pileStationInfo.getAreaCode()) .address(pileStationInfo.getAddress()) .serviceTel(pileStationInfo.getStationTel()) .stationType(Integer.valueOf(pileStationInfo.getStationType())) @@ -194,6 +194,12 @@ public class LianLianServiceImpl implements LianLianService { .parkingLockFlag(Integer.valueOf(pileStationInfo.getParkingLockFlag())) .build(); + String areaCode = pileStationInfo.getAreaCode(); // 330000,330200,330213 + // 根据逗号分组 + String[] split = StringUtils.split(areaCode, ","); + // 只取最后一部分 330213 + String subAreaCode = split[split.length - 1]; + info.setAreaCode(subAreaCode); if (StringUtils.equals(String.valueOf(pileStationInfo.getMerchantId()), "35")) { // 如果是希晓运营商,则把equipmentOwnerID换成希晓 info.setEquipmentOwnerID(Constants.OPERATORID_XI_XIAO);