fuliqi
2025-01-15 ab491a079ba4ab85ffef35d14c0767eba01455d8
src/main/java/com/genersoft/iot/vmp/conf/WVPTimerTask.java
@@ -1,7 +1,6 @@
package com.genersoft.iot.vmp.conf;
import com.alibaba.fastjson.JSONObject;
import com.genersoft.iot.vmp.service.IMediaServerService;
import com.alibaba.fastjson2.JSONObject;
import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
@@ -14,12 +13,6 @@
    @Autowired
    private IRedisCatchStorage redisCatchStorage;
    @Autowired
    private IMediaServerService mediaServerService;
    @Autowired
    private UserSetup userSetup;
    @Value("${server.port}")
    private int serverPort;
@@ -29,8 +22,8 @@
    @Scheduled(fixedRate = 2 * 1000)   //每3秒执行一次
    public void execute(){
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("ip", sipConfig.getIp());
        jsonObject.put("ip", sipConfig.getShowIp());
        jsonObject.put("port", serverPort);
        redisCatchStorage.updateWVPInfo(userSetup.getServerId(), jsonObject, 3);
        redisCatchStorage.updateWVPInfo(jsonObject, 3);
    }
}