处理城市缓存逻辑

This commit is contained in:
zk
2026-07-13 20:03:57 +08:00
parent 283fb16816
commit 9e01a5aeac
@@ -87,10 +87,12 @@ public class DictCacheService {
industryList = industryMapper.selectList(null);
majorCategoryList = majorCategoryMapper.selectList(null);
// 只缓存省级+市级地区(provinceCode 为 null 是省,provinceCode 不为 null 且 cityCode 为 null 是市
// 只缓存市级地区(provinceCode 不为 null 且 cityCode 为 null
// 直辖市省级与市级同名,取市级避免重复匹配到省级编码
regionList = chinaRegionsCodeMapper.selectList(
new LambdaQueryWrapper<ChinaRegionsCode>()
.isNull(ChinaRegionsCode::getCityCode)
.isNotNull(ChinaRegionsCode::getProvinceCode)
);
// 构建岗位分类文本:只取三级(叶子),格式 id:name(一级/二级)