| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public List<Map<String, Object>> getSensorsByDevice(String mac) {
|
| | | return deviceMapper.getSensorsByDevice(mac);
|
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional
|
| | | public void saveOrUpdateDevice(Device device) {
|
| | | ValidateUtil.notNull(device, "param.is.null");
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void addOrModify(Device device){
|
| | | try{
|
| | | if(device.getId()==null){
|
| | | device.setIsDelete(Constants.IS_DELETE_FALSE);
|
| | | deviceMapper.insertSelective(device);
|
| | | }else{
|
| | | deviceMapper.updateByPrimaryKeySelective(device);
|
| | | }
|
| | | }
|
| | | catch (Exception ex){
|
| | | throw ex;
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public List<Device> getDevicesByMonitorPointId(Integer monitorPointId) {
|
| | | Device device = new Device();
|
| | | device.setMonitorPointId(monitorPointId);
|
| | | device.setIsDelete(Constants.IS_DELETE_FALSE);
|
| | | return deviceMapper.select(device);
|
| | | }
|
| | |
|
| | | }
|