Beispiel #1
0
 @Transactional(readOnly = false)
 public int updateDevice(DeviceView deviceView) {
   if (deviceView == null || deviceView.getId() == null) {
     return 0;
   }
   String mac = deviceView.getMac();
   if (mac != null) {
     mac = mac.toUpperCase();
     deviceView.setMac(mac);
   }
   deviceView.setModifyuser(ShiroDbRealm.getCurrentLoginName());
   return deviceMapper.update(deviceView);
 }
Beispiel #2
0
 @Transactional(readOnly = false)
 public int saveDevice(DeviceView deviceView) {
   if (deviceView == null
       || deviceView.getAreaid() == null
       || deviceView.getName() == null
       || deviceView.getTypeid() == null
       || deviceView.getIp() == null) {
     return 0;
   }
   String mac = deviceView.getMac();
   if (mac != null) {
     mac = mac.toUpperCase();
     deviceView.setMac(mac);
   }
   deviceView.setId(IdUtils.uuid2());
   deviceView.setCreateuser(ShiroDbRealm.getCurrentLoginName());
   return deviceMapper.insert(deviceView);
 }
Beispiel #3
0
 public int checkType(DeviceView deviceView) {
   deviceView.setTypeid("1");
   return deviceMapper.checkType(deviceView);
 }