| | |
| | | goodsMapper.goodsPageForShop(pageWrap.toPage(),wrapper,model.getShopId()) ; |
| | | if (!CollectionUtils.isEmpty(page.getRecords())){ |
| | | String preFixPath = systemDictDataBiz.getPreFixPath(Constants.RESOURCE_PATH, Constants.GOODS_FILE); |
| | | |
| | | |
| | | for (GoodsInfoResponse goodsInfoResponse:page.getRecords() |
| | | ) { |
| | | goodsInfoResponse.setImgurl(StringUtils.isNotBlank(goodsInfoResponse.getImgurl())?(preFixPath+goodsInfoResponse.getImgurl()):null); |
| | | //sku基础信息 |
| | | this.getSkuInfo(goodsInfoResponse); |
| | | if(Objects.isNull(model.getShopId())){ |
| | | //sku基础信息 |
| | | this.getSkuInfo(goodsInfoResponse); |
| | | } |
| | | if(StringUtils.isNotBlank(goodsInfoResponse.getBrandIds())){ |
| | | List<Labels> allBrands = labelsMapper.selectList(new QueryWrapper<Labels>().lambda() |
| | | .in(Labels::getId,getNumIdByIdsString(goodsInfoResponse.getBrandIds())) |
| | | .eq(Labels::getType,Constants.LabelsType.APPLICABLE_BRAND.getKey()) |
| | | .eq(Labels::getIsdeleted,Constants.ZERO) |
| | | ); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(allBrands)){ |
| | | goodsInfoResponse.setBrandNames(String.join("/",allBrands.stream().map(i->i.getName()).collect(Collectors.toList()))); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if(StringUtils.isNotBlank(model.getGoodsName())&&Objects.nonNull(model.getMemberId())){ |
| | | searchHistoryMapper.delete(new QueryWrapper<SearchHistory>().lambda() |
| | | .eq(SearchHistory::getMemberId,model.getMemberId()) |
| | | .eq(SearchHistory::getContent,model.getGoodsName()) |
| | | ); |
| | | SearchHistory searchHistory = new SearchHistory(); |
| | | searchHistory.setIsdeleted(Constants.ZERO); |
| | | searchHistory.setContent(model.getGoodsName()); |