feat: 解决商品先上架在下架后,商品无法真正下架的问题

This commit is contained in:
weizhiqiang 2024-10-11 20:25:52 +08:00
parent 00a12efe2a
commit 6bf45be8d0

View file

@ -211,7 +211,8 @@ public class ShopMaterialServiceImpl extends SkyeyeBusinessServiceImpl<ShopMater
MPJLambdaWrapper<ShopMaterial> wrapper = new MPJLambdaWrapper<ShopMaterial>()
.innerJoin(Material.class, Material::getId, ShopMaterial::getMaterialId)
.innerJoin(Brand.class, Brand::getId, Material::getBrandId)
.eq(Brand::getEnabled, EnableEnum.ENABLE_USING.getKey());
.eq(Brand::getEnabled, EnableEnum.ENABLE_USING.getKey())
.in(Material::getShelvesState, Arrays.asList(MaterialShelvesState.ON_SHELVE.getKey(), MaterialShelvesState.PART_ON_SHELVE.getKey()));
List<ShopMaterial> shopMaterialList = skyeyeBaseMapper.selectJoinList(ShopMaterial.class, wrapper);
// 根据id批量查询详细的商品信息
List<String> idList = shopMaterialList.stream().map(ShopMaterial::getId).collect(Collectors.toList());