fix : 行政地区无法删除或修改,由于缓存没有被清空导致问题处理

This commit is contained in:
Chopper711 2023-08-10 16:08:23 +08:00
parent b12245bb94
commit 1cc939f457
2 changed files with 23 additions and 0 deletions

View File

@ -28,6 +28,18 @@ public interface RegionService extends IService<Region> {
*/
@CacheEvict(allEntries = true)
boolean updateById(Region region);
/**
* 更新地区
*
* @param region 地区
* @return
*/
@CacheEvict(allEntries = true)
boolean save(Region region);
@CacheEvict(allEntries = true)
boolean removeByIds(List<String> idList);
/**
* 同步行政数据
*

View File

@ -44,6 +44,17 @@ public class RegionServiceImpl extends ServiceImpl<RegionMapper, Region> impleme
return super.updateById(region);
}
@Transactional
@Override
public boolean save(Region region) {
return super.save(region);
}
@Override
public boolean removeByIds(List<String> idList) {
return super.removeByIds(idList);
}
@Override
public void synchronizationData(String url) {
try {