feat(service): Add cache deletion operation after entity insertion

This commit is contained in:
Sol 2025-06-12 14:11:00 +08:00
parent 080255cd9f
commit 6f0111674e

View file

@ -94,6 +94,7 @@ public abstract class BaseService<ENTITY extends BaseEntity, PAGE_DTO extends Ba
}
// 插入实体
commonBaseMapper().insert(entity);
this.cacheDelete(entity.getId());
if (ObjectUtils.isNotEmpty(commonBaseRedissonClient())) {
// 清理缓存
String key = serviceName + ":" + entity.getClass().getName();