diff --git a/src/main/java/com/hisense/monitormanage/service/MonitorService.java b/src/main/java/com/hisense/monitormanage/service/MonitorService.java index c5c1653..28e3e6d 100644 --- a/src/main/java/com/hisense/monitormanage/service/MonitorService.java +++ b/src/main/java/com/hisense/monitormanage/service/MonitorService.java @@ -227,8 +227,7 @@ public class MonitorService { picture.setPicUrl(picUrl); /*picture.setInsertTime(new Date()); channelPictureMapper.insert(picture);*/ - ChannelPicture id = channelPictureMapper.selectById(channelCode); - if (id == null){ + if (channelCode == null){ channelPictureMapper.insert(picture); }else { QueryWrapper queryWrapper = new QueryWrapper<>(); @@ -270,8 +269,7 @@ public class MonitorService { picture.setPicUrl(picUrl); /*picture.setInsertTime(new Date()); channelPictureMapper.insert(picture);*/ - ChannelPicture id = channelPictureMapper.selectById(channelCode); - if (id == null){ + if (channelCode == null){ channelPictureMapper.insert(picture); }else { QueryWrapper queryWrapper = new QueryWrapper<>(); @@ -313,8 +311,7 @@ public class MonitorService { picture.setPicUrl(picUrl); /*picture.setInsertTime(new Date()); channelPictureMapper.insert(picture);*/ - ChannelPicture id = channelPictureMapper.selectById(channelCode); - if (id == null){ + if (channelCode == null){ channelPictureMapper.insert(picture); }else { QueryWrapper queryWrapper = new QueryWrapper<>(); @@ -356,8 +353,7 @@ public class MonitorService { picture.setPicUrl(picUrl); /*picture.setInsertTime(new Date()); channelPictureMapper.insert(picture);*/ - ChannelPicture id = channelPictureMapper.selectById(channelCode); - if (id == null){ + if (channelCode == null){ channelPictureMapper.insert(picture); }else { QueryWrapper queryWrapper = new QueryWrapper<>(); @@ -399,8 +395,7 @@ public class MonitorService { picture.setPicUrl(picUrl); /*picture.setInsertTime(new Date()); channelPictureMapper.insert(picture);*/ - ChannelPicture id = channelPictureMapper.selectById(channelCode); - if (id == null){ + if (channelCode == null){ channelPictureMapper.insert(picture); }else { QueryWrapper queryWrapper = new QueryWrapper<>(); @@ -442,8 +437,7 @@ public class MonitorService { picture.setPicUrl(picUrl); /*picture.setInsertTime(new Date()); channelPictureMapper.insert(picture);*/ - ChannelPicture id = channelPictureMapper.selectById(channelCode); - if (id == null){ + if (channelCode == null){ channelPictureMapper.insert(picture); }else { QueryWrapper queryWrapper = new QueryWrapper<>(); @@ -485,8 +479,7 @@ public class MonitorService { picture.setPicUrl(picUrl); /*picture.setInsertTime(new Date()); channelPictureMapper.insert(picture);*/ - ChannelPicture id = channelPictureMapper.selectById(channelCode); - if (id == null){ + if (channelCode == null){ channelPictureMapper.insert(picture); }else { QueryWrapper queryWrapper = new QueryWrapper<>(); @@ -528,8 +521,7 @@ public class MonitorService { picture.setPicUrl(picUrl); /*picture.setInsertTime(new Date()); channelPictureMapper.insert(picture);*/ - ChannelPicture id = channelPictureMapper.selectById(channelCode); - if (id == null){ + if (channelCode == null){ channelPictureMapper.insert(picture); }else { QueryWrapper queryWrapper = new QueryWrapper<>(); @@ -570,8 +562,7 @@ public class MonitorService { picture.setPicUrl(picUrl); /*picture.setInsertTime(new Date()); channelPictureMapper.insert(picture);*/ - ChannelPicture id = channelPictureMapper.selectById(channelCode); - if (id == null){ + if (channelCode == null){ channelPictureMapper.insert(picture); }else { QueryWrapper queryWrapper = new QueryWrapper<>(); @@ -613,8 +604,7 @@ public class MonitorService { picture.setPicUrl(picUrl); /*picture.setInsertTime(new Date()); channelPictureMapper.insert(picture);*/ - ChannelPicture id = channelPictureMapper.selectById(channelCode); - if (id == null){ + if (channelCode == null){ channelPictureMapper.insert(picture); }else { QueryWrapper queryWrapper = new QueryWrapper<>();