|
@@ -1,6 +1,7 @@
|
|
package com.fjhx.area.service.impl;
|
|
package com.fjhx.area.service.impl;
|
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
@@ -41,7 +42,7 @@ public class CustomizeAreaServiceImpl extends ServiceImpl<CustomizeAreaMapper, C
|
|
Long countryId = item.getCountryId();
|
|
Long countryId = item.getCountryId();
|
|
|
|
|
|
// 省/州 id
|
|
// 省/州 id
|
|
- if (item.getProvinceId() == null) {
|
|
|
|
|
|
+ if (item.getProvinceId() == null && StrUtil.isNotBlank(item.getProvinceName())) {
|
|
|
|
|
|
// 省名称
|
|
// 省名称
|
|
String provinceName = item.getProvinceName();
|
|
String provinceName = item.getProvinceName();
|
|
@@ -63,7 +64,7 @@ public class CustomizeAreaServiceImpl extends ServiceImpl<CustomizeAreaMapper, C
|
|
}
|
|
}
|
|
|
|
|
|
// 市id
|
|
// 市id
|
|
- if (item.getCityId() != null) {
|
|
|
|
|
|
+ if (item.getProvinceId() != null && item.getCityId() == null && StrUtil.isNotBlank(item.getCityName())) {
|
|
|
|
|
|
// 市名称
|
|
// 市名称
|
|
String cityName = item.getCityName();
|
|
String cityName = item.getCityName();
|