Commit 46aef211952f56392418d3ef9aa167b5009f45b0

Authored by xp.Huang
2 parents af5171fd e79a64ea

Merge branch 'master_dev_gbt0326' into 'master_dev'

fix: 摄像头修改凭证残留脏数据问题修复

See merge request yunteng/thingskit!376
@@ -885,8 +885,8 @@ public class DefaultTransportApiService implements TransportApiService { @@ -885,8 +885,8 @@ public class DefaultTransportApiService implements TransportApiService {
885 allChannel.ifPresent( 885 allChannel.ifPresent(
886 d -> { 886 d -> {
887 String cameraCode = d.get(0).getCameraCode(); 887 String cameraCode = d.get(0).getCameraCode();
888 - Map<String, String> playingChannels = channelService.findPlayingChannel(cameraCode);  
889 - channelService.clearDeviceChannel(cameraCode); 888 + Map<String, String> playingChannels = channelService.findPlayingChannel(tbDeviceId);
  889 + channelService.clearDeviceChannel(tbDeviceId);
890 List<TkVideoChannelEntity> chanel = 890 List<TkVideoChannelEntity> chanel =
891 d.stream() 891 d.stream()
892 .map(item -> { 892 .map(item -> {
@@ -166,7 +166,6 @@ public class TkVideoControlServiceImpl implements TkVideoControlService { @@ -166,7 +166,6 @@ public class TkVideoControlServiceImpl implements TkVideoControlService {
166 .getResponse() 166 .getResponse()
167 .ifPresent( 167 .ifPresent(
168 jsonStr -> { 168 jsonStr -> {
169 - JsonNode responseJson = JacksonUtil.toJsonNode(jsonStr);  
170 if (fromDeviceRpcResponse.getError().isEmpty()) { 169 if (fromDeviceRpcResponse.getError().isEmpty()) {
171 result.set(jsonStr); 170 result.set(jsonStr);
172 } else { 171 } else {
@@ -127,7 +127,7 @@ public enum ErrorMessage { @@ -127,7 +127,7 @@ public enum ErrorMessage {
127 NOT_FOUND_MEDIA_SERVER_FOR_PLAY(400102,"未找到可用于播放的流媒体"), 127 NOT_FOUND_MEDIA_SERVER_FOR_PLAY(400102,"未找到可用于播放的流媒体"),
128 RECEIVE_STREAM_FAILED(400103,"开启收流失败"), 128 RECEIVE_STREAM_FAILED(400103,"开启收流失败"),
129 GET_PLAY_PORT_FAILED(400104,"从流媒体【%s】获取点播端口异常"), 129 GET_PLAY_PORT_FAILED(400104,"从流媒体【%s】获取点播端口异常"),
130 - STREAM_INFO_NOT_FOUND_FOR_PLAY(400105,"点播信息未找到"), 130 + STREAM_INFO_NOT_FOUND_FOR_PLAY(400105,"点播资源已释放!不需要重复操作!"),
131 SIP_COMMAND_SEND_FAILED(400106,"sip命令下发失败"), 131 SIP_COMMAND_SEND_FAILED(400106,"sip命令下发失败"),
132 NOT_BELONG_CURRENT_CUSTOMER(400107,"该数据不属于当前客户"), 132 NOT_BELONG_CURRENT_CUSTOMER(400107,"该数据不属于当前客户"),
133 IMPORT_ERROR(400108,"请使用模板excel重新导入"), 133 IMPORT_ERROR(400108,"请使用模板excel重新导入"),
@@ -71,18 +71,18 @@ public class TkVideoChannelServiceImpl @@ -71,18 +71,18 @@ public class TkVideoChannelServiceImpl
71 } 71 }
72 72
73 @Override 73 @Override
74 - public int clearDeviceChannel(String cameraCode) { 74 + public int clearDeviceChannel(String tbDeviceId) {
75 return baseMapper.delete(new LambdaQueryWrapper<TkVideoChannelEntity>() 75 return baseMapper.delete(new LambdaQueryWrapper<TkVideoChannelEntity>()
76 - .eq(TkVideoChannelEntity::getCameraCode, cameraCode)); 76 + .eq(TkVideoChannelEntity::getDeviceId, tbDeviceId));
77 } 77 }
78 78
79 @Override 79 @Override
80 - public Map<String, String> findPlayingChannel(String cameraCode) { 80 + public Map<String, String> findPlayingChannel(String tbDeviceId) {
81 List<TkVideoChannelEntity> channelList = 81 List<TkVideoChannelEntity> channelList =
82 baseMapper.selectList( 82 baseMapper.selectList(
83 new LambdaQueryWrapper<TkVideoChannelEntity>() 83 new LambdaQueryWrapper<TkVideoChannelEntity>()
84 .isNotNull(TkVideoChannelEntity::getStreamId) 84 .isNotNull(TkVideoChannelEntity::getStreamId)
85 - .eq(TkVideoChannelEntity::getCameraCode, cameraCode)); 85 + .eq(TkVideoChannelEntity::getDeviceId, tbDeviceId));
86 Map<String, String> result = new HashMap<>(); 86 Map<String, String> result = new HashMap<>();
87 if(channelList == null){ 87 if(channelList == null){
88 return result; 88 return result;
@@ -25,15 +25,15 @@ public interface TkVideoChannelService extends BaseService<TkVideoChannelEntity> @@ -25,15 +25,15 @@ public interface TkVideoChannelService extends BaseService<TkVideoChannelEntity>
25 25
26 /** 26 /**
27 * 清除摄像头的视频通道 27 * 清除摄像头的视频通道
28 - * @param cameraCode 28 + * @param tbDeviceId
29 * @return 29 * @return
30 */ 30 */
31 - int clearDeviceChannel(String cameraCode); /** 31 + int clearDeviceChannel(String tbDeviceId); /**
32 * 查询点播中的摄像头通道 32 * 查询点播中的摄像头通道
33 - * @param cameraCode 33 + * @param tbDeviceId
34 * @return 34 * @return
35 */ 35 */
36 - Map<String,String> findPlayingChannel(String cameraCode); 36 + Map<String,String> findPlayingChannel(String tbDeviceId);
37 37
38 /** 38 /**
39 * 更新视频通道信息。 39 * 更新视频通道信息。