debug
This commit is contained in:
parent
bef43caee5
commit
3b2bfd50d5
|
@ -35,10 +35,10 @@ public class DeviceIotController extends BaseController {
|
|||
|
||||
private DeviceVO getDevice(Long id, String sn) {
|
||||
if (id != null) {
|
||||
ServiceUtil.assertion(deviceValidator.canOperate(id), "您无权限操作ID为%s的设备", id);
|
||||
ServiceUtil.assertion(!deviceValidator.canOperate(id), "您无权限操作ID为%s的设备", id);
|
||||
return deviceService.selectDeviceById(id, true);
|
||||
} else if (sn != null) {
|
||||
ServiceUtil.assertion(deviceValidator.canOperate(sn), "您无权限操作SN为%s的设备", sn);
|
||||
ServiceUtil.assertion(!deviceValidator.canOperate(sn), "您无权限操作SN为%s的设备", sn);
|
||||
return deviceService.selectDeviceBySn(sn, true);
|
||||
} else {
|
||||
throw new ServiceException("SN和ID不能同时为空");
|
||||
|
|
Loading…
Reference in New Issue
Block a user