| | |
| | | monitorPointMap.put("key",monitorPoint.getId()); |
| | | monitorPointtList.add(monitorPointMap); |
| | | } |
| | | resultMap.put("manageRoles",monitorPointtList); |
| | | resultMap.put("monitorPoints",monitorPointtList); |
| | | resultMap.put("totalNumber",totalNumber); |
| | | resultMap.put("current",current); |
| | | int totalPageNumber = totalNumber/size; |
| | |
| | | resultMap.put("msg",ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg()); |
| | | return resultMap; |
| | | } |
| | | QueryWrapper<MonitorPoint> wapper_id = new QueryWrapper<>(); |
| | | wapper_id.eq("id",updateMap.get("id")); |
| | | wapper_id.eq("is_delete",Constants.NOT_DELETE); |
| | | MonitorPoint oldMonitorPoint = monitorPointMapper.selectOne(wapper_id); |
| | | if (oldMonitorPoint==null){ |
| | | resultMap.put("code",ResponseCodeEnum.MONITOR_POINT_IS_NOT_EXIST.getCode()); |
| | | resultMap.put("msg",ResponseCodeEnum.MONITOR_POINT_IS_NOT_EXIST.getMsg()); |
| | | return resultMap; |
| | | } |
| | | if (updateMap.get("name")==null||updateMap.get("name")==""){ |
| | | resultMap.put("code",ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode()); |
| | | resultMap.put("msg",ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg()); |
| | |
| | | if(monitorPoint_name!=null&&!monitorPoint_name.getId().toString().equals(updateMap.get("id").toString())){ |
| | | resultMap.put("code",ResponseCodeEnum.MONITOR_POINT_IS_EXIST.getCode()); |
| | | resultMap.put("msg",ResponseCodeEnum.MONITOR_POINT_IS_EXIST.getMsg()); |
| | | return resultMap; |
| | | } |
| | | QueryWrapper<MonitorPoint> wapper_id = new QueryWrapper<>(); |
| | | wapper_id.eq("id",updateMap.get("id")); |
| | | wapper_id.eq("is_delete",Constants.NOT_DELETE); |
| | | MonitorPoint oldMonitorPoint = monitorPointMapper.selectOne(wapper_id); |
| | | if (oldMonitorPoint==null){ |
| | | resultMap.put("code",ResponseCodeEnum.MONITOR_POINT_IS_NOT_EXIST.getCode()); |
| | | resultMap.put("msg",ResponseCodeEnum.MONITOR_POINT_IS_NOT_EXIST.getMsg()); |
| | | return resultMap; |
| | | } |
| | | monitorPointMapper.updateMonitorPoint(updateMap); |
| | |
| | | monitorPointMap.put("key",monitorPoint.getId()); |
| | | monitorPointtList.add(monitorPointMap); |
| | | } |
| | | resultMap.put("manageRoles",monitorPointtList); |
| | | resultMap.put("monitorPoints",monitorPointtList); |
| | | resultMap.put("totalNumber",totalNumber); |
| | | resultMap.put("current",current); |
| | | int totalPageNumber = totalNumber/size; |