diff --git a/src/main/java/com/glxp/udi/admin/service/info/PlatformService.java b/src/main/java/com/glxp/udi/admin/service/info/PlatformService.java index 0e15fd7..1812833 100644 --- a/src/main/java/com/glxp/udi/admin/service/info/PlatformService.java +++ b/src/main/java/com/glxp/udi/admin/service/info/PlatformService.java @@ -241,11 +241,13 @@ public class PlatformService { //更新当前客户关联数据的所有key List list = unitMaintainPlatformDao.selectByCustomerId(unitMaintainPlatform.getCustomerId()); - for (UnitMaintainPlatform maintainPlatform : list) { - maintainPlatform.setAppid(unitMaintainPlatform.getAppid()); - maintainPlatform.setApiKey(unitMaintainPlatform.getApiKey()); - maintainPlatform.setSecretKey(unitMaintainPlatform.getSecretKey()); - unitMaintainPlatformDao.updateById(maintainPlatform); + if (CollUtil.isNotEmpty(list)) { + for (UnitMaintainPlatform maintainPlatform : list) { + maintainPlatform.setAppid(unitMaintainPlatform.getAppid()); + maintainPlatform.setApiKey(unitMaintainPlatform.getApiKey()); + maintainPlatform.setSecretKey(unitMaintainPlatform.getSecretKey()); + unitMaintainPlatformDao.updateById(maintainPlatform); + } } }