| | |
| | | import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommanderForPlatform; |
| | | import com.genersoft.iot.vmp.storager.IRedisCatchStorage; |
| | | import com.genersoft.iot.vmp.storager.IVideoManagerStorage; |
| | | import com.genersoft.iot.vmp.utils.DateUtil; |
| | | import com.genersoft.iot.vmp.vmanager.bean.WVPResult; |
| | | import com.genersoft.iot.vmp.vmanager.gb28181.platform.bean.ChannelReduce; |
| | | import com.genersoft.iot.vmp.vmanager.gb28181.platform.bean.UpdateChannelParam; |
| | |
| | | wvpResult.setMsg("平台 " + parentPlatform.getServerGBId() + " 已存在"); |
| | | return new ResponseEntity<>(wvpResult, HttpStatus.OK); |
| | | } |
| | | parentPlatform.setCreateTime(DateUtil.getNow()); |
| | | parentPlatform.setUpdateTime(DateUtil.getNow()); |
| | | boolean updateResult = storager.updateParentPlatform(parentPlatform); |
| | | |
| | | if (updateResult) { |
| | |
| | | } |
| | | parentPlatform.setCharacterSet(parentPlatform.getCharacterSet().toUpperCase()); |
| | | ParentPlatform parentPlatformOld = storager.queryParentPlatByServerGBId(parentPlatform.getServerGBId()); |
| | | |
| | | parentPlatform.setUpdateTime(DateUtil.getNow()); |
| | | boolean updateResult = storager.updateParentPlatform(parentPlatform); |
| | | |
| | | if (updateResult) { |
| | |
| | | return new ResponseEntity<>("missing parameters", HttpStatus.BAD_REQUEST); |
| | | } |
| | | ParentPlatform parentPlatform = storager.queryParentPlatByServerGBId(serverGBId); |
| | | if (parentPlatform == null) return new ResponseEntity<>("fail", HttpStatus.OK); |
| | | if (parentPlatform == null) { |
| | | return new ResponseEntity<>("fail", HttpStatus.OK); |
| | | } |
| | | // 发送离线消息,无论是否成功都删除缓存 |
| | | commanderForPlatform.unregister(parentPlatform, (event -> { |
| | | // 清空redis缓存 |