| | |
| | | return pointIdMap.get(id); |
| | | } |
| | | DaPointDTO dto = ConvertUtils.sourceToTarget(daPointDao.selectById(id), DaPointDTO.class); |
| | | if (dto == null) { |
| | | return null; |
| | | } |
| | | pointIdMap.put(id, dto); |
| | | return dto; |
| | | return pointIdMap.get(id); |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | @Override |
| | | @DSTransactional(rollbackFor = Exception.class) |
| | | public void enableByIds(String[] ids) { |
| | | if (CollectionUtils.isEmpty(Arrays.asList(ids))) { |
| | | return; |
| | |
| | | DaPointEntity entity = new DaPointEntity(); |
| | | entity.setId(item); |
| | | entity.setIsEnable(IsEnableEnum.ENABLE.getCode()); |
| | | entity.setUpdateTime(new Date()); |
| | | daPointDao.updateById(entity); |
| | | }); |
| | | } |
| | | |
| | | @Override |
| | | @DSTransactional(rollbackFor = Exception.class) |
| | | public void disableByIds(String[] ids) { |
| | | if (CollectionUtils.isEmpty(Arrays.asList(ids))) { |
| | | return; |
| | |
| | | DaPointEntity entity = new DaPointEntity(); |
| | | entity.setId(item); |
| | | entity.setIsEnable(IsEnableEnum.DISABLE.getCode()); |
| | | entity.setUpdateTime(new Date()); |
| | | daPointDao.updateById(entity); |
| | | }); |
| | | } |