From d0be7a6ffed4f02757cd10ce676ca34539895e5e Mon Sep 17 00:00:00 2001 From: wuweida <2918581207@qq.com> Date: Mon, 13 Jun 2022 18:08:22 +0800 Subject: [PATCH] 1 --- .../monitormanage/service/MonitorService.java | 30 +++++++------------ 1 file changed, 10 insertions(+), 20 deletions(-) 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<>();