lizijie
2019-06-11 820c6a9e6e0e50f7266b8ccaf9c802a1005bda51
src/main/java/com/moral/service/impl/DeviceServiceImpl.java
@@ -563,11 +563,11 @@
      ValidateUtil.notNull(parameters.get("old_state"), "param.is.null");
      ValidateUtil.notNull(parameters.get("new_state"), "param.is.null");
      int count = 0;
      if ("4".equals(parameters.get("old_state")) && "9".equals(parameters.get("new_state"))) {
      if (Constants.DEVICE_STATE_OFFLINE.equals(parameters.get("old_state")) && Constants.DEVICE_STATE_MAINTENANCE.equals(parameters.get("new_state"))) {
         Device device = new Device();
         Example example = new Example(ENTITY_CLASS);
         example.and().andEqualTo("id", new Integer(parameters.get("id").toString())).andEqualTo("state", "4");
         device.setState("9");
         example.and().andEqualTo("id", new Integer(parameters.get("id").toString())).andEqualTo("state", Constants.DEVICE_STATE_OFFLINE);
         device.setState(Constants.DEVICE_STATE_MAINTENANCE);
         count = deviceMapper.updateByExampleSelective(device, example);
      } 
      if (count == 0) {