| | |
| | | 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(),"未查询到平台商品信息"); |
| | |
| | | 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); |
| | |
| | | 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; |
| | | } |