|
|
@@ -81,12 +81,12 @@ public class IotDayWorkOperationServiceImpl extends ServiceImpl<IotDayWorkOperat
|
|
|
@Override
|
|
|
public IotDayWorkOperation findByHostDataIdAndIotCode(Long hostDataId, Long hostDataOperationId, String iotCode) {
|
|
|
LambdaQueryWrapper<IotDayWorkOperation> wrapper = new LambdaQueryWrapper<>();
|
|
|
- wrapper.eq(IotDayWorkOperation::getHostDataId, hostDataId);
|
|
|
- if (hostDataOperationId == null) {
|
|
|
+ wrapper.eq(IotDayWorkOperation::getHostDataOperationId, hostDataOperationId);
|
|
|
+ if (hostDataId == null) {
|
|
|
//单独操作的时候这个字段为null
|
|
|
- wrapper.isNull(IotDayWorkOperation::getHostDataOperationId);
|
|
|
+ wrapper.isNull(IotDayWorkOperation::getHostDataId);
|
|
|
} else {
|
|
|
- wrapper.eq(IotDayWorkOperation::getHostDataOperationId, hostDataOperationId);
|
|
|
+ wrapper.eq(IotDayWorkOperation::getHostDataId, hostDataId);
|
|
|
}
|
|
|
wrapper.eq(IotDayWorkOperation::getIotCode, iotCode);
|
|
|
wrapper.last(Constants.LIMIT1);
|