bugfix:目录订阅收到更新事件时,sql字段update_time为空导致的报错

This commit is contained in:
lishuyuan 2023-11-02 10:17:47 +08:00
parent f4f3e60a6b
commit 8bd2f47c9a

View File

@ -243,6 +243,10 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService {
@Override @Override
public void batchUpdateChannel(List<DeviceChannel> channels) { public void batchUpdateChannel(List<DeviceChannel> channels) {
String now = DateUtil.getNow();
for (DeviceChannel channel : channels) {
channel.setUpdateTime(now);
}
channelMapper.batchUpdate(channels); channelMapper.batchUpdate(channels);
for (DeviceChannel channel : channels) { for (DeviceChannel channel : channels) {
if (channel.getParentId() != null) { if (channel.getParentId() != null) {