#
Junjie
2025-07-06 7c4bbcb2ceed34e82212b82d2aa551a87bdaaa0d
src/main/java/com/zy/core/utils/DeviceMsgUtils.java
@@ -1,6 +1,6 @@
package com.zy.core.utils;
import com.core.exception.CoolException;
import com.zy.common.exception.CoolException;
import com.zy.common.utils.RedisUtil;
import com.zy.core.enums.RedisKeyType;
import com.zy.core.enums.SlaveType;
@@ -23,6 +23,14 @@
    @Autowired
    private RedisUtil redisUtil;
    public String getDeviceConfig() {
        Object obj = redisUtil.get(RedisKeyType.DEVICE_CONFIG.key);
        if(null == obj){
            return null;
        }
        return obj.toString();
    }
    public DeviceCommandMsgModel getDeviceCommandMsg(SlaveType deviceType, Integer deviceId) {
        TreeSet<String> listKey = getDeviceCommandMsgListKey(deviceType, deviceId);
@@ -81,6 +89,10 @@
        return key;
    }
    public void sendDeviceConfig(String allDevices) {
        redisUtil.set(RedisKeyType.DEVICE_CONFIG.key,  allDevices);
    }
    public TreeSet<String> getDeviceMsgListKey(SlaveType deviceType, Integer deviceId) {
        String listKey = parseDeviceMsgKey(deviceType, deviceId);
        Set<String> keys = redisUtil.searchKeys(listKey);