节点管理--某个zlm节点删除之后,数据库中仍有数据,导致再次添加该zlm节点
This commit is contained in:
parent
b225b53510
commit
af885ca4d9
@ -76,6 +76,8 @@ public interface IMediaServerService {
|
||||
|
||||
void delete(String id);
|
||||
|
||||
void deleteDb(String id);
|
||||
|
||||
MediaServerItem getDefaultMediaServer();
|
||||
|
||||
void updateMediaServerKeepalive(String mediaServerId, JSONObject data);
|
||||
|
@ -608,6 +608,11 @@ public class MediaServerServiceImpl implements IMediaServerService {
|
||||
String key = VideoManagerConstants.MEDIA_SERVER_PREFIX + userSetup.getServerId() + "_" + id;
|
||||
redisUtil.del(key);
|
||||
}
|
||||
@Override
|
||||
public void deleteDb(String id){
|
||||
//同步删除数据库中的数据
|
||||
mediaServerMapper.delOne(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateMediaServerKeepalive(String mediaServerId, JSONObject data) {
|
||||
|
@ -158,6 +158,7 @@ public class ServerController {
|
||||
public WVPResult<String> deleteMediaServer(@RequestParam String id){
|
||||
if (mediaServerService.getOne(id) != null) {
|
||||
mediaServerService.delete(id);
|
||||
mediaServerService.deleteDb(id);
|
||||
}else {
|
||||
WVPResult<String> result = new WVPResult<>();
|
||||
result.setCode(-1);
|
||||
|
Loading…
Reference in New Issue
Block a user