k94314517
2023-09-19 3264ce37964df5055d63cee80d7d52f96f3162f8
基础字段
已修改1个文件
8 ■■■■■ 文件已修改
server/service/src/main/java/com/doumee/service/business/impl/GoodsServiceImpl.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/GoodsServiceImpl.java
@@ -509,7 +509,7 @@
            throw new BusinessException(ResponseStatus.DATA_EMPTY);
        }
        //拉式商品 且 上架时,需要限制 平台商品是否已下架
        if(dbGoods.getType().equals(Constants.goodsType.PULL)&&goods.getStatus().equals(Constants.ZERO)){
        if(dbGoods.getType().equals(Constants.goodsType.PULL.getValue())&&goods.getStatus().equals(Constants.ZERO)){
            BaseGoods baseGoods = baseGoodsMapper.selectById(dbGoods.getGoodsId());
            if(Objects.isNull(baseGoods)){
                throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询到平台商品信息");
@@ -1067,7 +1067,6 @@
            i.setMultifileList(multifileMapper.selectList(new QueryWrapper<Multifile>().eq("OBJ_ID",i.getId()).orderByAsc(" SORTNUM ")));
            i.setGoodsParamList(goodsParamMapper.selectList(new QueryWrapper<GoodsParam>()
                    .eq("GOODS_ID",i.getId())
                            .apply(" name in ( select cp.NAME from cate_param cp where cp.CATEGORY_ID = "+i.getCategoryId()+" and cp.ISSHOW = 1 and cp.ISDELETED = 0 and cp.STATUS = 0 ) ")
                    .orderByAsc(" SORTNUM ")));
        });
        return PageData.from(goodsIPage);
@@ -1110,7 +1109,10 @@
        goodsList.forEach(i->{
            i.setPrefixUrl(prefixUrl);
            i.setMultifileList(multifileMapper.selectList(new QueryWrapper<Multifile>().eq("OBJ_ID",i.getId()).orderByAsc(" SORTNUM ")));
            i.setGoodsParamList(goodsParamMapper.selectList(new QueryWrapper<GoodsParam>().eq("GOODS_ID",i.getId()).orderByAsc(" SORTNUM ")));
            i.setGoodsParamList(goodsParamMapper.selectList(
                    new QueryWrapper<GoodsParam>().eq("GOODS_ID",i.getId())
                            .apply(" name in ( select cp.NAME from cate_param cp where cp.CATEGORY_ID = "+i.getCategoryId()+" and cp.ISSHOW = 1 and cp.ISDELETED = 0 and cp.STATUS = 0 ) ")
                            .orderByAsc(" SORTNUM ")));
        });
        return goodsList;
    }