Browse Source

更新图片显示条件

master
yangzongjia 2 years ago
parent
commit
d434c781b3
  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

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

Loading…
Cancel
Save