|
@@ -72,25 +72,11 @@ public class TdCityServiceImpl extends ServiceImpl<TdCityMapper, TdCity> impleme
|
72
|
72
|
if (jsonObject.getString("status").equals("1")) {
|
73
|
73
|
JSONObject addressComponent = jsonObject.getJSONObject("regeocode").getJSONObject("addressComponent");
|
74
|
74
|
String citycode = addressComponent.getString("citycode");
|
75
|
|
- QueryWrapper<TdCity> queryWrapper = new QueryWrapper<>();
|
76
|
|
- queryWrapper.eq("citycode", citycode);
|
77
|
|
- queryWrapper.eq("leveltype", 2);
|
78
|
|
- List<TdCity> tdCities = tdCityMapper.selectList(queryWrapper);
|
79
|
|
- if (tdCities.size() > 0) {
|
80
|
|
- List<TdCity> cityList = selectWxCity(null, orgId);
|
81
|
|
- Integer cityId = tdCities.get(0).getId();
|
82
|
|
- for (TdCity tdCity : cityList) {
|
83
|
|
- if (tdCity.getId().equals(cityId)) {
|
84
|
|
- return tdCity;
|
85
|
|
- }
|
86
|
|
- }
|
87
|
|
- }
|
88
|
|
-// return null;
|
89
|
|
-
|
90
|
75
|
// 保存用户位置信息
|
91
|
76
|
if (StringUtils.isNotBlank(personId)) {
|
92
|
77
|
ExecutorService threadPool = Executors.newCachedThreadPool();
|
93
|
78
|
threadPool.execute(() -> {
|
|
79
|
+ logger.info("保存用户位置信息开始");
|
94
|
80
|
TaPersonPositon record = new TaPersonPositon();
|
95
|
81
|
try {
|
96
|
82
|
String[] locationArr = location.split(",");
|
|
@@ -113,6 +99,20 @@ public class TdCityServiceImpl extends ServiceImpl<TdCityMapper, TdCity> impleme
|
113
|
99
|
});
|
114
|
100
|
}
|
115
|
101
|
|
|
102
|
+ QueryWrapper<TdCity> queryWrapper = new QueryWrapper<>();
|
|
103
|
+ queryWrapper.eq("citycode", citycode);
|
|
104
|
+ queryWrapper.eq("leveltype", 2);
|
|
105
|
+ List<TdCity> tdCities = tdCityMapper.selectList(queryWrapper);
|
|
106
|
+ if (tdCities.size() > 0) {
|
|
107
|
+ List<TdCity> cityList = selectWxCity(null, orgId);
|
|
108
|
+ Integer cityId = tdCities.get(0).getId();
|
|
109
|
+ for (TdCity tdCity : cityList) {
|
|
110
|
+ if (tdCity.getId().equals(cityId)) {
|
|
111
|
+ return tdCity;
|
|
112
|
+ }
|
|
113
|
+ }
|
|
114
|
+ }
|
|
115
|
+// return null;
|
116
|
116
|
}
|
117
|
117
|
|
118
|
118
|
// 没有匹配到则返回默认城市
|