Mybatis-plus 执行批量条件查询

时间:2025-03-20 13:11:03
//2.校验供应商spu编号是否存在 LambdaQueryWrapper<GoodsSpu> wrapper = new LambdaQueryWrapper<>(); //对查询构造器设置条件 eq(GoodsSpu::getSupplierId,supplierId); 这是要求数值匹配 select(GoodsSpu::getSpuId) 选择存在id wrapper.select(GoodsSpu::getSpuId).eq(GoodsSpu::getSupplierSpuCode,goodsInfoReq.getSupplierSpuCode()).eq(GoodsSpu::getSupplierId,supplierId); /* @Override public List<GoodsSpu> getGoodsSpuWrappers(Wrapper<GoodsSpu> queryWrapper){ return (queryWrapper); } */ List<GoodsSpu> exitGoodsSpuList = goodsSpuBaseService.getGoodsSpuWrappers(wrapper);