| | |
| | | import com.doumee.dao.business.YwDeviceMapper; |
| | | import com.doumee.dao.business.YwDeviceRecordMapper; |
| | | import com.doumee.dao.business.model.Category; |
| | | import com.doumee.dao.business.model.Company; |
| | | import com.doumee.dao.business.model.YwDevice; |
| | | import com.doumee.dao.business.model.YwDeviceRecord; |
| | | import com.doumee.dao.business.vo.YwDeviceDataVO; |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据编码查询 |
| | | * @param deviceCode |
| | | * @return |
| | | */ |
| | | @Override |
| | | public YwDevice findByCode(String deviceCode) { |
| | | YwDevice ywDevice = ywDeviceMapper.selectOne( |
| | | new QueryWrapper<YwDevice>() |
| | | .lambda() |
| | | .eq(YwDevice::getIsdeleted,Constants.ZERO) |
| | | .eq(YwDevice::getCode,deviceCode) |
| | | .last(" limit 1 ") |
| | | ); |
| | | if(Objects.isNull(ywDevice)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | |
| | | return ywDevice; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public YwDevice findOne(YwDevice ywDevice) { |
| | | QueryWrapper<YwDevice> wrapper = new QueryWrapper<>(ywDevice); |