设备缓存增加物模型ID

This commit is contained in:
谷成伟 2024-11-04 10:34:56 +08:00
parent 78de9ba29b
commit 565931e3a2

View File

@ -5,6 +5,7 @@ import com.das.modules.cache.service.EquipmentCache;
import com.das.modules.equipment.entity.SysEquipment;
import com.das.modules.equipment.mapper.SysEquipmentMapper;
import jakarta.annotation.PostConstruct;
import jakarta.annotation.PreDestroy;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -51,6 +52,7 @@ public class EquipmentCacheImpl implements EquipmentCache {
/**
* 释放设备缓存信息
*/
@PreDestroy
private void freeDeviceInfoCaches() {
deviceInfoCaches.clear();
deviceCodeIndex.clear();