Merge pull request #1140 from shuxiaoyuan/fix-update-time

bugfix:目录订阅收到更新事件时,sql字段update_time为空导致的报错
pull/1209/head
648540858 2023-12-11 10:05:57 +08:00 committed by GitHub
commit 9f7dc295cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

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