修改菜品逻辑
This commit is contained in:
@ -1,5 +1,6 @@
|
|||||||
package cn.iocoder.yudao.module.system.service.deviceinfo;
|
package cn.iocoder.yudao.module.system.service.deviceinfo;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||||
import cn.iocoder.yudao.module.system.controller.admin.deviceinfo.vo.DeviceInfoPageReqVO;
|
import cn.iocoder.yudao.module.system.controller.admin.deviceinfo.vo.DeviceInfoPageReqVO;
|
||||||
@ -106,9 +107,11 @@ public class DeviceInfoServiceImpl implements DeviceInfoService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
deviceInfoMapper.update(new DeviceInfoDO(),new LambdaUpdateWrapper<DeviceInfoDO>()
|
if(CollectionUtil.isNotEmpty(updateList)){
|
||||||
.set(DeviceInfoDO::getAlive,"0")
|
deviceInfoMapper.update(new DeviceInfoDO(),new LambdaUpdateWrapper<DeviceInfoDO>()
|
||||||
.in(DeviceInfoDO::getDeviceIp,updateList));
|
.set(DeviceInfoDO::getAlive,"0")
|
||||||
|
.in(DeviceInfoDO::getDeviceIp,updateList));
|
||||||
|
}
|
||||||
return updateList.size();
|
return updateList.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -155,20 +155,20 @@ public class DevuceServiceImpl implements DevuceService {
|
|||||||
@Override
|
@Override
|
||||||
public List<DishesDO> getDishesList(Long carteenId,Long dishecType) {
|
public List<DishesDO> getDishesList(Long carteenId,Long dishecType) {
|
||||||
//获取已绑定的菜品id
|
//获取已绑定的菜品id
|
||||||
List<Long> collect = devuceMapper.selectList(new LambdaQueryWrapperX<DevuceDO>()
|
// List<Long> collect = devuceMapper.selectList(new LambdaQueryWrapperX<DevuceDO>()
|
||||||
.eq(DevuceDO::getBind, DevuceDO.BIND))
|
// .eq(DevuceDO::getBind, DevuceDO.BIND))
|
||||||
.stream()
|
// .stream()
|
||||||
.map(DevuceDO::getDishesId).collect(Collectors.toList());
|
// .map(DevuceDO::getDishesId).collect(Collectors.toList());
|
||||||
if(ObjUtil.isNotEmpty(collect)){
|
// if(ObjUtil.isNotEmpty(collect)){
|
||||||
return dishesMapper.selectList(new LambdaQueryWrapperX<DishesDO>()
|
// return dishesMapper.selectList(new LambdaQueryWrapperX<DishesDO>()
|
||||||
.notIn(DishesDO::getId, collect)
|
// .notIn(DishesDO::getId, collect)
|
||||||
.eq(DishesDO::getCarteenId,carteenId)
|
// .eq(DishesDO::getCarteenId,carteenId)
|
||||||
.eq(DishesDO::getDishecType,dishecType));
|
// .eq(DishesDO::getDishecType,dishecType));
|
||||||
}else{
|
// }else{
|
||||||
return dishesMapper.selectList(new LambdaQueryWrapperX<DishesDO>()
|
return dishesMapper.selectList(new LambdaQueryWrapperX<DishesDO>()
|
||||||
.eq(DishesDO::getCarteenId,carteenId)
|
.eq(DishesDO::getCarteenId,carteenId)
|
||||||
.eq(DishesDO::getDishecType,dishecType));
|
.eq(DishesDO::getDishecType,dishecType));
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user