master:pc商城首页广告BUG修复;
parent
47898898df
commit
27ecbd68a6
|
|
@ -46,10 +46,9 @@ public class StoreProdVO {
|
|||
@Size(min = 0, max = 60, message = "商品标题不能超过60个字!")
|
||||
@NotBlank(message = "商品标题不能为空!")
|
||||
private String prodTitle;
|
||||
|
||||
@NotNull(message = "是否私款不能为空!")
|
||||
@ApiModelProperty(value = "0 否 1 是", required = true)
|
||||
private Integer privateItem;
|
||||
|
||||
@ApiModelProperty(value = "商品重量")
|
||||
private BigDecimal prodWeight;
|
||||
@ApiModelProperty(value = "生产价格")
|
||||
|
|
|
|||
|
|
@ -169,9 +169,24 @@ public class StoreHomepageServiceImpl implements IStoreHomepageService {
|
|||
if (CollectionUtils.isEmpty(recommendList)) {
|
||||
final Date yesterday = java.sql.Date.valueOf(LocalDate.now().minusDays(1));
|
||||
final Date fiveDaysAgo = java.sql.Date.valueOf(LocalDate.now().minusDays(6));
|
||||
|
||||
|
||||
// TODO 推荐商品逻辑修改,要确保档口从一入驻,整个档口首页就能正常显示数据
|
||||
// TODO 推荐商品逻辑修改,要确保档口从一入驻,整个档口首页就能正常显示数据
|
||||
// TODO 推荐商品逻辑修改,要确保档口从一入驻,整个档口首页就能正常显示数据
|
||||
// TODO 推荐商品逻辑修改,要确保档口从一入驻,整个档口首页就能正常显示数据
|
||||
// TODO 推荐商品逻辑修改,要确保档口从一入驻,整个档口首页就能正常显示数据
|
||||
// TODO 推荐商品逻辑修改,要确保档口从一入驻,整个档口首页就能正常显示数据
|
||||
|
||||
|
||||
// 如果档口未设置推荐商品,则筛选销量最好的10条商品
|
||||
List<StoreRecommendResDTO> dailySaleTop10ProdList = this.dailySaleProdMapper.selectStoreDefaultRecommendList(storeId, fiveDaysAgo, yesterday);
|
||||
return CollectionUtils.isEmpty(dailySaleTop10ProdList) ? Collections.emptyList() : this.getDefaultRecommendList(storeId, dailySaleTop10ProdList);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
// 商品价格、主图、标签等
|
||||
List<StoreProdPriceAndMainPicAndTagDTO> attrList = this.storeProdMapper.selectPriceAndMainPicAndTagList(recommendList.stream()
|
||||
|
|
|
|||
|
|
@ -526,6 +526,9 @@ public class WebsitePCServiceImpl implements IWebsitePCService {
|
|||
}
|
||||
// 获取近一月 档口首页PC 顶部左侧轮播图推广数据
|
||||
List<AdvertRound> oneMonthList = this.getOneMonthAdvertList(Collections.singletonList(AdType.PC_HOME_TOP_LEFT_BANNER.getValue()));
|
||||
if (CollectionUtils.isEmpty(oneMonthList)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
Map<Long, SysFile> fileMap = fileMapper.selectList(new LambdaQueryWrapper<SysFile>().eq(SysFile::getDelFlag, Constants.UNDELETED)
|
||||
.in(SysFile::getId, oneMonthList.stream().map(AdvertRound::getPicId).filter(ObjectUtils::isNotEmpty).collect(Collectors.toList())))
|
||||
.stream().collect(Collectors.toMap(SysFile::getId, Function.identity()));
|
||||
|
|
@ -576,6 +579,9 @@ public class WebsitePCServiceImpl implements IWebsitePCService {
|
|||
return topRightBannerList;
|
||||
}
|
||||
List<AdvertRound> oneMonthList = this.getOneMonthAdvertList(Collections.singletonList(AdType.PC_HOME_TOP_RIGHT_BANNER.getValue()));
|
||||
if (CollectionUtils.isEmpty(oneMonthList)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
List<StoreProdFileResDTO> mainPicList = this.prodFileMapper.selectMainPic(oneMonthList.stream().map(AdvertRound::getProdIdStr).distinct().collect(Collectors.toList()));
|
||||
Map<Long, String> mainPicMap = mainPicList.stream().collect(Collectors.toMap(StoreProdFileResDTO::getStoreProdId, StoreProdFileResDTO::getFileUrl, (v1, v2) -> v2));
|
||||
List<AdvertRound> launchingList = oneMonthList.stream().filter(x -> Objects.equals(x.getLaunchStatus(), AdLaunchStatus.LAUNCHING.getValue()))
|
||||
|
|
@ -684,6 +690,9 @@ public class WebsitePCServiceImpl implements IWebsitePCService {
|
|||
return redisStyleList;
|
||||
}
|
||||
List<AdvertRound> oneMonthList = this.getOneMonthAdvertList(Collections.singletonList(AdType.PC_HOME_STYLE_RANK.getValue()));
|
||||
if (CollectionUtils.isEmpty(oneMonthList)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
// 档口推广主图map
|
||||
List<SysFile> fileList = this.fileMapper.selectByIds(oneMonthList.stream().map(AdvertRound::getPicId)
|
||||
.filter(ObjectUtils::isNotEmpty).collect(Collectors.toList()));
|
||||
|
|
@ -1246,6 +1255,9 @@ public class WebsitePCServiceImpl implements IWebsitePCService {
|
|||
return redisList;
|
||||
}
|
||||
List<AdvertRound> oneMonthList = this.getOneMonthAdvertList(Collections.singletonList(AdType.PC_NEW_PROD_SINGLE_BANNER.getValue()));
|
||||
if (CollectionUtils.isEmpty(oneMonthList)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
List<AdvertRound> launchingList = oneMonthList.stream().filter(x -> Objects.equals(x.getLaunchStatus(), AdLaunchStatus.LAUNCHING.getValue()))
|
||||
.filter(x -> Objects.equals(x.getBiddingStatus(), AdBiddingStatus.BIDDING_SUCCESS.getValue())).collect(Collectors.toList());
|
||||
List<AdvertRound> expiredList = oneMonthList.stream().filter(x -> Objects.equals(x.getLaunchStatus(), AdLaunchStatus.EXPIRED.getValue())).collect(Collectors.toList());
|
||||
|
|
|
|||
Loading…
Reference in New Issue