Browse Source

修改增加条件

master
wangpengfei 2 years ago
parent
commit
0056896b90
  1. 5
      yxt-supervise-monitor-biz/src/main/java/com/yxt/supervise/monitor/biz/deviceImage/YDeviceImageService.java

5
yxt-supervise-monitor-biz/src/main/java/com/yxt/supervise/monitor/biz/deviceImage/YDeviceImageService.java

@ -166,7 +166,7 @@ public class YDeviceImageService extends ServiceImpl<YDeviceImageMapper, DeviceI
deviceImage.setModifyTime(new Date());
// 添加之前先把历史数据isShow改成不展示
this.flushDeviceImageIsShow(device.getChannelNo(), device.getCkId());
this.flushDeviceImageIsShow(device.getChannelNo(), device.getCkId(),imageAfter);
this.save(deviceImage);
} else {
deviceImage.setImgBefore(picName);
@ -179,10 +179,11 @@ public class YDeviceImageService extends ServiceImpl<YDeviceImageMapper, DeviceI
}
private void flushDeviceImageIsShow(String channelNo, String ckId) {
private void flushDeviceImageIsShow(String channelNo, String ckId,String imageAfter) {
UpdateWrapper<DeviceImage> wrapper = new UpdateWrapper<>();
wrapper.eq("channelNo", channelNo);
wrapper.eq("ckId", ckId);
wrapper.like("imgAfter",imageAfter);
wrapper.set("isShow", 0);
this.update(wrapper);
}

Loading…
Cancel
Save