| | |
| | | import com.moral.api.entity.Device; |
| | | import com.moral.api.entity.DeviceAdjustValue; |
| | | import com.moral.api.entity.Sensor; |
| | | import com.moral.api.entity.SpecialDevice; |
| | | import com.moral.api.mapper.DeviceAdjustValueMapper; |
| | | import com.moral.api.mapper.DeviceMapper; |
| | | import com.moral.api.mapper.SensorMapper; |
| | | import com.moral.api.mapper.SpecialDeviceMapper; |
| | | import com.moral.api.service.DeviceAdjustValueService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.moral.api.util.LogUtils; |
| | |
| | | private DeviceMapper deviceMapper; |
| | | |
| | | @Autowired(required = false) |
| | | private SpecialDeviceMapper specialDeviceMapper; |
| | | |
| | | @Autowired(required = false) |
| | | private SensorMapper sensorMapper; |
| | | |
| | | @Autowired |
| | |
| | | QueryWrapper<Device> wrapper_device = new QueryWrapper<>(); |
| | | wrapper_device.eq("is_delete",Constants.NOT_DELETE); |
| | | wrapper_device.eq("mac",deviceAdjustValue.getMac()); |
| | | if (deviceMapper.selectCount(wrapper_device)==0){ |
| | | QueryWrapper<SpecialDevice> wrapper_specialDevice = new QueryWrapper<>(); |
| | | wrapper_specialDevice.eq("is_delete",Constants.NOT_DELETE); |
| | | wrapper_specialDevice.eq("mac",deviceAdjustValue.getMac()); |
| | | if (deviceMapper.selectCount(wrapper_device)==0 && specialDeviceMapper.selectCount(wrapper_specialDevice)==0){ |
| | | resultMap.put("code",ResponseCodeEnum.DEVICE_IS_NULL.getCode()); |
| | | resultMap.put("msg",ResponseCodeEnum.DEVICE_IS_NULL.getMsg()); |
| | | return resultMap; |