添加注册失败时回复403避免陷入401循环

This commit is contained in:
64850858
2021-06-08 14:43:03 +08:00
parent 57b562d622
commit abd569d79a
6 changed files with 124 additions and 62 deletions

View File

@@ -24,7 +24,7 @@ public interface DeviceChannelMapper {
@Update(value = {" <script>" +
"UPDATE device_channel " +
"SET updateTime=datetime('now','localtime'))" +
"SET updateTime=datetime('now','localtime')" +
"<if test=\"name != null\">, name='${name}'</if>" +
"<if test=\"manufacture != null\">, manufacture='${manufacture}'</if>" +
"<if test=\"model != null\">, model='${model}'</if>" +

View File

@@ -10,6 +10,7 @@ import com.genersoft.iot.vmp.utils.redis.RedisUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.text.SimpleDateFormat;
import java.util.*;
@SuppressWarnings("rawtypes")
@@ -22,6 +23,7 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage {
@Autowired
private DeviceChannelMapper deviceChannelMapper;
private SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
/**
* 开始播放时将流存入redis
@@ -91,7 +93,7 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage {
*/
@Override
public boolean updateMediaInfo(ZLMServerConfig ZLMServerConfig) {
ZLMServerConfig.setUpdateTime(System.currentTimeMillis());
ZLMServerConfig.setUpdateTime(format.format(new Date(System.currentTimeMillis())));
return redis.set(VideoManagerConstants.MEDIA_SERVER_PREFIX, ZLMServerConfig);
}