KKSU
2025-01-24 c3ee5dd9cda004b034fd586b87eda13d99ef054d
src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallGoodsCategoryServiceImpl.java
@@ -4,6 +4,7 @@
import cc.mrbird.febs.mall.entity.MallGoodsCategory;
import cc.mrbird.febs.mall.mapper.MallAddressWorldMapper;
import cc.mrbird.febs.mall.mapper.MallGoodsCategoryMapper;
import cc.mrbird.febs.mall.mapper.MallGoodsMapper;
import cc.mrbird.febs.mall.service.IApiMallGoodsCategoryService;
import cc.mrbird.febs.mall.vo.AdminWorldAddressVo;
import cc.mrbird.febs.mall.vo.MallGoodsCategoryVo;
@@ -27,10 +28,28 @@
public class ApiMallGoodsCategoryServiceImpl extends ServiceImpl<MallGoodsCategoryMapper, MallGoodsCategory> implements IApiMallGoodsCategoryService {
    private final MallAddressWorldMapper mallAddressWorldMapper;
    private final MallGoodsMapper mallGoodsMapper;
    @Override
    public List<MallGoodsCategoryVo> findAllCategoryList() {
        return this.baseMapper.selectAllCategoryList();
        List<MallGoodsCategoryVo> mallGoodsCategoryVos = this.baseMapper.selectAllCategoryList();
//        ArrayList<MallGoodsCategoryVo> objects = new ArrayList<>();
//        if(CollUtil.isNotEmpty(mallGoodsCategoryVos)){
//            mallGoodsCategoryVos.forEach(item -> {
//                Long id = item.getId();
//                List<MallGoods> mallGoods = mallGoodsMapper.selectList(
//                        new LambdaQueryWrapper<MallGoods>()
//                                .select(MallGoods::getId)
//                                .eq(MallGoods::getCategoryId, id));
//                if(CollUtil.isEmpty(mallGoods)){
//                    objects.add(item);
//                }
//            });
//        }
//        if(CollUtil.isNotEmpty(objects)){
//            mallGoodsCategoryVos.removeAll(objects);
//        }
        return mallGoodsCategoryVos;
    }
    @Override