update 推送联联平台站点信息 AreaCode只取最后一部分

This commit is contained in:
Lemon
2023-11-22 14:40:11 +08:00
parent 7b2283fe3a
commit c065681b63
2 changed files with 11 additions and 5 deletions

View File

@@ -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:

View File

@@ -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);