添加注册失败时回复403避免陷入401循环
This commit is contained in:
@@ -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>" +
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user