| | |
| | | import org.springframework.transaction.TransactionDefinition; |
| | | import org.springframework.transaction.TransactionStatus; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import java.util.*; |
| | |
| | | |
| | | @Override |
| | | public boolean resetChannels(String deviceId, List<DeviceChannel> deviceChannelList) { |
| | | if (deviceChannelList == null) { |
| | | if (CollectionUtils.isEmpty(deviceChannelList)) { |
| | | return false; |
| | | } |
| | | List<DeviceChannel> allChannelInPlay = deviceChannelMapper.getAllChannelInPlay(); |
| | |
| | | if (stringBuilder.length() > 0) { |
| | | logger.info("[目录查询]收到的数据存在重复: {}" , stringBuilder); |
| | | } |
| | | if(CollectionUtils.isEmpty(channels)){ |
| | | logger.info("通道重设,数据为空={}" , deviceChannelList); |
| | | return false; |
| | | } |
| | | try { |
| | | int cleanChannelsResult = deviceChannelMapper.cleanChannelsNotInList(deviceId, channels); |
| | | int limitCount = 300; |