Showing
1 changed file
with
2 additions
and
2 deletions
... | ... | @@ -94,7 +94,7 @@ public class TkDeviceServiceImpl extends AbstractBaseService<DeviceMapper, TkDev |
94 | 94 | } |
95 | 95 | |
96 | 96 | @Override |
97 | - public void validateFormData(String currentTenantId, DeviceDTO deviceDTO) { | |
97 | + public void validateFormData(String currentTenantId, DeviceDTO deviceDTO) throws RuntimeException{ | |
98 | 98 | boolean insert = StringUtils.isBlank(deviceDTO.getId()); |
99 | 99 | String deviceTenantId; |
100 | 100 | if (StringUtils.isBlank(deviceDTO.getName())) { |
... | ... | @@ -132,7 +132,7 @@ public class TkDeviceServiceImpl extends AbstractBaseService<DeviceMapper, TkDev |
132 | 132 | DeviceProfile deviceProfile = |
133 | 133 | deviceProfileDao.findById(id, UUID.fromString(deviceDTO.getProfileId())); |
134 | 134 | OrganizationDTO organization = |
135 | - organizationService.findOrganizationById(deviceTenantId,deviceDTO.getOrganizationId()); | |
135 | + organizationService.findOrganizationById(deviceDTO.getOrganizationId(),deviceTenantId); | |
136 | 136 | if (null == deviceProfile || null == organization) { |
137 | 137 | throw new TkDataValidationException(ErrorMessage.INVALID_PARAMETER.getMessage()); |
138 | 138 | } else if (!organization.getTenantId().equals(deviceTenantId)) { | ... | ... |